Hi,
I am currently trying to understand the boot process of the S32K358 being a multicore processor.
Based on the documentation and the IPCF example, is seems like the Boot configuration word is relevant, which is stored in the IVT. I can enable cores on boot here.
This is shown as well in the IPCF example:
Snippet from startup_cm7.s:
.section ".boot_header","ax"
.long SBAF_BOOT_MARKER /* IVT marker */
.long (CM7_0_ENABLE << CM7_0_ENABLE_SHIFT) | (CM7_1_ENABLE << CM7_1_ENABLE_SHIFT) | (CM7_2_ENABLE << CM7_2_ENABLE_SHIFT) /* Boot configuration word */
Snippet from linker file:
MEMORY
{
int_flash_c0 : ORIGIN = 0x00400000, LENGTH = 0x00200000 /* 2048K */
}
.flash :
{
KEEP(*(.boot_header))
. = ALIGN(2048);
__text_start = .;
__interrupts_init_start = .;
...
} > int_flash_c0
There are multiple debug configuration available. A combination of Release/Debug and Flash/RAM.
When looking at the RAM linker files, boot_header is dropped:
/* Discard boot header in RAM */
/DISCARD/ : { *(.boot_header) }
So I don't understand how how the cores are enabled, since the reset value is equivalent to disable all cores on startup.
Is there something happening in the background by the debugger? Or is this something I can see in the debug configurations?
Remark: I am currently using a PEmicro debugger.
Thanks
Andreas
Edit: It seems like the address of the interrupt vector table would also be missing if the boot_header is not included.
For Core 2 this seems obvious, as the RAM debug config sets the appropriate PC and thus avoids needing to set the IVT / start address. But not sure how it works for Core 0.