Reliably Taking mbed & mbed-rtos to a Local Development Environment (FRDM-K22F)

31 Dec 2014

Hello,

So there are two sub-topics to my post.

1) At DerbyCon 4.0 this year, I gave a talk in which I highlighted mbed.org as an alternative to Arduino. I specifically highlighted the fact that one can build an mbed project for a Freescale Freedom board, export it to Kinetis Design Studio (KDS) and debug it locally. As highlighted in the following item, while I worked through some issues, I can't reliably run mbed-rtos locally with KDS on my FRDM-K22F board. Also, I exported an STM32 mbed project to em::blocks last night as an experiment and it didn't build, and I see other folks having difficulty exporting their projects. I am concerned I may have jumped the gun in recommending mbed.org, at least for professional projects.

2) As alluded to above, I have a work project on an insane timeline and was hoping to leverage mbed to get it into a pre-production state ASAP. I had a great architecture started and a good initial demo using mbed and mbed-rtos, but mbed-rtos is not working when compiled from KDS. I fear I need to fall back on another RTOS, and possibly discard the mbed effort entirely and re-start from scratch.

So the general question is whether folks have had success in getting mbed & med-rtos to work reliably in a local build environment, and if so, how? More specifically, I need to know if I need to more or less abandon mbed for my K22F project, or if I want to consider another possible toolchain that supports the K22F and mbed, but then isolates me from Freescale's own toolchain? At this point, I think I need to walk away from mbed, but I think I will look for helpful feedback and make that decision next year. ;)

Thank you, and Happy New Year.

31 Dec 2014

PS - Related to #1, if one were to recommend a complete mbed to local toolchain and platform, what would be the best combination, assuming one exists that is robust and production ready.

31 Dec 2014

I can't help you much with this one since I prety much never work local.

But in principle if you are free platform wise, the LPC1768 would be closest to K22F which is most mature one. Toolchain wise the online compiler is based on Keil afaik, so you got best shot it will run using Keil.

31 Dec 2014

Thanks Erik for your response.

Thor - a few comments:

Quote:

I see other folks having difficulty exporting their projects

Exporting gives a lot of freedom but is mainly contributed by the community, pretty cool! If there are problems a few things - exporters operate under the assumption that you're working with the latest version of mbed libraries. All repositories are exported so you can upgrade and downgrade revisions once exported but this doesnt update project files (ie file names and direcotry structures can change between versions). This is where all the development for mbed tools happens. If you have a specific problem nailed down, you can contribute a fix or just report a clear way to reproduce. https://github.com/mbedmicro/mbed

Quote:

So the general question is whether folks have had success in getting mbed & med-rtos to work reliably in a local build environment

The mbed online tools use armcc so the closest thing to that, as Erik mentioned, is Keil MDK. Note the exporters are specifically for UV4.

HTH

01 Jan 2015

@Thor,

share the program which we can test. As Sam highlighted, look at github repository.

Don't give up that easily ;)

05 Jan 2015

Thank you all for the feedback. I appreciate very much that so much of what goes on in mbed is on a voluntary basis, and just want to note that your contributions are most appreciated.

Given that mbed does not, and perhaps cannot, support hardware debugging, I think an eventual migration to a local build environment is necessary for most commercial projects. In our case, we have some very specific application code that was provided directly by Freescale for KDS, so we cannot easily divorce ourselves from KDS.

Keep up the good work.

05 Jan 2015

@Thor, so what problems with KDS are there? Can you create a list and report it on github? https://github.com/mbedmicro/mbed/issues

There's at least one for KDS, that it generates error for .S files

09 Jan 2015

Thank you for offering, Martin. I have already restarted my development entirely in KDS and using the Kinetis SDK and Processor Expert. While I met with some initial issues, I am having more success and I am moving forward. I am now in the process of incorporating my initial work in mbed into KDS so at least some of that effort is seeing re-use.

If I can find the time, I would still like to see a completely smooth migration from mbed to a local environment that is solid for commercial applications and it looks like NXP is the place to look. At this point, unfortunately, that would be a personal project and I have zero time for personal projects at the moment.