9 years, 8 months ago.

Linker Error Using GCC for ARM -- Possibly missing object file or not included in the Makefile?

I am trying to use GCC for ARM embedded version 4.9.2 on Windows 7 Pro. My target is a FRDM-KL25Z. I have a very simple blinky program that tests 3 LEDs I have on a custom daughterboard mounted to the FRDM board. This program compiles and works fine when built with the online compiler, but when compiling the exported code using GCC for ARM I get this linker error that it can't resolve one of the system functions:

c:/sysgcc/arm-eabi/bin/../lib/gcc/arm-eabi/4.9.2/../../../../arm-eabi/lib/thumb/cortex_m0plus/crt0.o: In function `_start':
/q/gnu/auto/ --- <long path deleted> --- /sys/arm/crt0.S:273: undefined reference to `initialise_monitor_handles'
collect2.exe: error: ld returned 1 exit status
make: *** [Test_LEDs.elf] Error 1

Am I missing a system object file or failing to compile it because it's not in the Makefile? Or maybe my GCC version is too new for MBED? Here is my code:

Test_LEDs.cpp

//  Tests functionality of the 3 LEDs on the Pump Switch board
//  10/6/2014  TBC
//

#include "mbed.h"

DigitalOut LowBatt(PTD2, 1);
DigitalOut PwrFail(PTE4, 1);
DigitalOut OK(PTE5, 1);

int main( )
{
    float t = 0.1;
    while ( 1 )
    {
        LowBatt = 0;
        wait( t );
        LowBatt = 1;
        PwrFail = 0;
        wait( t );
        PwrFail = 1;
        OK = 0;
        wait( t );
        OK = 1;
    };
    return 0;
}

Thanks for your help.

Be the first to answer this question.