6 years ago.

Converting existing mbed Eclipse project to maintained makefile?

Hi, Can someone guide me to the documentation, or sequence the steps for this? I've found related information, but not quite this setup

I've inherited a project from a previous developer. Its in Eclipse and has a Makefile, which was being manually edited as the project grew. The Makefile was initially exported from mbed, but probably from an early version or template. I'm updating the mbed-os version to be used moving forward and making some other changes. I'd like to now import the code and generate the build config automatically not manually based on the old makefile.

I'd like to get this project to let Eclipse or tools within it manage and infer the Makefile. I also want to enable on-chip debugging. I have installed GNU MCU Eclipse Plug-ins etc. Previous developer used Make, but I'm flexible about changing

thanks in advance,

1 Answer

6 years ago.

You should be able to delete the manually maintained Makefile (keep a copy first), then use "mbed compile" to build the source files. "mbed export" will regenerate Makefile from the source files. See https://github.com/ARMmbed/mbed-cli for details.

Thanks, Lin, team Mbed

Thanks, Lin. I can see how to use mbed-cli to create a new project, or import something which will then update to the latest mbed components, but I'm not sure whats needed to get compile and export to work from a set of directories I've gathered together to handle prerequisites and some library code modifications. Its a bit hard to explain as I can't post the whole set to a forum, so I'll try with this example: lets say I started with a project and makefile from a previous mbed export that was then hand edited. This included a now out-of-date mbed-os and modified mbed hardware drivers. I now have downloaded mbed-os (15:47c194c843d5) that is newer but not the newest as I have a platform that requires this specific version of mbed-os. I don't want to overwrite the modified mbed hardware drivers.

Can I get help with the steps prior to mbed-cli compile? I want to be able to leave instructions if the platform updates to a newer mbed-os in the future for example and remove manual makefile editing

posted by Brad S 19 Dec 2018