2024-02-14 09:52 PM
Hi,
I have created a project using STM32CubeMX and Keil uVision.
The generated CubeMX comes with its own main.c and main function.
What I want to do is disable that main.c build in the project and create my main.cpp file,
where I can put my main function.
The problem I'm now facing is that the compiler is giving the following warning-
Object file renamed main.o to main_1.o
While going through this documentation it says to configure the linker and scatter file.
https://developer.arm.com/documentation/ka004041/latest/
But I'm not able to figure it out. is there some other document I can go through?
Solved! Go to Solution.
2024-02-15 12:26 AM
Hello @AVerm.4 ,
It seems the build contains two files with the same exact name!
Make sure every "main.c" "stm32xxxx_it.c" and stm32xxxx_hal_map.c" is excluded in the current target build options.
Check that it is building into different directories for each sub-project, and verify the "include in Target Build" option in the "Option for target".
2024-02-15 12:26 AM
Hello @AVerm.4 ,
It seems the build contains two files with the same exact name!
Make sure every "main.c" "stm32xxxx_it.c" and stm32xxxx_hal_map.c" is excluded in the current target build options.
Check that it is building into different directories for each sub-project, and verify the "include in Target Build" option in the "Option for target".
2024-02-15 05:46 AM
Hi @Imen.D ,
I am working only on one project and no sub-project. what I want to do is disable main.c generated by CubeMX and work on main.cpp file.
Should I use Keil RTE to generate the CubeMX files?