Other Parts Discussed in Thread: HALCOGEN
Hello all,
I am currently debugging some prefetch aborts that are happening within my FreeRTOS project and found out that the HALCoGen generated HL_sys_link.cmd file contains erroneous RAM size calculations:
Looking at the code above generated by HALCoGen, the RAM section boundaries would be:
Start: origin=(0x08004500+0x00000800) = 0x08004D00
End: origin + length = 0x08004D00 + (0x0007F800 - 0x00000800) = 0x08083D00
By looking at the Hercules RM57 memory map below, we can see that the calculated upper limit of RAM (0x08083D00) is out of bounds of the RAM part of memory (from 0x08000000 through 0x0807FFFFF). Please ignore the yellow color. The highlighted areas are the memory parts that have MPU regions created for them (does not have anything to do with this particular post).
So I guess my first question is, how is the 0x0007F800 number in this case calculated? I must have something else configured wrong in order for this number to get calculated erroneously.
Second question: What is the difference between changing the stack size in CCS (Properties > ARM Linker > Basic Options) vs changing it in HALCoGen? I know in HALCoGen you can change the space that gets allocated to each stack section, but what if you change the overall stack size in CCS and it does not match the overall stack size set in HALCoGen? Or viceversa?
I appreciate any help you can provide.
Thank you,
Surialic