Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


System Workbench is losing some settings

Hi,
I have created a STM32CubeMX (V4.23) project for use with a Nulceo-L476 development board. The project is simple in that it only sets up SYS for serial wire debug, the LED and Push Button GPIO and USART2. All this works as expected.

This CubeMX project is then imported into System Workbench (V2.2) which builds and debugs as expected.

I then add to the project a directory \App containing \Inc and \Src with source code that I would like to keep separate from the \Src and \Inc directories created by CubeMX. I am able to change the properties of the \App directory with include paths as required etc. This also builds as expected.

Now I exit System Workbench then restart it, to find that the build fails with the following messages.

c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe: error: FW_0004.elf uses VFP register arguments, App/Src/AppMain.o does not

There is one message for each of the source files in my \App directory.

On checking the properties of my \App directory I see that they have changed in terms of the floating point configuration which appears to be the cause of the linker errors. I have only shown the area that has changed.

The initial settings were:
-mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 ...

But have changed to:
-mcpu=cortex-m4 -mthumb -mfloat-abi=soft ...

If I check my top level project node, FW_0004, I see that the MPU Settings select a hard FPU as expected.

The \App node correctly inherits the FPU settings initially, but after System Workbench is shutdown where is it getting the incorrect settings from and why?

Is there a way to re-inherit the correct settings for \App similarly to what happens when a new directory is created?

So far the only way that I can get the correct settings is to delete then recreate the \App directory and its contents, then apply the required settings to this node. This only lasts until the next time System Workbench is exited.

Any help would be appreciated.

Regards
FarmerJo

Hi FarmerJo,

This behavior is a known bug and it was fixed in the System Workbench V2.3.
So I suggest you to update your System Workbench or download the latest installer.

Best Regards,
vionf

Hi vionf,

Thanks for that it now keeps its configuration settings.

I have two more questions if possible.

How do you stop System Workbench from automatically building when you change from a Debug target to a Release target or vice-versa?

I have a header file with some conditional items in it based on the setting of DEBUG and RELEASE etc. The greyed out areas in the file are not changing accoring to weather or not these Preprocessor symbols are defined. They are indeed define and the code works as expected but the display does not. Any ideas?

Regards
FarmerJo

Hi,

When you refer to the “automatically building”, you mean the build of C/C++ Indexer or the build of the src project?

Concerning the greyed out area, go to the properties of your project > C/C++ General > Indexer
1) Activate the checkbox “Enable project specific settings”
2) Activate the radio button “Use active build configuration” in the group “Build configuration for the indexer”
3) Deactivate the checkbox “Reindex project on change of active build configuration” if you don’t want to rebuild the indexer each time you switch between DEBUG - RELEASE target

I think it is also possible to define this behavior in global preferences. In that case, go to window menu > preferences > C/C++ > Indexer

Regards,
vionf


United Kingdom

Hi vionf,

Sorry for the slow reply.

In automatic building I was referring to the rebuilding of the src code whenever I change from Debug to Release build or vice-versa.

I also made the changes to the indexer which now works as expected. Thanks.

Regards
FarmerJo


 

Newest Forum Posts

  1. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  2. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  3. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  4. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  5. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  6. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  8. Build a project in "release" mode by tang, 2025-02-20 10:36
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35
  10. Fail to debug in Win 11 C/C++ by mortenlund, 2024-12-26 20:27

Last-Modified Blogs