7 years, 2 months ago.

Error: Undefined symbol $Super$$main (referred from retarget.o).

This error refers to the mbed C SDK. Is there a bug with this?

Question relating to:

Hello Roy Ortiz, what target? How can I reproduce this problem? Did you enable betamode?

Regards,
0xc0170

posted by Martin Kojtal 11 Dec 2013

Target LPC1768, I tried to compile example1 in MODSERIAL, I do not know how to enable betamode.

posted by Roy Ortiz 11 Dec 2013

How did you try to do that? The MOSERIAL examples are kinda iffy to use.

posted by Erik - 11 Dec 2013

Plug into LPC1768, Goto website, start compiler, import modserial, try to compile, import mbed C SDK, compile again, error. This my first attempt at using the mbed. I need to communicate to some serial devices. Is there something better than ModSerial?

posted by Roy Ortiz 11 Dec 2013

Unless you started with a blank program you should already have the mbed SDK. But if you haven't told it to compile example 1 it won't do so, and won't know what to do.

But you can also use regular Serial if there is no reason to use MODSERIAL: http://mbed.org/handbook/Serial

posted by Erik - 11 Dec 2013

I started with a blank program. The error is from the compile of example1. I will look into Serial. Thanks

posted by Roy Ortiz 11 Dec 2013

But how did you try to compile example1. If you don't tell it to compile specicially example 1 it won't do so. And MODSERIAL doesn't use the most straight forward ways for examples.

An example on how to compile example 1, make main.cpp, add:

#define COMPILE_EXAMPLE1_CODE_MODSERIAL
#define TX_PIN p9
#define RX_PIN p10
#define PC_BAUD 115200

#include "example1.cpp"
posted by Erik - 11 Dec 2013

Thanks, Now it is working. I thought that I could just open example1 and press the compile button. So does the mbed require a cpp named main? What are good examples for programs? Is the compile button only to be used on main.cpp?

posted by Roy Ortiz 11 Dec 2013

I am actually not sure if it requires a file main.c(pp), it is just standard practise.

However just opening the file doesn't do it. It tries to compile the project that your current open file is part of. But for example the example1 file requires the #define COMPILE_EXAMPLE1_CODE_MODSERIAL to actually be included in the project. There is no need to have your main file open when compiling.

Example wise I assume you did the getting started: http://mbed.org/handbook/mbed-NXP-LPC1768-Getting-Started. In general the handbook page has useful info: http://mbed.org/handbook/Homepage. Especially http://mbed.org/handbook/SerialPC is useful. Both because it shows serial communication which you have to do, and because that specifically is for serial communication with your PC, which is very useful for debugging.

posted by Erik - 11 Dec 2013
Be the first to answer this question.