diff --git a/firmware/app.lds b/firmware/app.lds index d2a9582a3d..5850a35fe1 100644 --- a/firmware/app.lds +++ b/firmware/app.lds @@ -261,7 +261,6 @@ SECTIONS .itcm : { _itcmstart = .; - *(.icode) _itcmend = .; } > ITCM AT> DRAM @@ -270,13 +269,23 @@ SECTIONS .dtcm : { _dtcmstart = .; - *(.irodata) - *(.idata) _dtcmend = .; } > DTCM AT> DRAM _dtcmcopy = LOADADDR(.dtcm); + .iram : + { + _iramstart = .; + *(.irodata) + *(.idata) + *(.icode) + . = ALIGN(0x4); + _iramend = .; + } > SRAM AT> DRAM + + _iramcopy = LOADADDR(.iram); + .ibss (NOLOAD) : { _iedata = .; diff --git a/firmware/export/config.h b/firmware/export/config.h index 12a6b1cacd..c2033dfe23 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -114,9 +114,9 @@ #define LCD_MROBE100 19 /* as used by Olympus M:Robe 100 */ #define LCD_LOGIKDAX 20 /* as used by Logik DAX - SSD1815 */ #define LCD_IAUDIO67 21 /* as used by iAudio 6/7 - unknown */ -#define LCD_COWOND2 21 /* as used by Cowon D2 - LTV250QV, TCC7801 driver */ #define LCD_CREATIVEZVM 22 /* as used by Creative Zen Vision:M */ #define LCD_TL0350A 23 /* as used by the iAudio M3 remote, treated as main LCD */ +#define LCD_COWOND2 24 /* as used by Cowon D2 - LTV250QV, TCC7801 driver */ /* LCD_PIXELFORMAT */ #define HORIZONTAL_PACKING 1 @@ -402,7 +402,7 @@ defined(CPU_COLDFIRE) || /* Coldfire: core, plugins, codecs */ \ defined(CPU_PP) || /* PortalPlayer: core, plugins, codecs */ \ defined(CPU_TCC77X) || /* Telechips: core, plugins, codecs */ \ - defined(CPU_TCC780X) || /* Telechips: core, plugins, codecs */ \ + /*defined(CPU_TCC780X) || /. Telechips: core, plugins, codecs */ \ (CONFIG_CPU == PNX0101)) #define ICODE_ATTR __attribute__ ((section(".icode"))) #define ICONST_ATTR __attribute__ ((section(".irodata"))) diff --git a/firmware/target/arm/tcc780x/crt0.S b/firmware/target/arm/tcc780x/crt0.S index 6e092bcd82..af37b40814 100644 --- a/firmware/target/arm/tcc780x/crt0.S +++ b/firmware/target/arm/tcc780x/crt0.S @@ -133,6 +133,16 @@ copied_start: ldrhi r5, [r4], #4 strhi r5, [r2], #4 bhi 1b + + /* Copy the IRAM (SRAM) */ + ldr r2, =_iramcopy + ldr r3, =_iramstart + ldr r4, =_iramend +1: + cmp r4, r3 + ldrhi r5, [r2], #4 + strhi r5, [r3], #4 + bhi 1b /* Zero out IBSS */ ldr r2, =_iedata