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


Build a project in "release" mode

Hi guys,

I have the following issue:
At work I had to modify a project wrote years ago by another programmer on an older revision of this development tool.
I’ve imported the original project. When I click on the build button (the icon with the hammer) I have only the “debug” build option, while in another project using the same micro, wrote in STM32CubeIDE, I have the “debug” and “release” options.

So, if I build the project in debug mode, the board doesn’t work.
I suppose I have to activate the “release” building mode, but I don’t know how do this and I don’t find any information.

Can someone help me?

Thanks

Hi,

“Debug” and “Release” are not modes but just build configuration profiles. The differences between those two are that on “Release” every optimization options are enabled to reduce binary fingerprint, to enhance execution time and every debug symbols are removed so debugging might be impossible afterward. If your project does not work on “Debug” profile, there is fewer chances it works in “Release”.

If you still need to create a “Release” configuration, right-click on your project > Properties > C/C++ Build, Click on “Manage Configuration”.
On the new window, enter “Release” as name, click on “New...”, select “Existing configuration: Debug”, then OK.
Select the newly created configuration and push “Set Active”.
Then go to C/C++ Build > Settings. Select the Configuration: “Release”, then edit as following:
- MCU GCC Assembler
Debugging - Debug level: None
- MCU GCC Compiler
Debugging - Debug level: None
Preprocessor - Remove “DEBUG” symbol
Optimization - Debug level: Optimize for size (-Os)

You may find more information on the ST website / forum.

Kevin
Ac6

Hi Kevin,

thank you for the informations.
I tried to apply them but:
- in MCU GCC Assembler there isn’t any debugging level to be set
- in Preprocessor I don’t find any DEBUG symbol
setted the other points and pressed Apply, I get the message Internal error described as
“java.lang.Illegal.StateException”

Stefano

Hi Kevin,

I’ve restored the project from the beginning, I’ve applied your tips and the errors are solved.
The program is still not working, as you mentioned in your message.

I don’t know how to solve this problem, the source code should be good.

Thank you
Stefano


 

Newest Forum Posts

  1. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  2. Insightful Perspectives on This Subject by davidsycle, 2025-03-04 05:45
  3. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  4. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  5. Build a project in "release" mode by tang, 2025-02-20 10:36
  6. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35
  7. Fail to debug in Win 11 C/C++ by mortenlund, 2024-12-26 20:27
  8. Fail to debug in Win 11 C/C++ by mortenlund, 2024-12-18 20:48
  9. Firmware has not been found locally by nonameletters, 2024-12-02 07:43
  10. [Solved] SW4STM32 - How to download project to STM32F4 Discovery board by stuarte83, 2024-10-17 14:29

Last-Modified Blogs