This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Building an STM32 CUBE project using Keil MDK

My customer is using Cube. I do not. I wrote some library and created a very simple project to test and validate it. U did use Keil and armcc v5.06. I had trouble adding this library to the same test project within Cube. My next step was to build the same library setting Keil MDK to use GNU toolchain.

Here ios my build output:

Build started: Project: main
*** Note: Rebuilding project, since 'Options->Output->Create Batch File' is selected.
Rebuild target 'mc_comm_lib_mk9p0'
compiling main.c...
compiling system_stm32g4xx.c...
assembling startup_stm32g431xx.asm...
linking...
c:\st\stm32cubeide_1.6.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\arm-none-eabi\bin\ld.exe: ./out/startup_stm32g431xx.o: in function `LoopForever':
B:/STM32/G4/Examples/mc_comm_lib GNU mk9p0/../../Nimbus/PAL/SRC/startup_stm32g431xx.asm:87: undefined reference to `_siccmram'
c:\st\stm32cubeide_1.6.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\arm-none-eabi\bin\ld.exe: B:/STM32/G4/Examples/mc_comm_lib GNU mk9p0/../../Nimbus/PAL/SRC/startup_stm32g431xx.asm:93: undefined reference to `_sccmram'
c:\st\stm32cubeide_1.6.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\arm-none-eabi\bin\ld.exe: B:/STM32/G4/Examples/mc_comm_lib GNU mk9p0/../../Nimbus/PAL/SRC/startup_stm32g431xx.asm:94: undefined reference to `_eccmram'
c:\st\stm32cubeide_1.6.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\arm-none-eabi\bin\ld.exe: c:/st/stm32cubeide_1.6.0/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard\libc.a(lib_a-exit.o): in function `exit':
exit.c:(.text.exit+0x16): undefined reference to `_exit'
collect2.exe: error: ld returned 1 exit status
".\OUT\main.elf" - 1 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed: 00:00:07

This is the startup file:


Could you please let me know what I'm missing?

Thanks.

0