Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training


Standard/Stub portmaco.h file available?

Posted by spyrophonics on June 15, 2016

Hello everyone,

I am currently in the process of migrating FreeRTOS to an unavailable architecture. I have read the "Quick Start Guide", the "Porting Guide" and basically the whole "FreeRTOS" branch of the main website.

One thing I coudn't find is a prototype portmacro.h!

Every guide tells me to either have a look at the demo applications and port one of them to my architecture or use a "clean portmacro.h" or "compil[e] the portable layer stubs". But I wasn't able to find a prototype or stub version of portmacro.h or port.c anywhere on the website.

Is there a stub version of those files, or do I have to basically go through the whole FreeRTOS code and search for functions I need to implement myself?

I mean, the "How FreeRTOS Works" guide gives a rough overview of very, very basic functions to implement, which is nice. But is there a stub version of those files containing a list of every function that can(!) be implemented? Needless to say, that I might need them all, but for implementation from scratch that would be very helpful ;)

Cheers, Peter

Standard/Stub portmaco.h file available?

Posted by rtel on June 15, 2016

The functions that must be implemented in the portable layer are those for which the prototype can be found in FreeRTOS/source/include/portable.h.

The best portmacro.h file to use as a base is then really dependent on whether your port is going to support interrupt nesting or not. If it is then I would suggest using one of the Cortex-M3 portmacro.h header files as a base. Otherwise perhaps one of the ARM7 portmacro.h header files.

Once you have an appropriate starting point for the portmacro.h file you can delete the implementations of the macros, and implement them to be appropriate for your hardware.

There is a very old page, which is probably out of date, here: http://www.freertos.org/FreeRTOS-porting-guide.html

Standard/Stub portmaco.h file available?

Posted by spyrophonics on June 17, 2016

I went through all the demo files myself and created a basic stub file which seems to be a good average of all portmacro.h files. Maybe it helps other people porting.

Cheers, Peter


portmacro_stub.h (6384 bytes)

[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists