Hi,
I would like to compile my program offline (the toolchain uses scons, python and gcc) as a library which will be linked with the online compiler (for Ethernet class).
I succeed to build an arm-gcc crosscompiler with http://github.com/esden/summon-arm-toolchain and created a simple main.c
int getLed()
{
        static int i = 0;
        i = (i + 1)%16;
        return i;
}
If I compile it with
../sat/bin/arm-none-eabi-gcc -o getLed.o -c main.c
and import it as a file (library don't work) in the mbed compiler I obtain :
"Cannot link object getLed.o as its attributes are incompatible with the image attributes. (EL6242E)"
So it tries to link with my .o file => good point.
I fixed the error with --short-wchar :
../sat/bin/arm-none-eabi-gcc -o getLed.o -c main.c --short-wchar
But now, the online comiler says :
Undefined symbol getLed() (referred from main.cpp.cpp.LPC1768.o). (EL6218E)
The main.cpp file is :
#include "mbed.h"
BusOut leds(LED4,LED3,LED2,LED1);
int getLed();
int main() {
    while (1) {
        leds = getLed();
        wait(0.2);
    }
}
And the getLed.o file is available here : http://demo.ovh.net/fr/2630abdcc8996edb92f1f1e0995de472/
If anyone have an idea ... ?
                 
             
        
Hi,
I would like to compile my program offline (the toolchain uses scons, python and gcc) as a library which will be linked with the online compiler (for Ethernet class).
I succeed to build an arm-gcc crosscompiler with http://github.com/esden/summon-arm-toolchain and created a simple main.c
int getLed() { static int i = 0; i = (i + 1)%16; return i; }If I compile it with
and import it as a file (library don't work) in the mbed compiler I obtain :
So it tries to link with my .o file => good point.
I fixed the error with --short-wchar :
But now, the online comiler says :
The main.cpp file is :
#include "mbed.h" BusOut leds(LED4,LED3,LED2,LED1); int getLed(); int main() { while (1) { leds = getLed(); wait(0.2); } }And the getLed.o file is available here : http://demo.ovh.net/fr/2630abdcc8996edb92f1f1e0995de472/
If anyone have an idea ... ?