2 years, 7 months ago.

Can't start with mbed!

Hi!

I was looking to make some projects for LoRa. I found information that mbed has great support for it. Now when I wanted to check some real coding I have stuck on these questions:

  • How to make project for STM32 MCU not for evaluation board. Every information regarding target selection is about evaluation boards.
  • Can't get Mbed Studio working. Can't select target and can't download libraries.

Is mbed os ready or used for custom boards / commercial products? Do I have to do some magic to get started?

Kris

2 Answers

2 years, 7 months ago.

Mbed is designed for mbed supported evaluation boards.

If you have a board that uses the exact same CPU and clock speeds as an evaluation board then the mbed libraries will work fine. If you use something different then you will probably need to modify the target configuration parts of the libraries.

Mbed Studio is very new and only just out of alpha, it is not considered a finished product. The libraries themselves, the online compiler and off line command line interface are more mature and probably a better bet for a commercial product. Alternatively you can export from the mbed system into a 3rd party tool. e.g. I've use the mbed system for initial prototyping and then exported the project to keil and used that for building and maintaining commercial products based on mbed.

Accepted Answer
2 years, 7 months ago.

I can confirm I use mbed on custom boards. For example, I use the STM32L476VG micro. In mbed I just pretend I'm using the devboard DISCO-L476VG. I generally do not have to worry about the difference at all and run the same binary on devboard and custom target.

Most likely difference you may encounter is around the oscillator. But mbed startup code will automatically detect several clock sources and use them if available. Devboards are often clocked from stlink micro at a specific speed. If you use an 8MHz external crystal, mbed should detect and run from that. It will also roll over to internal oscillator if no external oscillator is present. Or as Andy indicates, compile from source and you can tweak the oscillator config in the startup code. Your STM32 devboard should have pads and jumpers so you test an 8MHz crystal.