This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

FreeRTOS size requirements

Other Parts Discussed in Thread: MSP430FR5739, MSP-EXP430FR5739, MSP430F5438

I just ordered the MSP-EXP430FR5739 FRAM development board, and one of the projects I have in mind for it requires an RTOS. Does anyone know if a slimmed down version of FreeRTOS will fit on the 16k of space on the MSP430FR5739?

  • Eric:

    Several months ago, I was choosing an RTOS for the F5529, and the only RTOS that came with example code for that part was PowerPac from IAR tools. I looked at FreeRTOS, but there would have been a LOT of work to convert things to the F5529 environment, and the PowerPac setup was very quickly done. We have since gone to the purchase version (Segger's embOS), but the PowerPac User's Guide has pretty much everything that I needed.

    Not sure what your IDE environment is, but if you use IAR Tools, I would strongly recommend PowerPac or embOS.

    Regards,

    Todd Anderson

  • There is an official FreeRTOS port to the MSP430X core, with an official demo for the MSP430F5438 now (with 16K or RAM if my memory serves).  It is quite new.  The IAR demo is documented here: http://www.freertos.org/Free-RTOS-for-MSP430X-MSP430F5438-Experimenter-Board-using-IAR.html if that is of any help.  There is a CCS demo too.

     

    Regards.

  • Dear FreeRTOS.org,

    Thanks for the response. I had seen that demo, but the issue is that the MSP430FR5739 has only 16kB of storage, and up to 1kB of SRAM. The MSP430FR5739 is a lot less equipped than the MSP430F5438 from the demo, so I am unsure if it can support FreeRTOS. Any thoughts?

    -Eric

  • Oh, I assumed the 16K was RAM.  I think you will luck out trying to squeeze it into 1K of RAM if you want a useful number of tasks.  Each task has its own stack, so RAM gets used there.  However, FreeRTOS also supports co-routines, which are ultra light weight co-operative threads that all share the same stack.  There are quite heavy usage restrictions though, and they are somewhat obsolete so not that well tested recently.  Most users these days have enough RAM not to need them.

     

  • Eric:

    I have not played with the FRAM part, but I thought one of the great things about FRAM was the abiiity to use as both program space AND data space. So you may actually have more than 1K that you could play with...

    However, that needs to be set up, and because you would be one of the first to incoporate the RTOS onto the part, you would be doing quite a bit of work to incorporate.

    Regards,

    Todd Anderson

  • I had expected to have at least the stack on SRAM.
    Having the stack on FRAM only makes sense if you have all registers in FRAM too (includign the PC), so you can continue after a pwoer fail (well, the hardware modules wouldn't like this anyway).

    However, what functionality do you need from RTOS? Most of the things available with it are easily (and often shorter/faster due to more specialized implementation)  implemented separately.

    E.g. my own preemptive (RTC tiemr interrupt based) multitasking code (including thread blocking based on certain triggers such as 'byte received on UART' or sleep delay) is just 904 bytes plus 18 bytes data. Plus 18 bytes info structure per thread and the stack for each thread. Including stack integrity checking.
    The cooperative version is even shorter.

    The complete code base including everything (I2C, 4 UARTs, SPI, DMA, LED control with PWM, timer functions, captouch, flash write, bootloader and ADC) takes ~12k. No file system and no application.

  • Hi Eric;

    If you are working within those memory constraints, you should check out: http://www.code-time.com/msp430.html

    If you look at their configuration tool, you can get the RAM sizings, as well as request a custom kernel.  For the MSP430, 1KB is more than enough.

    - Tony

**Attention** This is a public forum