The Freedom-K64F is an ultra-low-cost development platform for Kinetis K64, K63, and K24 MCUs.

mbed-rtos on Cortex-M4F FRDM boards

30 Dec 2014

I am working with a FRDM-K22F board. The K64F is the most similar board that has it's own forum, both being M4F processors and well populated boards. I was having good initial luck running mbed and mbed-rtos on my K22F board when compiled from the mbed compiler. However, when I exported to KDS, the mbed libraries appear to work but the mbed thread calls simply don't work. It might be that all of mbed-rtos won't work.

I am doing professional development on an insane schedule and was hoping to use mbed to speed my time to market. Obviously that is not looking too good right now.

Has anyone had good luck getting mbed-rtos to run natively in Kinetis Design Studio? Maybe there is a different code base I can work from?

THANKS! And Happy New Year.

30 Dec 2014

I spent a little time to see if mbed-RTOS could be ported to KDS - and it got painful - there are different low level architectures and there were some include files I couldn't find anywhere. On the mbed compiler downloads options there is an option for EmBlocks and KDS(that is greyed out)

I did do the EmBlocks download on a small project and verified it compiled locally. However I didn't go further with it as it meant investigating integrating all the tools with the EmBlocks toolchain.

I really like what is being attempted with mbed-RTOS - so it would be incredibly powerful to have the ability to download projects into KDS format and then be able to use the productive KDS toolchain. The KDS Processor Expert is really nice to be able to visually prototype a specific kinetis products hardware interface - however each processor expert is finely turned to a specific kinetis device - and even if you can download say a FRDM-K20D50 to a KDS , so far it doesn't seem possible with KDS2.0.1 to then change the processor to a K20Dxxx72,

In KDS/ProcExpert its even not possible to switch processor components between K20DX128xxx72 and KD20DX256xxx72 - a whole new error prone project has to be built from the base up on the new processor.

So switching between K64 and K22 is likely to be challenging, and I'd recommend you prototype the path you expect to take. The core of the issue is the NVIC implementations, but there are likely to also be multiple little differently named methods.

Currently, due to low confidence in the end-to-end mbed toolchain, I'm prototyping with KDS and FREE-RTOS and just keeping an eye on where mbed is going. So far I'm also concluding that for the mbed environment - its the exact processor that is being used, OR potentially a lot of work to change to another variant.

I see that I'm going to have to prototype the Kinetis hardware level access with KDS/ProcExpert and then freeze it and then port the code into my target environment.

30 Dec 2014

For what it's worth, in the case of calls to Thread::wait() the rtos somehow thinks the call is being made from an interrupt, rather than from the main() code, so it rejects the call with an OS error immediately. This makes me suspect that the mbed-rtos environment is not fully wrung out on Kinetis platforms, as you note. :(

31 Dec 2014

Hey guys - I see a lot of threads all over the place here and I think it'd be great to help each other out! If you're having a specific problem:

  1. Please publish that program and share a link so someone else can start from the exact same point you are.
  2. Post snippets from the problem you have. Just shouting that it does work isn't going to give people the option to look at the errors and shed some light
  3. Be as specific as possible

Some projects may not want to be shared publicly and if that's the case then just create a program with a test case and share that. Exporting gives a lot of freedom but also introduces a lot of variables that are used by a small number of people, not large number. That said, when you have a problem please create a example that shows it and publish we can try to help out. The platform is quite open and contributions welcome. Odds are someone had the same problem as you, maybe fixed it but lets get those patches brought back in so everyone can enjoy this!

Here to help - Sam