9 years, 8 months ago.

Import development branch of SDK online

Hello,

I am curious about the best way to import the latest development branch of the SDK to the online compiler. I want to use features that have not been published to the stable branch (LPC1549 CAN) and saw that I could import it as a library but not sure what else need to be done in order for it to compile correctly.

One reason I am asking is I figured this would be a good searchable subject. Any help would be appreciated.

Thanks

EDIT

I think the issues is making sure you import from the right location. It worked when I did it from this specific link.

http://mbed.org/users/mbed_official/code/mbed/

2 Answers

-deleted-
9 years, 8 months ago.

Hi Travis,

You can import the mbed-src repository https://mbed.org/users/mbed_official/code/mbed-src/. Every 15 minutes this repository is updated from the repository on github - http://github.com/mbedmicro/mbed/

Cheers,
Mihail

Accepted Answer

Ok, I have it imported it. I looked at the device.h and it says CAN is enabled in this library. But when I try to create CAN objects it does not work. Is the import "mbed.h" not how I should get the API working when mbed is imported this way?

Thanks

posted by Travis Travelstead 28 Jul 2014

Remember to delete the normal mbed library in your program

posted by -deleted- 28 Jul 2014

I did see that noted when so I deleted it before importing. I made a simple program to test the import. I used the CAN0 ISP default pins, so that should work.

Quick CAN test

#include "mbed.h"
CAN can1(P0_0, P0_11);

DigitalOut myled(LED1);

int main() {
    while(1) {
        myled = 1;
        wait(0.2);
        myled = 0;
        wait(0.2);
    }
}
posted by Travis Travelstead 28 Jul 2014
9 years, 8 months ago.

Hello Sam, for some reason I do not see anything in your answer.

posted by Travis Travelstead 28 Jul 2014

I imported your example and it compiles. What doesn't work?

posted by Sam Grove 28 Jul 2014

Is that with LPC1549?

Here are the compiler errors I get,

Error: Identifier "CAN" is undefined in "main.cpp", Line: 2, Col: 2

Error: Identifier "P0_0" is undefined in "main.cpp", Line: 2, Col: 10

Error: Expected a ")" in "main.cpp", Line: 2, Col: 14

posted by Travis Travelstead 29 Jul 2014

I tried importing it by running through the compiler to view the latest build of the mbed library. It seems to have worked. It would be nice if it was clearer on how to do this to avoid issues.

Thanks for the help

posted by Travis Travelstead 30 Jul 2014

I think the issues is making sure you import from the right location. It worked when I did it from this specific link.

http://mbed.org/users/mbed_official/code/mbed/

posted by Travis Travelstead 05 Aug 2014