Hello,
I am using FreeRTOS on S32K358. Currently using the default FreeRTOS example from Design Studio.
When dissembling the ELF file, I can see following section -
Program Header:
LOAD off 0x00010000 vaddr 0x00400000 paddr 0x00400000 align 2**16
filesz 0x0000aab8 memsz 0x0000aab8 flags r-x
LOAD off 0x00020000 vaddr 0x20400000 paddr 0x0040aab8 align 2**16
filesz 0x0000010c memsz 0x000023e8 flags rwx
LOAD off 0x00030000 vaddr 0x20480000 paddr 0x0040abc4 align 2**16
filesz 0x00000004 memsz 0x000002b8 flags rw-
LOAD off 0x000323e8 vaddr 0x204023e8 paddr 0x0040cea0 align 2**16
filesz 0x00000000 memsz 0x00002000 flags rw-
LOAD off 0x00040000 vaddr 0x20000000 paddr 0x20000000 align 2**16
filesz 0x00000000 memsz 0x00000408 flags rw-
LOAD off 0x0003bf00 vaddr 0x204bbf00 paddr 0x204bbf00 align 2**16
filesz 0x00000000 memsz 0x00000100 flags rw-
private flags = 5000400: [Version5 EABI] [hard-float ABI]
I see following problems.
(1) Why is virtual memory and virtual address involved ? I don't see any meaning to that in case of FreeRTOS.
(2) What triggered use of virtual memory in linker script ?
(3) How does the above section even works ? For instance, item 2 has vaddr as 0x20400000 and paddr as 0x40aab8. So where does the section actually get loaded ? In address 0x20400000 (RAM) or in address 0x40aab8 (Flash)?
Does address 0x20400000 supposed to be mapped to address 0x40aab8? If so, then who and how is that mapping done?
Best regards,
Nandan Chaturbhuj