FreeRTOS sample uses different code to Code Red examples - LPC1343

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FreeRTOS sample uses different code to Code Red examples - LPC1343

1,066 Views
lpcware
NXP Employee
NXP Employee
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/... 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

Labels (1)
0 Kudos
Reply
2 Replies

972 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mathseng on Tue Aug 13 03:56:29 MST 2013
Thanks Takashi.
Like others, I have the LPCXpresso LPC1347, and wanted working code to ensure that I had a good base to carry on from.
A member of our team has the LPC1343 board, and had no problems with the sample, and I was frustrated that the Simple Demo (along with other more complex projects), did not work.

My approach was to determine what was done for this really simple port to work, get concrete actions/processes, then abstract from that.

My result is that I have now a working LPC1347 version of the Simple Demo, and am now experimenting with the operation of FreeRTOS to make a base for our application. I also have a much better understanding of the chip and the IDE process.

For those who would like my version, which they can compare with the IDE base code and the LPC1343 demo code, attached is FreeRTOS-simple-demo-for-LPCXpresso-LPC1347.zip - this complies with the documentation "FR-191-AN-RB-003i2-[A simple FreeRTOS demo for the LPCXpresso].pdf"

Bill.
0 Kudos
Reply

972 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tmune on Mon Aug 12 23:32:32 MST 2013
You may look at lpcopen v1.03 examples. It includes nxp_xpresso_1347_freertos_blinky as one of the examples. I have not tried it yet but some other examples are compiled and run ok.
Takashi
0 Kudos
Reply