9 years, 3 months ago.

use of mbed on commercial board

Hi There,

We are developing a board with an FPGA and would like to incorporate an mbed funcitonal co-processor to the FPGA. I have some questions about the feasibility of this? Can this be used commercially for end-customers?

I am new to mbed, so these are probably ignorant questions. Thanks for enlightening me.

1) Does the licensing of the mbed bootloader/ecosystem license allow this? I believe that it is based upon this post, but not sure if this was offitially posted by mbed folks. http://developer.mbed.org/users/chris/notebook/prototype-to-hardware/

2) Is the mbed bootloader source code available for modifications?

3) Probably ignorant question: Is there an mbed bootloader that does not require a seperate supoort chip? IE can the mbed or variant bootloader be loader directly onto the targe mbed MCU? The following link does not mention it, but thought I would check? http://developer.mbed.org/handbook/cmsis-dap-interface-firmware

4) If options 3 is not avialble would it be possible to use mbed with an external Segger or alternative SWD loader/debugger?

Thanks for the info.

2 Answers

9 years, 3 months ago.

For the Mbed LPC1768, I would look at the LPCXpresso boards for your bootloader:

http://www.embeddedartists.com/products/lpcxpresso/lpc1769_xpr.php

The Jtag part can be cut off the MCU part and this can be used to program your own production LPC1768 board via Flash Magic.

Your .BIN program code from Mbed will need to converted to .HEX with something like this:

http://sourceforge.net/projects/hexplorer/files/

Open you Mbed .BIN file and simply export the Intel .HEX file that can be opened in Flash Magic and down loaded via the LPCXpresso Jtag part.

Used this many times and works fine.

We will be using freescale kinets. Any idea if the .bin to hex would work the same way on the kinetis parts using segger or other JTAG programmer?

posted by M J 19 Jan 2015

Any program for any of the current Freescale platforms developed on Mbed will be in a .BIN format. You can use the relevant FRDM board to directly program your own project Target MCU via the 10 pin SWD connector.

This goes back a bit but will give you an idea:

http://developer.mbed.org/cookbook/Prototype-To-Hardware-KL25Z

If you do not want the extra hardware and cost of the SWD interface MCU (currently a K20 chip), your project board can be programmed either by the FRDM board as a 'drag n drop' the same as you use it on Mbed, or you can convert the .BIN file to .HEX and use the segger J-Flash unit.

Segger J-Flash around £500, FRDM board around £20, no extra cost and complexity of adding a SWD MCU (with flashing firmware) to your production board.

The only downside is field software updates if you need this, you would have to supply a programmer, simplest option there would be a FRDM board.

posted by Paul Staron 20 Jan 2015
9 years, 3 months ago.

How do you mean embedding a co-processor to the FPGA? If you mean programming it into the FPGA itself, then you would need a license on an ARM core. The peripherals and such are all IP of the different companies producing the MCUs. If you mean using it as co-processor besides an FPGA, then there is no problem.

The mbed bootloader is here available (note, not all of them are open source, such as the ST link one afaik, Freescale and NXP bootloaders are open source): https://github.com/mbedmicro/CMSIS-DAP

The mbed bootloader is always implemented on a seperate target. You can of course make your own bootloader, but that is far from trivial. MCUs can also have integrated bootloaders. For example all NXP MCUs have an integrated serial bootloader (so you can program it with any USB <> serial bridge), and part of the MCUs with USB (such as the LPC11uXX series) also have a drag-and-drop USB bootloader integrated (doesn't work as nice as the mbed one imo, but it does work).

And last one: yes.

The ARM will be an external processor.

Unfortunately I will not be able to use second onboard processor, which sounds like it would pre-clude the use of the direct use of cmsis dap or any of the current mbed bootloaders.

In the case that we only use the target MCU, it sounds like the only options would be to convert theh mbed .bin file to .hex or .elf for the kinetis and potentially implement an non-mbed bootloader to self load the program file.

So in summary, it based on the information received.

  • I cannot implement a native mbed bootloader without having a second dedicated MCU
  • the only options to use the mbed .bin would be convert to kinetis compatible program file - Load the converted file using external jtag or serial loader without using a bootloader - Implement a custom bootloader on the target MCU that would self load teh converted program file

Is this right? Any other ideas?

Thanks!

posted by M J 19 Jan 2015

That seems to sum it up yes. If you use an external programmer they might sometimes except bin also, and hex file can always be generated from bin. An alternative if you use same MCU as one of the mbed enabled Freescale devices it is possible to add some jumpers to the corresponding FRDM board, and then use it as programmer for your MCU. Then it can be done on exactly the same way as a regular mbed board.

posted by Erik - 20 Jan 2015