Hello all, a few questions:
Does anyone have or know where I can find a freeRTOS port for the K12 processor using IAR?
If there is a K10 port, would it cover the K12?
Yes I have checked freeRTOS.org, the only thing I can find there is a K60 IAR port.
Specifically I am using the MK12DX256
Thanks,
Hab
Solved! Go to Solution.
Have you assigned the following three vectors in your vector table?
DCD | vPortSVCHandler ;SVC_Handler | |
DCD | 0 | |
DCD | 0 | |
DCD | vPortPendSVHandler; PendSV_Handler | |
DCD | vPortTickHandler; SysTick_Handler |
(depends how you define your vector table, but you need to have above vectors set)
I hope this helps.
You can use the KL25Z port, as the K12/K15 is the same core (Cortex M0+).
There is even a Processor Expert version of it:
http://mcuoneclipse.com/2013/01/31/tutorial-iar-freertos-freedom-board/
Additionally, that GitHub site has static (without Processor Expert) ports.
I hope this helps,
Erich
Much thanks for responding. I am not sure I can use this because of the following concerns:
1. The K12 is an M4, the KL25 I belive is an M0.
2. The URL describes the need for 3 different software packages, IAR, PE driver suite, and additional PE components. We require all firmware be written in IAR.
But since you mentioned an M0, freeRTOS does have a K60 IAR demo project. The K60, like the K12 is an M4, but with more stuff. Can I use that port? If so, do you know if there anything I must do to the port to make it work for a K12 device?
Thanks,
Hab
Hi Hab,
yes, I realize that this is a M4, not an M0.
>>We require all firmware be written in IAR.
So IAR writes all your code? ;-) I guess you mean that your code is *compiled* with IAR. And this is the case for above case :-). IAR is still the tool you are using. And you can simply copy the code and place it into your project.
And yes, you could use that K60 port. Altough I think it might be somewhat outdated.
Or you could take the most recent port from
And then in the FreeRTOSconfig.h you change the core to M4. Should be very simple.
Erich
Any feedback on this?
Does this mean there is not a solution for Kinetis K1X on FreeRTOS?
I'm sorry, I missed your first reply. I see now your problem. Working on it right now.
Much thanks for your patience and support.
The supplied portasm.s complied, but the scheduler crashes when I run. vTaskStartScheduler() fails on a call to vPortStartFirstTask(). The processor fails on 2 vectors within vPortStartFirstTask(): Vector 11 on
line 199: svc 0
And the hard fault Vector 3
line 200: nop
To accomodate for the K12 (specificaly I am using the MK12DX256) I am making only 3 changes to the FreeRTOSConfig.h you supplied
line 93: #define configCPU_CLOCK_HZ 50000000u // WAS 48MHz
line 94: #define configBUS_CLOCK_HZ 50000000u // WAS 48MHz
line 172: #define configCPU_FAMILY configCPU_FAMILY_ARM_M4 // WAS configCPU_FAMILY_ARM_M0P
Help...
Have you assigned the following three vectors in your vector table?
DCD | vPortSVCHandler ;SVC_Handler | |
DCD | 0 | |
DCD | 0 | |
DCD | vPortPendSVHandler; PendSV_Handler | |
DCD | vPortTickHandler; SysTick_Handler |
(depends how you define your vector table, but you need to have above vectors set)
I hope this helps.
I added the 3 handlers to my IRQ Vector Table and the two simple tasks I created for testing started working.
Many, many thanks for your time and your help!!!
Next I will add a few ISR to ready tasks just to make sure all works as it should. If I have any additional questions can I post to this thread or should I start a new?
Much thanks for responding.
I modified my project and added the FreeRTOS to my project from the link. (First time using GitHub so that was an experience - painful). I changed FreeRTOSconfig.h to use M4 core as suggested.
Defining the M4 core in FreeRTOSconfig.h causes the file portasm.s to require a definition for pxCurrentTCBConst and pxCurrentTCBConst2 which are undefined. I searched the FreeRTOS directory and the project but could not find a definition for these - Help...
Thanks,
Hab