Free RTOS on LPC4337 M0 Core

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

Free RTOS on LPC4337 M0 Core

697 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Alex on Thu Feb 07 01:38:41 MST 2013
Hi,

I'm trying to make FreeRTOS run on the M0 core of an LPC4337.

I used the ARM Cortex M0 generic port of FreeRTOS.

Because the M0 core does not have a Systick Timer I used timer 3 as Systick. The problem is, that when the first task has to be started I get a Hardfault Exception when performing the assembler instruction svc 0.

Any ideas why this happens?

This is the function where it happens:
vPortStartFirstTask:
cpsie i /* Globally enable interrupts. */
svc 0 /* System call to start first task. */
nop

Best regards,
Alex
Labels (1)
0 Kudos
4 Replies

546 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Alex on Fri Feb 08 01:15:11 MST 2013
Hi Bernhard,

I got it working. Thank you.

Best regards,
Alex
0 Kudos

546 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bavarian on Thu Feb 07 11:01:39 MST 2013
Hello Alex,

it seems to be finished. It's running fine on both cores at the same time.
Go to this project: \lpcopen\applications\lpc18xx_43xx\examples\dualcore_43xx\blinky_freertos

You need to generate the right board library before you compile the dualcore_blinky_freertos project: hope you have the KEIL MCB4357 board
- compile lib_lpc_boards_18xx_43xx for both cores
- compile dualcore_blinky_freertos for the M0 and flash it
- compile dualcore_blinky_freertos for the M4 and flash it
- reset
- look at the UART port, jumper it for UART3

Then you can strip down the M4 project if you don't need an OS there.

Hope this helps,
Bernhard.
0 Kudos

546 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Alex on Thu Feb 07 07:10:01 MST 2013
Hi Rolf,

I did not know that this exists. Seems to be a good starting point for RTOS implementation.

Does it really support FreeRTOS on the M0 core? All I read so far is that the M0 port is not finished yet.

Best regards,
Alex
0 Kudos

546 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by DF9DQ on Thu Feb 07 05:58:36 MST 2013
Hi Alex,

Did you have a look at LPCOpen?
http://www.lpcware.com/content/project/lpcopen-platform-nxp-lpc-microcontrollers

It has FreeRTOS ports running on the M4 and M0 core of the LPC43xx, and may save you some time debugging the issue.

Regards,
Rolf
0 Kudos