Hello Fellows,
Newbie here, be patient with me ;-).
I spent few hours for the last 4 days on and off trying to find a solution before posting here. It seems some folks have this working since earlier this year with GCC4mbed.
Is GCC4meb required for us to be able to use eclipse compiling mbed code if we already have set and environment using eclipse to cross compiler to ARM? i.e., KDS 3.x (Kinetis Development Studio)
That is, if we have KDS working including debugging, why can't we use the mbed IDE export project to KDS, then import in KDS and do a build it all?
I was under impression that this was the cool advertised part of the export from the mbed IDE... The sources would come along with the project and one could build it all in the particular off-line environment.
Of course, I am writing this note to you because the export/import/build is failing for me with the simple mbed Blinky on K64F platform. I can post exactly the errors to you here. But so I don't look too silly, first I decided to ask if this was supposed to be plug and play process in December 2016 (vs. earlier in the year requiring gcc4meb) or I should install some pre-compiled mbed OS libraries in the KDS environment first and or gcc4mbed is required.
PlatformIO import/compile worked compiling mbed exampled. But having the pay* to use the debugging functionality wont work for us.
Thank you! -Jack
Here is the error I get
With a simple HelloWorld code:
"
../main.cpp:3:23: error: call to 'mbed::Serial::Serial(PinName, PinName, const char*, int)' uses the default argument for parameter 4, which is not yet defined
Serial pc(USBTX, USBRX); // tx, rx
"
Code:
#include "mbed.h"
Serial pc(USBTX, USBRX); // tx, rx
int i=0;
int main() {
while(i<=10){
pc.printf("Hello World!\n");
i++;
}
}
I am pretty sure it is because KDS is not getting the mbed libraries. I don't know how to do that. I export the mbed project from the mbed online IDE to a KDS format. Then import in in KDS. Could not be that easy huh...
I hoped the source for mbed was being exported with the project and KDS would build it all.
I know other people had work done on GCC4mbed earlier. Do we still need to do that kind of work to export / import mdeb to KDS?
Thanks,
-Jack
Hello Jack,
Sorry we have any official document about how to porting MBED project to KDS.
I also can not be sure whether the MBED project can ported to KDS, recommend you
can ask the MBED expert .
And if you have the library file about the function "Serial pc" , you need add the lib
like this :
mmCAU linker error in KDSv3.2 for K64F
BR
Alice
Hi Alice,
Exporting from the mbed IDE to KDS is one of the options. Not sure why it is not working. It works to KEIL, of course KEIL now is own by ARM.
I have been doing lots of reading and testing to try to get this done.
Thanks,
-Jack
Hello Jack,
- Firstly thanks for your sharing .
I also refered to your simple code did an experiment, yes , when build on KDS, it shows some error.
This is for in the file of "RawSerial.h" and "Serial.h" use the macro definition "MBED_CONF_PLATFORM_STDIO_BAUD_RATE " , it defined in the header file "mbed_config.h",
while the two file have not includes it .
- So the workaround is include the "mbed_config.h" :
Then build, download , it can work well , please have a try .
Hope it helps
Alice
Hi Alice,
Good news it worked.
I was able to get an example to work including RTOS from mbed.
I have been working on other projects. I will get back to it For some other exports still have some other errors. Definitively this is not a plug and play as one may think.
In summary some progress, I will play with it again.
Thank you,
-Jack
Hi Alice,
Thanks for the reply.
The project opens in KDS and the build starts. It fails in some lines when the mbed declarations are found. I will post the error here once I am back to the computer I am using for the development.
I was hoping to try what one knows is needed to have mbed project build in KDS so I know at least that I was doing the basic setup correctly. Then if it did not work, I would ask for help.
Too many reasons why I, and many people, may want to use mbed. The ecosystem for IoT, the libraries, and abstraction layer enabling different hardware use are very attractive. If their IDE had off-line capability and remote debugging I would be all set. At the moment I believe they don't support these.
There is a way to export the project from mbed on-line IDE to KDS, but for some reason it is not plug and play. I don't know why.I could not get what is needed for the documentation I found so far. I thought the whole source code would come on the export so I could build in KDS. It does no seem the case, or the correct build in the project setting is not coming over. Basically, I new to it.
I see people having to do development to make mbed work in KDS e.g., GCC4mbed. I was hoping that at this point the export / import would be close to plug and play so I could teach my robotics team to use it. They are middle and high school students. That is, spend the time in the development of our robots vs. in the development environment.
Thanks,
-Jack
Hello Jack,
For the MBED IDE is not developed by NXP, so i have not used it.
While , if you open the MBED project on KDS failed , it prove we can not directly open it .
So why do you development your project directly on KDS and then debug ?
Or if your project have developed on MBED, the simple way is creating a project on KDS,
then copy the application code into it .
BR
Alice