I've decided to get into ARM development, but not vendor specific. Looking at freertos, it seems to support a number of ARM MCUs. I also read about mbed OS, which at least sounds like it will work on lower-end devices than freertos.
I'm thinking of starting with a 32K or even 16K stm32f030, which I think is too small for freertos. Anyone know about mbed OS?
I don't like much about mbed. It's like too much like Arduino for me to consider for a serious project.
I've been using Keil's RTX. Which like FreeRTOS (can be?) it's a CMSIS RTOS. So the idea is you could plug in any RTOS under the CMSIS layer. I've been very happy with it so far while staying under 32K rom.
I don't like much about mbed. It's like too much like Arduino for me to consider for a serious project.
I've been using Keil's RTX. Which like FreeRTOS (can be?) it's a CMSIS RTOS. So the idea is you could plug in any RTOS under the CMSIS layer. I've been very happy with it so far while staying under 32K rom.
Looking at the mbed library API, it does look arduino-ish. Looking at the source I see the mbed OS uses the same DigitalIO API.
https://github.com/ARMmbed/mbed-osI forgot to mention that I'm only interested in open-source, so Keil is out.
https://github.com/ChibiOS/ChibiOS/blob/master/os/nil/src/nil.c
ChibiOS/RT looks more interesting than nil, since the comparison page says it is CMSIS-RTOS compatible. The docs say 2-6KB for RT vs ~1KB for nil.
I wish they had a clear list of supported MCUs. The release notes have lots of references to STM32F parts, but I don't see any LPC parts listed.
Keil's RTX is free now, although I can't remember if it's open source or not. It didn't used to be free.
All I know is that I've been using RTX since June, and while I know I'm not pushing it hard, I've been very pleased with the performance and it's been bug free. I've even done things I was sure were going to mess it up (100% thread loads and some weird messaging/signaling) and it just chugged right through.
So either way, whichever you pick, I'd definitely select a CMSIS RTOS as it's not a lot of overhead but would make switching to other options infinitely easier.
In general CMSIS is a very thin layer (basically the systick timer and interrupt controller) so any RTOS written for an ARM Cortex Mx series is likely to be CMSIS based even if it doesn't specifically says so.
Unless you have a good commercial reason to do so, I'd skip the ARM chips with the smallest memory. Go for a device with at least 256k; the incremental cost is tiny, and you'll find your code size does tend to be larger than it would be on an 8-bit device.
Unless you have a good commercial reason to do so, I'd skip the ARM chips with the smallest memory. Go for a device with at least 256k; the incremental cost is tiny, and you'll find your code size does tend to be larger than it would be on an 8-bit device.
I can get 10pcs of f030k6 (32K flash) for $6.
The few 256K parts I've seen have been around $2 or more. Can you point to any in the $1 range?
I already have lots of Unix/C experience, so more complex projects I'd just go with an embedded linux solution such as openwrt and run it on a $7 wifi router stick.
Unless you have a good commercial reason to do so, I'd skip the ARM chips with the smallest memory. Go for a device with at least 256k; the incremental cost is tiny, and you'll find your code size does tend to be larger than it would be on an 8-bit device.
I can get 10pcs of f030k6 (32K flash) for $6.
The few 256K parts I've seen have been around $2 or more. Can you point to any in the $1 range?
I already have lots of Unix/C experience, so more complex projects I'd just go with an embedded linux solution such as openwrt and run it on a $7 wifi router stick.
I agree with Andy, stepping up in core is usually noticeably more expensive but stepping up in memory is (for me in the USA) only tiny increases. I'm also basing any prices on 1k units, so there is that.
The issue was for me, I wanted to use the smallest physical packages (32/36/48pin) and memory is just more limited in those. I've tossed up my hands on my latest project however, I'm just going to use a 512k 100pin STM32F4 because I don't want to have to think about external nor/nand for temporarily storing bootloader/application flashes.
http://dmitryfrank.com/projects/tneo
Interesting, but I'd like to go with an RTOS that has some traction in commercial products. If I learn something like freertos, I might be able to pick up some contract work related to it.
I don't like much about mbed. It's like too much like Arduino for me to consider for a serious project.
I've been using Keil's RTX. Which like FreeRTOS (can be?) it's a CMSIS RTOS. So the idea is you could plug in any RTOS under the CMSIS layer. I've been very happy with it so far while staying under 32K rom.
I think I'll do some reading on CMSIS-RTOS, and how compatible freertos is or is not.
Unless you have a good commercial reason to do so, I'd skip the ARM chips with the smallest memory. Go for a device with at least 256k; the incremental cost is tiny, and you'll find your code size does tend to be larger than it would be on an 8-bit device.
I can get 10pcs of f030k6 (32K flash) for $6.
The few 256K parts I've seen have been around $2 or more. Can you point to any in the $1 range?
Why make life hard for yourself for a few dollars? Just start with a big device. It will have more cool peripherals to play with and you don't run into memory problems just as things start to get fun!
In general CMSIS is a very thin layer (basically the systick timer and interrupt controller) so any RTOS written for an ARM Cortex Mx series is likely to be CMSIS based even if it doesn't specifically says so.
CMSIS-RTOS is an attempt at a standardised API for RTOSes, like eg. µITRON. If you download ARM's CMSIS distribution it includes the CMSIS-RTX implementation, which is actually Keil's BSD-licensed RTX kernel with an API wrapper. CMSIS-RTOS offers all the basic services you'd expect, but perhaps to not limit implementations it eg. offers only seven levels of task priorities (-3 to +3).
Thanks, that clears up some of the confusion.
If I understand it correctly, mbed OS is not based on CMSIS-RTOS.
Are you looking for an RTOS with or without peripheral abstraction?
https://github.com/ChibiOS/ChibiOS/blob/master/os/nil/src/nil.c
ChibiOS/RT looks more interesting than nil, since the comparison page says it is CMSIS-RTOS compatible. The docs say 2-6KB for RT vs ~1KB for nil.
I wish they had a clear list of supported MCUs. The release notes have lots of references to STM32F parts, but I don't see any LPC parts listed.
The kernel itself is made for ARM Cortex. That means that if you choose the compatible ARM instruction set, it'll run on
all targets.
For the HAL (Hardware Abstraction Layer) things are different.
IMHO, one problem with the existing RTOS is that "everything talks about IoT, but no one is doing anything about it".
There are two classes of microcontrollers: the "big" ones where they handle the kitchen sink tasks, and the little ones where they handle sensor data.
Show me an RTOS that scales both ends and make communication easy between all the systems, without using just TCP/IP or the like.
Keil's RTX is free now, although I can't remember if it's open source or not. It didn't used to be free.
yuck.
I selected CMSIS-RTOS RTX for a commercial project and have been using it for a year. It works well enough, but the code makes me hold my nose at times. ChibiOS is a much cleaner implementation IMO, but the licensing is more complicated.
Too bad their debugger is not.
Why so few ppl mention here freertos?
Because, contrary to the name, its not free. Only the pure kernel is.
Because, contrary to the name, its not free. Only the pure kernel is.
That needs some clarification.
FreeRTOS + TCP + FAT are available for Free under the GPL license.