Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 5 months ago.
Moving the MBED library to other platform
Hi, I have used some of the MBed development boards to develop some code. Now I have designed my own PCB (with a similar processor, but a different footprint). Then it is not possible anymore to download code through the online compiler. Is it possible to take the MBed library and use it with an offline compiler and with another MCU and have it working? And is there some guides on how to do this? Do I need to do a lot of changes to the library to have it working with my MCU?
Hope someone can help.
Regards, Morten
3 Answers
7 years, 5 months ago.
You mean something like an off line command line interface for mbed like this? https://developer.mbed.org/blog/entry/windows-installer-for-mbed-cli/
7 years, 5 months ago.
The mbed online compiler generates normal binary files for the micro. You can use standard tools provided by the micro vendor to flash that file to the micro. The drag-and-drop programming provided on demo boards is just for convenience. For STM32 parts you would use say an STLink V2 debugger and and their STLink Utility application. On the target board of course you need to wire the programming pins to an external header for the debugger.
I would generally recommend against trying to add a new micro to mbed yourself. It is very complicated. You would have to be intimately familiar with both the target hardware and how the whole mbed stack works in order to create the required files. An exception might be if you find a micro supported by mbed and want to use the same part just with different amount of flash or ram. I haven't done this, but I believe that change should be relatively straight forward.
7 years, 5 months ago.
Morten You didn't state which processor brand you chose but let's just assume for the moment you picked an ST processor. If you look at the mbed library for the F446 processor you will see there are two footprints: 64 pin and 144 pin. In the target library folders for each processor respectively you will see which files ST had to modify to accommodate the different footprints even though they are both F446. You would need to modify a similar set of files for your target platform.
I picked this example since it is one of the few mbed boards with two different footprints but the same base processor. https://developer.mbed.org/platforms/ST-Nucleo-F446RE/ https://developer.mbed.org/platforms/ST-Nucleo-F446ZE/
The source for mbed os5 is on github. You will also need to get familiar with mbed-cli. Or alternatively you can use gcc4mbed which can support unique (custom) targets fairly easily.
Bill