Flash驱动加载到RAM中
C代码定义
#pragma section code "FLS_ERASE_LOADERRAMCODE"
Function: boolean EraseSector(uint32 dwSectorAddr)
{
}
#pragma section code restore
#pragma section code "FLS_WRITE_LOADERRAMCODE"
uint8 ProgramDFlashPage_DFlash(uint32 address, uint8* data)
{
}
#pragma section code restore
LSL文件
section_layout mpe:vtc:linear
{
group FLS_ERASE_GROUP ( run_addr = mem:mpe:pspr0,ordered,contiguous,copy,align=4)
{
section "FLS_ERASE_SECTION_RAM" (size = FLS_ERASE_SRAM_SIZE,attributes = rw,fill=0)
{
select ".text.FLS_ERASE_LOADERRAMCODE" ;
}
}
group FLS_WRITE_GROUP ( run_addr = mem:mpe:pspr0,ordered, contiguous,copy)
{
section "FLS_WRITE_SECTION_RAM" ( size = FLS_WRITE_SRAM_SIZE, attributes = rw,fill