Dear Developers,
I am trying to run FreeRTOS on MPS2 plus board for CM33.
but xPortStartScheduler fails and gets stuck at SecureHandler(Lockup addr PC: 0xEFFFFFFE).
It fails when trying to start the vStartFirstTask.
below is scatter loader file content
LR_IROM1 0x00000000 0x40000000
{ ER_IROM1 0x00000000 0x00200000
{ *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) .ANY (+XO) } RW_IRAM1 0x20000000 UNINIT 0x00200000
{ .ANY (+RW +ZI) } ARM_LIB_STACK (0x38200000) 0x600 { *(EMPTY) } ARM_LIB_HEAP (0x38200000+0x600) 0xC00 { *(EMPTY) }}
please help me to resolve this issue.
Thanks,
Deepak
Hi Deepak,
Which version/release of FreeRTOS are you using? (The previous releases for Cortex-M3/M4/M7 cannot be used on Cortex-M33).
regards,
Joseph
Hi Joseph,
Thanks for the quick reply.
I am using FreeRTOS v10.2.0 which is generated by CMSIS component Manager.
Regards,
Looking at FreeRTOS release notes
https://www.freertos.org/History.txt
There is some updates for Armv8-M support in v10.2.1. (Not sure if it is related to the issue you saw).
I am out-of-office for two weeks from tomorrow, but I dropped an email to our open source software team to see if they can have a look at this as well.
I tried with FreeRTOS v10.2.1 but the result is same it is getting crashed at vStartFirstTask();
While executing " svc %0 \n" /* System call to start the first task. */
I tried a few verifications steps as per FreeRTOS forum related to this issue, but I could not able to resolve this.
For your reference please find the project at link.
/cfs-file/__key/communityserver-discussions-components-files/469/7002.TestFreeRTOSCM33.zip
Please help me to resolve this issue.
Thanks & Regards,
I am on a business trip now so don't have any chance to help debugging this. As I mentioned I emailed a key member of our open source software team, but I can guarantee when this will be look at.
The link to your zip file doesn't seems to work.
Can you share more information?
* What model are you using on MPS2+? AN521?
* Are you using FreeRTOS with MPU enabled?
David Wang
Hi David,
I am using MPS2+ with disabled MPU.
Which subsystem you're running on MPS2+?
You can open the "MB\HBI0263C\board.txt" and check the APPFILE. (e.g. APPFILE: AN521\an521_v1.txt ; - Cortex-M33, means it's using an521)
I am using APPFILE: AN505\an505_v4.txt ; - Cortex-M33
Below is board.txt content
BOARD: HBI0263TITLE: Motherboard configuration file
[MCCS]MBBIOS: mbb_v220.ebf ;MB BIOS IMAGE
[APPLICATION NOTE] ;Please select the required processorAPPFILE: AN505\an505_v4.txt ; - Cortex-M33;APPFILE: AN386\an386_v3.txt ; - Cortex-M4
;APPFILE: AN382\an382_v3.txt ; - Cortex-M0;APPFILE: AN383\an383_v3.txt ; - Cortex-M0+;APPFILE: AN384\an384_v3.txt ; - Cortex-M1;APPFILE: AN385\an385_v3.txt ; - Cortex-M3;APPFILE: AN500\an500_v1.txt ; - Cortex-M7;APPFILE: AN387\an387_v4.txt ; - Cortex-M0 Design Start
After debugging further found an issue with stack pointer(in R0) at "SVC %0 " instruction which is esclated as FORCED HardFault Processor has escalated a configurable-priority exception to HardFault
HFSR-> 0x40000000
ICSR_S->0xB803
ICSR_NS->0xB803
CFSR_S-> 0x1000
MSP_S-> 0x454C4428 (Invalid as per vector table)
With this i suspect there is something wrong with Vectors table.
So can you please assist me to proceed ahead with these all information?
I'm asking the help from the team that has the experience on AN505.
I heard that you have already raised the ticket to support team. I think you will get the response soon. :)
(It's appreciated if you can share something here if you fixed it. Thanks.)
Have you solved your issue? I have the same issue now. May I know your solution?
Deepak said:at vStartFirstTask(); While executing " svc %0 \n" /* System call to start the first task. */
at vStartFirstTask();
...
Deepak said: vStartFirstTask.
Interesting. I saw similar issue on a TI chip with CM4 with FreeRTOS: it would not run past vStartFirstTask, and tracing instructions I saw it exactly stuck there, in svc 0 call.
But, on that specific chip with CM4, the problem was only while using a specific hardware monitor/debugger connected, and only in JTAG mode. In SWD it would run fine.
Probably won't help you at all here, but I'm keen to know how your problem will be resolved.