FreeRTOS Demo for kinetis and CW 10.1

cancel
Showing results for 
Search instead for 
Did you mean: 

FreeRTOS Demo for kinetis and CW 10.1

1,417 Views
UB39
Contributor I

Hello!

 

There s a FreeRTOS demo for kinetis K60 an IAR but not for CW10.1 on the FreeRTOS homepage. Has anyone from you tried to use FreeRTOS for a kinetis K60 and CW 10.1?

And do you know if there s anywhere a most basic demo for K60 and CW 10.1?

 

Many thanks

0 Kudos
3 Replies

226 Views
BlackNight
NXP Employee
NXP Employee

Yes. I just completed a Processor Expert Example project and Kinetis (K60). The demo is running 4 tasks on the TWR-K60 board flashing the 4 LED's on the board as a basic example.

You can get the demo (with the needed port and Processor Expert components from

http://www.steinerberg.com/EmbeddedComponents/Example_TWR-MK60_FreeRTOS/home.htm

 

I used MCU10.2beta, but you should be able to use the project as well with 10.1.

The only thing is that 10.1 has a bug that you need to to have the .ProcessorExpert.g_c and .ProcessorExpert.g_x present in your project (otherwise Processor Expert will regenereate/overwrite your Events.c and ProcessorExpert.c file).

MCU10.2beta has this bug fixed, as such I do not need usually to distribute these (rather huge) files).

 

That's why I have attached here the full zip file with all the generated sources so you can have a look. See as well the readme.txt if you want to use the component with your own project.

 

BK

0 Kudos

226 Views
mattj
Contributor II

Hello,

I just try to get FreeRTOS to run under CW 10.2 with GCC compiler.  I have also tried to download the original FreeRTOS sources and use the GCC / ARM_CM4 portable files. All compiles fine except the vPortSVCHandler and xPortPendSVHandler functions, that end up in illegal operand error. I first wanted to use the CM3 file but there is an addition orr r14 , 0xD instruction that will fail to compile and is not in the CM4F port.c. So I turned on hardware floating point support and changed the __VFP_FP__ macro to __VFPV4_ as it is called in the GCC, now the only problematic lines are

"    ldr    r3, pxCurrentTCBConst2        \n" and

"pxCurrentTCBConst2: .word pxCurrentTCB                \n"

I assume there is some asm syntax problem but I cannot identify this yet , any ideas?

I've also downloaded and installed the FreeRTOS and Utility processor packages from your website and it works but it the handlers are in asm only and the orr function is used (still don't know what it does.

0 Kudos

226 Views
BlackNight
NXP Employee
NXP Employee

Hello,

with CodeWarrior for MCU10.2 you would have to integrate gcc yourself. A much better way would be to use CodeWarrior for MCU10.3 which already has ARM gcc nicely integrated.

I have uploaded on

http://www.steinerberg.com/EmbeddedComponents/Examples/Example_TWR-MK60_FreeRTOS/home.htm

a CodeWarrior MCU10.3 Eclipse based project with FreeRTOS for the Tower K60N512 board using the ARM gcc: it has 4 tasks blinking the 4 LEDs on the board.

I hope this helps,

Erich

0 Kudos