This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

lpc4357 ipc and memory layout problems

i read the lpcware application note an11177, in this demo it shows a method to create dualcore project, in the m4_m0_ipc_mbx_rtos example,the M0 scatter file is as follow
LR_IROM1 0x0 0x8000 { ; 0x10080000 - 0x10084000 ER_IROM1 0x0 0x4000 { ; 16K code space

*.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) }

ER_IRAM1 0x4000 0x6000 { .ANY (+RW +ZI) }

ER_IRAM_BUFFERS 0x20004000 0x4000 { ; empty }

ER_IRAM_MBX 0x2000A000 0x2000 { ipc_buffer.o (+RW +ZI) ; hold the mailbox system }
}

it seems that linker will place all the M0 program and data in ram space of lpc4357, when running m0, the m4 core downloads the cm0_image created from m0 project and start m0.

void IPC_downloadSlaveImage(uint32_t slaveRomStart, const unsigned char slaveImage[], uint32_t imageSize)
{ uint32_t i; volatile uint8_t *pu8SRAM;

IPC_haltSlave(); pu8SRAM = (uint8_t *) slaveRomStart;

for (i = 0; i < imageSize; i++) { pu8SRAM[i] = slaveImage[i]; }

*(volatile uint32_t *) SLAVE_SHADOW_REG = slaveRomStart;
}

is it means that the program will be run in ram? if i need the m0 run in flash, is a different scatter file necessary?

  • it is annotated in the program that the slave has 40K load region space, but "0x8000" means 32K, where the other ram space, also in a project c file, it is said that slave memory space start from 0x10080000, however, the load region base address is 0x0, do i mistake the scatter setting?