Affordable and flexible platform to ease prototyping using a STM32F103RBT6 microcontroller.

Offline compiling problem with emBlocks ST Nucleo F103RB

05 Dec 2014

When i am compiling file offline the emblocks IDE is showing following error messages

== mbed_blinky, mbed_blinky ===

.objs\main.o||In function `DigitalOut':| C:\Users\Shuzon\Desktop\mbed_blinky\mbed\DigitalOut.h:49||undefined reference to `gpio_init_out'| c:\program files (x86)\emblocks\2.30\share\em_armgcc\bin\..\lib\gcc\arm-none-eabi\4.7.3\..\..\..\..\arm-none-eabi\lib\armv7-m\crt0.o||In function `_start':| (.text+0x4a)||undefined reference to `wrap_main'|

== Build finished: 2 errors, 0 warnings (0 minutes, 1 seconds) ===

undefined reference to `gpio_init_out' and undefined reference to `wrap_main' any idea how to solve the problem ?? /media/uploads/shuzon/1.png

05 Dec 2014

/media/uploads/shuzon/2.png

06 Dec 2014

not so far...

14 Dec 2014

Remove the line (which includes the word wrap) from Project build options | Linker settings | Other options

Leaving Other options blank fixed this link error for me in emBlocks.

14 Dec 2014

thanks Kit Adams !

14 Dec 2014

I am still getting this error ! /media/uploads/shuzon/6.png

14 Dec 2014

Any solution ??

14 Dec 2014
14 Dec 2014
14 Dec 2014
15 Dec 2014

It looks like you are not linking to the mbed library. Also your main.cpp looks different from the mbed one I get:

#include "mbed.h"

DigitalOut myled(LED1);

int main() {
    while(1) {
        myled = 1; // LED is ON
        wait(0.2); // 200 ms
        myled = 0; // LED is OFF
        wait(1.0); // 1 sec
    }
}

I find that the latest version of this project, created on mbed and exported for emblocks, compiles and links without errors in emblocks 2.30 even with the "wrap" linker options present. I only needed to remove that option for an older exported project which linked against some older files.

I suggest you start again, creating a new version of the blinky project for your hardware on mbed and export it again.

15 Dec 2014

no luck with the offline compiler.... thanks by the way

15 Dec 2014

Can you send me your project files ??

16 Dec 2014

I only have a Nucleo F401RE, so here is the complete emblocks project: /media/uploads/spinorkit/nucleo_blink_ledf401re.zip

16 Dec 2014

Emblocks compilel F401 fine but do not compile F103