2020-04-15 05:59 AM
Hi,
For education purpose, I'm trying to create, compile, load and debug assembly projects with STM32Cube. Unfortunately, there are no built in options to do it. I noticed that I can erase on an existing project the main.c and create a main.s instead. It works, but I'd prefer to create an assembly project from scratch. Here are my questions :
Thank you if you have answers to my questions !
Solved! Go to Solution.
2020-04-28 06:39 AM
1. There is no specific "Assembly" type project. You should instead create a standard "STM32 Project" empty project for your device and remove any sources.
2. You can use #include <> in assembly files, but please make sure that the file you include is actually valid to include in an assembly file (stm32f446xx.h is not, since it contains C code). This is because we build all assembly files using GCC with the -x assembler-with-cpp flag which enables preprocessing.
3. Create an empty "STM32 Project", then add your .s files to this project
4. Creating a debug configuration for the "STM32 Cortex-M C/C++ Application" type requires that the project has build configurations that contains the device information. This means that the project needs to be of type "STM32 Project". If you want to write your own makefiles you can do this by first creating your "STM32 Project", then go into Project Properties -> C/C++ Build -> Builder settings, then uncheck the "Generate Makefiles automatically". Now you have full control over the makefiles.
2020-04-28 06:39 AM
1. There is no specific "Assembly" type project. You should instead create a standard "STM32 Project" empty project for your device and remove any sources.
2. You can use #include <> in assembly files, but please make sure that the file you include is actually valid to include in an assembly file (stm32f446xx.h is not, since it contains C code). This is because we build all assembly files using GCC with the -x assembler-with-cpp flag which enables preprocessing.
3. Create an empty "STM32 Project", then add your .s files to this project
4. Creating a debug configuration for the "STM32 Cortex-M C/C++ Application" type requires that the project has build configurations that contains the device information. This means that the project needs to be of type "STM32 Project". If you want to write your own makefiles you can do this by first creating your "STM32 Project", then go into Project Properties -> C/C++ Build -> Builder settings, then uncheck the "Generate Makefiles automatically". Now you have full control over the makefiles.
2020-05-06 05:35 AM
Thank you very much Markus for your answer, I will look into it!