Friday, November 29, 2024

Q&A: Keil μVision: I am not able to hit the breakpoint I set inside a while loop

Q&A: Keil μVision: I am not able to hit the breakpoint I set inside a while loop

I created a blinky application based on baremetal application using NXP BSP for FRDM-K64F in Keil μVision, see this link for details. The issue I am having is that I am not able to hit a breakpoint inside the while loop, see below. The project was created using Pack Installer, so default settings are in place except for changes to debugger and settings.

Solution:

The reason that it is not hitting the breakpoint is that the generated project using Pack Installer have the Optimization set to -O1 for the debug build. To fix this change Optimization to -O0 (Project | Options for Target 'xyz*')
Below shows line 66 breakpoint was hit

Thursday, November 28, 2024

Installing Mbed CLI for command line management of Mbed OS on Windows 10

Installing Mbed CLI for command line management of Mbed OS

Mbed CLI allows for creating, publishing, managing code under Git/Mercurial, build and export functions.

Pre-requisite:
- Host: Windows 10 LTSC 2021
- Mbed CLI installer downloaded from https://os.mbed.com/, I am using Mbed_installer_v0.4.10

Without so much ado, install it like below.

Creating a blinky application on baremetal using Keil μVision for FRDM-K64F

Creating a blinky application on baremetal using Keil μVision for FRDM-K64F

Blinking an LED is the equivalent to creating a "Hello World" application to verify the IDE/tool/compiler are installed correctly on general purpose computers. We will be using Keil μVision for this exercise.

Pre-requisite:
- Hardware that has supported BSP in Keil μVision. I am using FRDM-K64F, below are the key specifications of this board
  • Part#: MK64FN1M0VLL12
  • Vendor: NXP
  • Board name: FRDM-K64F
  • Description: Freedom Development Board for Kinetis K24 (1 MB Flash), K63 and K64 MCUs
  • CPU: ARM® Cortex®-M4-based Microcontroller with FPU
  • Frequency: 120 MHz
  • SRAM: 256KB
  • Flash: 1MB
- Host: Windows 10 LTSC 2021
- Keil μVision already installed
\

Step 1: Open Keil μVision.
Step 2: Open Pack Installer
Step 3: Using Pack Installer, select Boards tab and search for FRDM-K64F, then install the board support packagae (BSP)
Accept NXP agreement for the FRDM-K64F_BSP
You may see another license agreement for the MK64F12_DFP, so accept and do Next
Step 4: Create a copy of the blinky sample application by selecting the board and the the example application.
Select destination where to copy the example.
Step 5: Connect FRDM-K64F board to the computer and configure Debuger

Select the project
Do Project options
In Debug tab, select CMSIS-DAP Debugger and do Settings
Select CMSIS-DAP v2 and close the dialog
Step 6: Now do a Build (Project | Build Target), Flash (Flash | Download) and then Debug (Debug | Start/Stop Session) as needed.


Go thinkering!

Installing Arm Keil MDK v6 using Keil μVision on Windows 10

Installing Arm Keil MDK v6 using Keil μVision on Windows 10

Keil μVision is ARM's legacy IDE that is proven in use by hundreds of thousands of developers. The IDE is only available on Windows.

Pre-requisite:
- Host: Windows 10 LTSC 2021
- Keil μVision downloaded from https://www.keil.arm.com/, as of this writting, the version available is mdk_541.exe.


Below shows how to install the application.

Wednesday, November 27, 2024

Creating a blinky application using mbed baremetal using Mbed Studio

Creating a blinky application using mbed baremetal using Mbed Studio

Blinking an LED is the equivalent to "Hello World" when testing a programming language on general purpose computers. We will be using Mbed Studio for this exercise. Note that Mbed Studio will be sunset on July 2026, so only use this for fun and not for profit.

Pre-requisite:
- Hardware that supports mbed. I am using FRDM-K64F, below are the key specifications of this board
  • Part#: MK64FN1M0VLL12
  • Vendor: NXP
  • Board name: FRDM-K64F
  • Description: Freedom Development Board for Kinetis K24 (1 MB Flash), K63 and K64 MCUs
  • CPU: ARM® Cortex®-M4-based Microcontroller with FPU
  • Frequency: 120 MHz
  • SRAM: 256KB
  • Flash: 1MB
- Host: Windows 10 LTSC 2021
- Mbed Studio already installed
- Account created at https://os.mbed.com

Step 1: Connect FRDM-K64F to the computer.
Step 2: Run Mbed Studio("C:\Users\<user>\AppData\Local\Programs\Mbed Studio\Mbed Studio.exe")
Step 3: Login to mbed
Step 4: Create new program
Ste 5: Program details - mbed-os-example-blinky-baremetal
Ste 6: Select a target - I am using FRDM-K64F
Step 7: Sample debug session
Go thinkering!

Installing Mbed Studio on Windows 10

Installing Mbed Studio on Windows 10

Note that Mbed Studio will be sunset on July 2026, so only use this IDE for fun and not for profit.

Pre-requisite:
- Host: Windows 10 LTSC 2021
- Mbed Studio download from https://os.mbed.com/studio/, I am using MbedStudio-1.4.6

Without too much ado, below shows the installation screens for Mbed Studio

Sunday, November 17, 2024

Installing Vitis and Vivado development tools for Cora Z7-07S

Installing Vitis and Vivado development tools for Cora Z7-07S

This assumes that Vitis/Vivado has been downloaded already for offline installation.
It is also assumed that Microsoft Visual C++ Redistributable has already been installed on the machine otherside download and install it first from here.

Below shows installation screens that will install both Vivado and Vitis development tools for Cora Z7-07S

Q&A: How to create a blinky baremetal application on STM32F407G-DISC1 using STM32CubeMX and Keil μVision

Q: How to create a blinky baremetal application on STM32F407G-DISC1 using STM32CubeMX and Keil μVision Answer: Blinking an LED is the equiv...