The OS is mainly optimized for code size, and we don't have to do more care. O3 performs more optimization on the basis of O2, such as using a pseudo register network, inline, and more optimization for loops. O2 will try more register-level optimizations and the optimization of the instruction level, which takes up more memory and compile time during compilation. O1 optimization will consume less compile time, which is mainly optimized for the branch, constant and expression of the code. Note: The firmware that the Nano library is compared to the firmware that is translated with the STANDARD library, and the space is about 25kb.ġ1 Generate the HEX file, you can also generate bin files, need to add statements So Link is more suitable for multi-compiler development.ģ multi-core compilation, can accelerate compilation speedĤ Add a relative path header file, similar to IAR KEIL, etc.ĥ You can choose the source file Filter, but you can't use it because I am adding a file.ġ0 C library selection, standard large, NANO's occupied space Using code folding functions help quickly analyze the code structure and understand the working principle of the program.ġ Use CUBEMX to generate directly, choose a separate directoryĢ Add external files, use the link mode, the COPY mode is equivalent to copying a new file in a separate directory, which is not suitable for multiple IDE simultaneously. In the source code editor, the left head of the code line with a folding function displays a small icon for code folding. If you want to fold the code, if / else, for, etc., check the two options below. Truestudio is a code folding function, but by default, "Enable Folding When Opening A New Editor" is checked by default. Set the code folding function in the C / C ++ -> Editor -> Folding page. By default, this option is not this, so you must set it when you track debugging.Ĭlick Preferences set under the main menu WINDOW to open the Preferences Setup dialog. When the program's breakpoint is required to track debugging, the compiled optimization level must be set to None or optimize for debugging, otherwise the code row cannot be tracked correctly when it is single-step debugging. (2) Compilation Optimization Level Settings After opening the parallel compilation option, it can significantly improve the compilation speed. This option is not checked after the new workspace, and the current CPU is multi-core. Truestudio's environmental settings are mainly settings in the Properties Settings dialog of the project.Īt the C / C ++ Build's Behavior Settings page, check Enable Parallel Build can open the parallel compilation function. I know some of the skills of the environment in the process of using Truestudio, and the work efficiency can be improved, so it is specially posted. I have been using STM32Cubemx and Truestudio to develop STM32, which is already handled.
Https://free download SW4STM32 connections, not bad