1

I try compile program for ARM - source code to dowload http://roboty.utp.edu.pl/wp-content/uploads/2015/01/minisumo_coide_v3.zip. I use microprocesor STM32F103RBT6 (family ARM Cortex-M3).

I work on GNU/Linux Ubuntu 14.04 - my IDE is CodeBlocks 13.12 My compiler is arm-none-eabi-g (GNU Tools for ARM Embedded Processors) 5.2.1 20151202 (release) [ARM/embedded-5-branch revision 231848] Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I downloaded it from https://launchpad.net/gcc-arm-embedded/ download

I set compiler flags cortex-m3 processor [-mcpu=cortex-m3]

In other options is -mcpu=cortex-m3 -mthumb

In defines are STM32F10X_MD STM32F103RB

I have problems because i work on GNU/Linux and all was prepared for Microsoft Windows 7 (Cocox IDE) I dont know how to compile on Windows too and I thought on GNU/Linux will be easier and more cool hackers :)

I put build log

||=== Build: Release in minisumo (compiler: GNU GCC Compiler for ARM) ===|
stm_lib/src/misc.c||In function 'NVIC_PriorityGroupConfig':|
stm_lib/src/misc.c|99|warning: implicit declaration of function 'assert_param' [-Wimplicit-function-declaration]|
stm_lib/src/stm32f10x_adc.c||In function 'ADC_DeInit':|
stm_lib/src/stm32f10x_adc.c|182|warning: implicit declaration of function 'assert_param' [-Wimplicit-function-declaration]|
stm_lib/src/stm32f10x_dma.c||In function 'DMA_DeInit':|
stm_lib/src/stm32f10x_dma.c|111|warning: implicit declaration of function 'assert_param' [-Wimplicit-function-declaration]|
stm_lib/src/stm32f10x_gpio.c||In function 'GPIO_DeInit':|
stm_lib/src/stm32f10x_gpio.c|111|warning: implicit declaration of function 'assert_param' [-Wimplicit-function-declaration]|
stm_lib/src/stm32f10x_rcc.c||In function 'RCC_HSEConfig':|
stm_lib/src/stm32f10x_rcc.c|273|warning: implicit declaration of function 'assert_param' [-Wimplicit-function-declaration]|
stm_lib/src/stm32f10x_tim.c||In function 'TIM_DeInit':|
stm_lib/src/stm32f10x_tim.c|125|warning: implicit declaration of function 'assert_param' [-Wimplicit-function-declaration]|
stm_lib/src/stm32f10x_usart.c||In function 'USART_DeInit':|
stm_lib/src/stm32f10x_usart.c|133|warning: implicit declaration of function 'assert_param' [-Wimplicit-function-declaration]|
sumolib/rprintf.c||In function 'rsscanf':|
sumolib/rprintf.c|398|warning: assignment makes integer from pointer without a cast [-Wint-conversion]|
/home/szymon/Minisumo/gcc-arm-none-eabi-5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/lib/libc.a(lib_a-exit.o)||In function `exit':|
exit.c:(.text.exit 0x2c)||undefined reference to `_exit'|
obj/Release/cmsis_boot/startup/startup_stm32f10x_md.o||In function `zero_loop':|
startup_stm32f10x_md.c|| undefined reference to `_sdata'|
startup_stm32f10x_md.c|| undefined reference to `_sidata'|
startup_stm32f10x_md.c|| undefined reference to `_sbss'|
startup_stm32f10x_md.c|| undefined reference to `_ebss'|
obj/Release/stm_lib/src/misc.o||In function `NVIC_PriorityGroupConfig':|
misc.c|| undefined reference to `assert_param'|
obj/Release/stm_lib/src/misc.o||In function `NVIC_Init':|
misc.c|| undefined reference to `assert_param'|
misc.c|| undefined reference to `assert_param'|
misc.c|| undefined reference to `assert_param'|
obj/Release/stm_lib/src/misc.o||In function `NVIC_SetVectorTable':|
misc.c|| undefined reference to `assert_param'|
obj/Release/stm_lib/src/misc.o:misc.c|| more undefined references to `assert_param' follow|
||=== Build failed: 11 error(s), 8 warning(s) (0 minute(s), 3 second(s)) ===|

Can you tell what is resaon of my problems?

5
  • You're not including a header file that declares assert_param. You may also need to link against a library. Mar 19, 2016 at 16:33
  • I haven't seen any file-library to link. Where can be library to link? Mar 19, 2016 at 17:36
  • You should -DUSE_STDPERIPH_DRIVER -DUSE_FULL_ASSERT and implement void assert_failed(uint8_t* file, uint32_t line) for the assert issue. The undefined references to _sidata etc., I'm stuck on that too.
    – Ell
    Nov 16, 2017 at 16:52
  • I tried doing an arm compile in codeblocks. first it didn't detect the arm cross compiler. I entered the paths manually. Then it was spitting out linker errors for a missing configuration for build-id memory allocation. I added it. Then I got IRQ errors from the Vector.S file autogenerated by the project builder. I removed those symbols. Now I'm getting a series of undefined function references that I can't find anywhere in the project. Someone needs to fix 'arm' in codeblocks!
    – Scott
    Jun 19, 2019 at 21:10
  • btw, it compiles just fine on the command line with no fancy parameters or include files and executes without a fuss on my pi.
    – Scott
    Jun 19, 2019 at 21:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.