cancel
Showing results for 
Search instead for 
Did you mean: 

Eclipse Makefile error

Jaime Lin
Associate
Posted on May 04, 2018 at 10:03

I got a error message - 

make: *** [test.elf] Error 1 when I build a project in Eclipse.

Is there any way to solve this problem?.

MCU : STM32F091RCT6

Eclipse version : Neon.3 Release (4.6.3)

Toolchain : 

Cross ARM GCC 

Building console message as below:

15:34:24 **** Incremental Build of configuration Debug for project test ****

make -j4 all

Building target: test.elf

Invoking: Cross ARM GNU C Linker

arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -O2 -g -Xlinker --gc-sections -Wl,-Map,'test.map' -o 'test.elf' ./Src/adc.o ./Src/aewin_def.o ./Src/can.o ./Src/dma.o ./Src/freertos.o ./Src/gpio.o ./Src/i2c.o ./Src/iwdg.o ./Src/main.o ./Src/rtc.o ./Src/spi.o ./Src/startup_stm32f091xc.o ./Src/stm32f0xx_hal_msp.o ./Src/stm32f0xx_hal_timebase_TIM.o ./Src/stm32f0xx_it.o ./Src/system_stm32f0xx.o ./Src/tim.o ./Src/usart.o ./Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.o ./Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM0/port.o ./Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.o ./Middlewares/Third_Party/FreeRTOS/Source/croutine.o ./Middlewares/Third_Party/FreeRTOS/Source/event_groups.o ./Middlewares/Third_Party/FreeRTOS/Source/list.o ./Middlewares/Third_Party/FreeRTOS/Source/queue.o ./Middlewares/Third_Party/FreeRTOS/Source/tasks.o ./Middlewares/Third_Party/FreeRTOS/Source/timers.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_adc_ex.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_can.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_cortex.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_dma.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash_ex.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_gpio.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c_ex.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_iwdg.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr_ex.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc_ex.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rtc.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rtc_ex.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_smbus.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_spi.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_spi_ex.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim_ex.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_uart.o ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_uart_ex.o

c:/program files (x86)/gnu tools arm embedded/6 2017-q2-update/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v7-m\libg.a(lib_a-exit.o): In function `exit':

exit.c:(.text.exit+0x16): undefined reference to `_exit'

c:/program files (x86)/gnu tools arm embedded/6 2017-q2-update/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v7-m\libg.a(lib_a-sbrkr.o): In function `_sbrk_r':

sbrkr.c:(.text._sbrk_r+0xc): undefined reference to `_sbrk'

collect2.exe: error: ld returned 1 exit status

makefile:47: recipe for target 'test.elf' failed

make: *** [test.elf] Error 1

15:34:24 Build Finished (took 536ms)

1 REPLY 1
Posted on May 04, 2018 at 11:42

Look to be missing syscalls.c

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..