I have developed a dual core (+CLA1) project and want to migrate it to run from the on-chip flash for standalone operation.
When running from RAM, everything works as it should, and I can monitor operation via the debugger.
I believe I've taken all the necessary steps to boot and run from flash:
- All initialised code is linked to flash in both CPUs, as confirmed in Memory Allocation, including BEGIN
- The function for setting up the flash control registers (InitFlash) is stored in the .TI.ramfunc section, which is loaded to flash but run from RAM. It is copied from flash to RAM in InitSysCtrl(), and I can see from the Memory Browser that the code is copied over.
- The code to initialise the PIE vector table is there, but is not yet being reached.
When I run the application (Build code for both CPUs with the correct linker command file, connect the debugger and load to both CPUs with auto run disabled, and run CPU1, then CPU2), CPU1 copies Ramfuncs to RAM, initialises the flash control registers, tries to boot CPU2 via the IPC (IPCBootCPU2), and waits for the successful boot flag from CPU2.
CPU2 also copies Ramfuncs to RAM, but when the EALLOW command in InitFlash() is reached, it steps to 0x3FE00A and the debugger indicates "no symbols are defined".
I suspect some sort of security protection is involved. The CPUWRITE and CPUFETCH bits of the Access Protection NMAVFLG register in CPU2 are set. In CPU1, the CPUWRITE bit of the MAVFLG register is set.
All the fields (except the reserved ones) of the Dual Code Security Module RAMSTAT and SECTSTAT registers, in both CPUs, are set to 3, indicating they are unsecured, so I assume this isn't a DCSM issue?
Any assistance with this would be appreciated. Thanks.