BARE metal + FreeRTOS scratchpad linker issue #30
-
Using the MPFS-lim.ld script the list shows .scratchpad starting at 0x0A00_0000 with length 0x0. Modification 1 Modification 2 PROVIDE(__freertos_irq_stack_top = .);
PROVIDE(__app_stack_bottom_h1$ = .); |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 2 replies
-
Hey @mark-nagel 😄 which freertos project are you running? Is it the one from the bare metal examples repository or is it from another source? |
Beta Was this translation helpful? Give feedback.
-
Hey @hughbreslin I believe it's a more recent version. |
Beta Was this translation helpful? Give feedback.
-
Here's the link -- https://github.com/FreeRTOS/FreeRTOS/releases/download/202112.00/FreeRTOSv202112.00.zip |
Beta Was this translation helpful? Give feedback.
-
more info ... Not using a FreeRTOS project. I tried to start with the mpfs-rpmsg project from the AMP repo - but it is a 'make file' project and I did not want to have to mess with the make files to port my code into it. So, I started with the mss_rtc_time bare metal project - because it is an 'auto build' project. So, I went to the FreeRTOS distro and pulled in the RISC-V_RV64_PolarFire_SoCoftnsole example and pulled that version of FreeRTOS in and added the I increased the L2LIM size to 768k and the heap to 64k in the linker script to accommodate my application. |
Beta Was this translation helpful? Give feedback.
-
Hi @mark-nagel Is the base LIM size big enough to hold your application? The default LIM size in the reference design is 512k but your estimated application size is 768k. The constants that are becoming zero are loaded into the stack which is at the end of memory and writes inside the LIM address space but to areas overflowing the LIM have no effect and reads from areas inside the LIM address space will return 0 if no memory is present at that address |
Beta Was this translation helpful? Give feedback.
-
Hi @hughbreslin Good catch, that as the issue. Using the Reference design as is, I hadn't checked the default memory configuration. After increasing the LIM size in the MSS configurator to be larger than the application size, this issue was resolved. Thanks! |
Beta Was this translation helpful? Give feedback.
Hi @mark-nagel
Is the base LIM size big enough to hold your application? The default LIM size in the reference design is 512k but your estimated application size is 768k. The constants that are becoming zero are loaded into the stack which is at the end of memory and writes inside the LIM address space but to areas overflowing the LIM have no effect and reads from areas inside the LIM address space will return 0 if no memory is present at that address