lpcware

FreeRTOS sample uses different code to Code Red examples - LPC1343

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by mathseng on Sat Aug 10 05:12:36 MST 2013
Trying to find the relevant changes in the FreeRTOS Simple Demo for LPC1343, so that you can create a version for the LPC1347 or some other uC?

The startup code used in the sample does not correlate simply with the code in the LPCXpresso IDE LPCXpresso_5.2.6_2137, making difficult the matching for changes.

http://www.freertos.org/Interactive_Frames/Open_Frames.html?http://interactive.freertos.org/entries/315768-Very-simple-LPCXpresso-LPC1768-LPC1343-demo-using-LPCXpresso-IDE contains the sample FreeRTOS project, where the startup code cr_startup_lpc13.c is different to the code supplied in LPCXpresso and RedSuite5-Windows.

A copy of the LPC1343 code which appears to be the base for the code in the sample project can be found at https://github.com/PSU-UROV/Control.
The code is copyrighted as "Copyright (c) 2009-10 Code Red Technologies Ltd."

Comparing these two files show the following differences:
+ Add the following lines at the end of the section "// Forward declaration of the specific IRQ handlers"
extern void xPortSysTickHandler(void);
extern void xPortPendSVHandler(void);
extern void vPortSVCHandler( void );

+ Modify the Vector Table starting with line "void (* const g_pfnVectors[])(void) = {", by changing the 3 vectors to be:
        vPortSVCHandler,                        // SVCall handler
xPortPendSVHandler,                     // The PendSV handler
xPortSysTickHandler,                    // The SysTick handler

Outcomes