The code is the FreeRTOS that I've built/run on the cpu0 of a twr-ls1021a board. I'm able to copy the code into ram and launch it from u-boot prompt. It works fine.
Then I run another code with cpu 0 to wake up the cpu 1 and put it running the FreeRTOS code. I can trace the execution of cpu 1 until the moment where the first task is to be started. Then I don't know what's happening but the cpu 1 doesn't jump to the right address.
What can cause this bug? It's possible that it comes from the mmu, caches, etc enabled by u-boot on cpu 0 but NOT enabled on cpu 1?
Regards,
Yaset
Do you use an SMP version of FreeRTOS? See the following page:
https://sourceforge.net/p/freertos/discussion/382005/thread/b74e2952/
See also the following pages:
http://zedboard.org/content/freertos-running-both-arm-cores
and
http://www.rbccps.org/wp-content/uploads/2017/10/06961844.pdf
https://github.com/n-aizu/freertos-multicore
NXP offers Linux BSP for the TWR-LS1021a board:
and
This BSP contains u-boot bootloader and Linux. The LS1021a CPU0 is enabled under u-boot and all cores are enabled under Linux.
Look at kernel code from this BSP about using all cores.
Have a great day,
Pavel Chubakov
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks Pavel.
The problem was the timer that generate the ticks. We think, the timer is initialized during u-boot which is not executed by the cpu1. We have extracted the initialization code from the u-boot (u-boot-fslc/arch/arm/cpu/armv7/ls102xa/cpu.c) and included it in our code and it works now.
Thanks a lot for your answer.
Regards,
Yaset