This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

freertos in nrf51.

hello in nrf51 sdk, nordic has already ported freertos. but if i want to port myself. can anyone tell me how to do it??

first i downloaded freertos from website. but then how to port it in nrf51?? in which file should i change??

thanks

Parents
  • Do you mean port FreeRTOS or just add the source code and allready made port files to your project?

    I have only used FreeRTOS on 8bit AVR so far, by partially writing new port code. From what I learned:

    If you have not read the whole FreeRTOS manual, do it. I found it very good and it should not take too much time, it's well worth it.

    Porting is not trivial, but usually what you need to change is in './portable/[compiler]/port.c and portmacro.c' in the FreeRTOS source. This is not something you need to do or understand in order to use FreeRTOS. It includes writing assembler code to do context switching, and you need to have control on lowest level of programming. There are also some cortex specific things you need to take care of that I am not familiar with since my experience is from the AVR.

    If you want to install source files it is in essence:

    1 Download FreeRTOS source code
    2 Files of interest are in './FreeRTOSVx.x.x/FreeRTOS/Source' and '/portable'
    3 Find the 'FreeRTOSConfig.h' from a cortex m0 example, or use the one from nordic
    4 Include, add files and add paths to files so keils is configured to find and compile the files etc
    

    I would just use one of the examples, e.g. 'freeRTOS blinky' and build on that if I were you.

    More reading:

    www.freertos.org/FreeRTOS-quick-start-guide.html

    www.freertos.org/Creating-a-new-FreeRTOS-project.html

    www.freertos.org/FreeRTOS-porting-guide.html

Reply
  • Do you mean port FreeRTOS or just add the source code and allready made port files to your project?

    I have only used FreeRTOS on 8bit AVR so far, by partially writing new port code. From what I learned:

    If you have not read the whole FreeRTOS manual, do it. I found it very good and it should not take too much time, it's well worth it.

    Porting is not trivial, but usually what you need to change is in './portable/[compiler]/port.c and portmacro.c' in the FreeRTOS source. This is not something you need to do or understand in order to use FreeRTOS. It includes writing assembler code to do context switching, and you need to have control on lowest level of programming. There are also some cortex specific things you need to take care of that I am not familiar with since my experience is from the AVR.

    If you want to install source files it is in essence:

    1 Download FreeRTOS source code
    2 Files of interest are in './FreeRTOSVx.x.x/FreeRTOS/Source' and '/portable'
    3 Find the 'FreeRTOSConfig.h' from a cortex m0 example, or use the one from nordic
    4 Include, add files and add paths to files so keils is configured to find and compile the files etc
    

    I would just use one of the examples, e.g. 'freeRTOS blinky' and build on that if I were you.

    More reading:

    www.freertos.org/FreeRTOS-quick-start-guide.html

    www.freertos.org/Creating-a-new-FreeRTOS-project.html

    www.freertos.org/FreeRTOS-porting-guide.html

Children
No Data
Related