Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


C code executing out of order

I noticed this on a more complicated project so I went back to blinky. I ran the debugger and it halts at the start of main. When I step in it first executes the GPIO_Init() whihc is the third instruction down, then steps back up to the system clock init (1st call in main), and then steps to a HAL_??? call. Is there a switch causing some sort of optimization that would cause this?

-Greg

For debugging you should set optimisation to -Og

Harry


-Solved-
Thanks for the reply. That is the fix. Interesting that AC6 does not initially set that when the build type is set to Debug. The default is -Os.

For those who are new the settings can be found by a right click on the Project and selecting “Properties” in the pull down menu (Hot key short cut with the project highlighted Alt+Enter). Expand the “C/C++ Build” tree and select “Settings”. Going to the right in the “Tool Settings” tab expand the “MCU GCC Compiler” tree and select “Optimization”. going to the right find the “Optimization Level” and use the pull down arrow to select “Optimize for Debug (-Og)”.


France

Hi Greg,

If your optimizing setup is -Os by default, that means that, probably, you created your project through CubeMX; if you created it directly in System Workbench you would be using -Og, that yield less optimized but simpler to debug code.

Bernard (Ac6)