2022-09-26 10:11 AM
2022-09-26 10:23 AM
Not clear what part you're using.
Would suggest you turn OFF optimization if you want more linear-flow of code.
Perhaps generate a disassembly or code vs assembler, and WALK that to understand the flow/expectations.
2022-09-26 10:39 AM
Thank you for the reply. much appreciated. I am using the ST link v2 debugger. I am new to the STM32 Cube IDE where can I find to turn OFF optimization. And how do I generate disassembly. I have written in c using HAL libraries.
2022-09-27 12:14 PM
I managed to turn off optimization but still happening. It just skip and does not "step into" the function within switch statement
2022-09-27 12:46 PM
What part are you using?
The GNU tools should be able to generate listing files as part of the compilation / build process. Check available options.
Perhaps use objcopy or fromelf, if necessary.
https://www.systutorials.com/generate-a-mixed-source-and-assembly-listing-using-gcc/
2022-09-27 02:17 PM
Thank you for the reply. I am using STM32CubeIDE version 1.9.0 which has a MCU GCC compiler. I am using that compiler. I cant find on there to generate listing files.
2022-09-27 02:55 PM
Yes, you said that already, but in a dozen posts you haven't identified the "STM32" that you're using.
Some of the F7's use a core with debug/stepping issues.
These aren't my tools, there should either be a check box, or a means to insert command line options.
2022-09-27 03:19 PM
Probably:
Project
Properties
C/C++ Build
Settings
MCU Post Build Outputs
Generate List File