RT-Thread Studio - release build

Created at 2022-04-19 21:28:54

My first contact with RT-Thread Studio was creating an application based on STM32H750VB. The automatic generated code with only a while loop (serial port print message and delay) has 70548 bytes on Flash. It's quite impressive. Normal? In an attempt to reduce the code size, such as in other plataforms, I tried to change the build mode to Release, but I didn't find how to do it. Can you help me?

更多

Follower
0
Views
821
3 Answers
davidticker
davidticker 2022-04-20

Any log can share?

rcp
rcp 2022-04-20

If you use the full version of RT-Thread, the size compiled by GCC is generally large. It is recommended that you create a simplified version of RT-Thread nano type project, so that the size will be smaller. If you want to create a release build configuration, you need to create it based on the debug configuration. You need to know how to set the gcc compiler parameters to reduce the compiled size.

image.png

create a new build configuration by this menu
image.png
image.png

manut
manut 2022-04-20

Thanks rcp for the detailed response. Meanwhile, I changed to "nano" and the code was reduced to 30.4 kB. But I can't identify, in the properties, as a Debug build. For example, there's no something like -DEBUG symbol in preprocessor.

stm32h750_nano_debug.png

Also, as you suggested, I've built a Release version based on Debug. But it seems to have the same properties as Debug and the same generated code size (just the name was changed to "Release"). Some additional suggestion?

Write Your Answer

Log in to publish your answer,Click here to log in.

Create
Post

Share