Full question(s):
I want to have visibility of, and single-step through, C code execution for HAL and BSP functions while debugging. What do I need to set in the IDE to do that?
Answer(s):
- In IAR, load the HAL project for the MCU you are using, e.g., AmbiqSuite-Rel2.2.0\mcu\apollo3\hal\iar\libam_hal.ewp.
- In the project options, select "C/C++ Compiler" from the left-side list, and go to the "Optimization" tab. Set optimization level to "None".
- Go to the "Output" tab. Check the "Generate debug information" box
- Hit OK.
- Rebuild (All) the project.
- Load the BSP project for the MCU you are using, e.g., AmbiqSuite-Rel2.2.0\boards\apollo3_evb\bsp\iar\libam_bsp.ewp.
- Repeat steps 2-5.
- Load your project.
- Rebuild (All) the project.
- Select "Download and debug".
- Step into a HAL or BSP function.
- Single step through the C code in the HAL or BSP function.
Comments
0 comments
Article is closed for comments.