7 years, 3 months ago.

How to port a mbed based project on a not supported microcontroller.

To create my project I have used a ST Arm demo board. Now the final device has come but it has a not mbed supported microcontroller. Is there a way to port my mbed project to this microsontroller or have I to rewrite all from 0?

1 Answer

7 years, 3 months ago.

Very straight forward. Depending on the mods it might take an hour in might take a week...experience required :)

Sources are here https://github.com/ARMmbed/mbed-os An online compiler ready-to-go version is called "mbed-dev"

Decide if you want to build online or offline. Any non-standard board will need a "TARGET" defined so the compiler can crawl down the correct branch(es) and locate the requisite code.

Start with the *closest* project/board you can find for your target. Import either the mbed-dev or github source. Be sure to remove the defacto "mbed" folder as that *is* the github compiled version. You are replacing it with a source-code version.

If you choose to use the online tools you'll need to keep with an existing "TARGET" name. Then modify the sources underneath that target's folder(s). You will need to get familiar with the mbed source layout. Most of the files you would have to alter reside under the target folders. Go into the folder of choice for the closest target (e.g.: TARGET_NUCLEO_F446RE) and look for pinmap related files. Then if you need to alter clocks or do some unique hardware init you can dig into the device folder underneath the target.

I would personally start online and import the source and alter the closest target to my end-project. Go one step at a time and it should be an easy conversion.

Once you have gotten something working you should figure out how to build the sources with CLI and add a unique target to the sources.

Post back if you need more help