Actions

EmSys

Difference between revisions of "Configure FreeRTOS Demo Project Interrupt Handlers"

From EdWiki

(Created page with "FreeRTOS requires the use of several hardware interrupts/peripherals to function, notably the SysTick feature for its RTOS tick and the software interrupt calls SVCall and Pen...")
 
m
 
Line 1: Line 1:
 +
== Configure FreeRTOS Demo Project Interrupt Handlers ==
 +
 
FreeRTOS requires the use of several hardware interrupts/peripherals to function, notably the SysTick feature for its RTOS tick and the software interrupt calls SVCall and PendSV for its internal operation (or rather, how RTOS tasks perform system calls of the kernel).
 
FreeRTOS requires the use of several hardware interrupts/peripherals to function, notably the SysTick feature for its RTOS tick and the software interrupt calls SVCall and PendSV for its internal operation (or rather, how RTOS tasks perform system calls of the kernel).
  
First off, what functions does it provide for these interrupts?  Check the portable port.c file:
+
First off, what functions does it provide for these interrupts?  Check the portable ''port.c'' file:
  
 
[[image:freertos_on_tm4c123_portc_010.png|thumb|center|port.c]]
 
[[image:freertos_on_tm4c123_portc_010.png|thumb|center|port.c]]
  
All ARM projects include a special .c file for the Interrupt Vector Table and C init runtime functions (reset vector, Fault, NMI, etc). This is "tm4c123gh6pm_startup_ccs_gcc.c" in our case.
+
All ARM projects include a special ''.c'' file for the Interrupt Vector Table and C init runtime functions (reset vector, Fault, NMI, etc). This is "''tm4c123gh6pm_startup_ccs_gcc.c''" in our case.
  
 
Let's declare those interrupt handler functions with the "extern" keyword in our vector table file:
 
Let's declare those interrupt handler functions with the "extern" keyword in our vector table file:

Latest revision as of 10:36, 10 February 2017

Configure FreeRTOS Demo Project Interrupt Handlers

FreeRTOS requires the use of several hardware interrupts/peripherals to function, notably the SysTick feature for its RTOS tick and the software interrupt calls SVCall and PendSV for its internal operation (or rather, how RTOS tasks perform system calls of the kernel).

First off, what functions does it provide for these interrupts? Check the portable port.c file:

port.c

All ARM projects include a special .c file for the Interrupt Vector Table and C init runtime functions (reset vector, Fault, NMI, etc). This is "tm4c123gh6pm_startup_ccs_gcc.c" in our case.

Let's declare those interrupt handler functions with the "extern" keyword in our vector table file:

IRQ Handlers

Then, place those function names (pointers to those functions) in the correct slots in the interrupt vector table itself:

IRQ Handlers