mirror of
https://github.com/pret/pokeplatinum.git
synced 2024-11-23 05:49:44 +00:00
Add lcf template to NitroSDK folder
This commit is contained in:
parent
8b0d35e7a6
commit
1a50ec043b
589
lib/external/NitroSDK/specfiles/ARM9-TS.lcf.template
vendored
Normal file
589
lib/external/NitroSDK/specfiles/ARM9-TS.lcf.template
vendored
Normal file
@ -0,0 +1,589 @@
|
||||
MEMORY
|
||||
{
|
||||
<STATIC.NAME> (RWX) : ORIGIN = <STATIC.ADDRESS>, LENGTH = 0x0 > <TARGET.NAME><PROPERTY.SUFFIX>
|
||||
<FOREACH.AUTOLOADS>
|
||||
<AUTOLOAD.NAME> (RWX) : ORIGIN = <AUTOLOAD.ADDRESS>, LENGTH = 0x0 >> <TARGET.NAME><PROPERTY.SUFFIX>
|
||||
<END.AUTOLOADS>
|
||||
binary.AUTOLOAD_INFO (RWX) : ORIGIN = 0, LENGTH = 0x0 >> <TARGET.NAME><PROPERTY.SUFFIX>
|
||||
binary.STATIC_FOOTER (RWX) : ORIGIN = 0, LENGTH = 0x0 >> <TARGET.NAME><PROPERTY.SUFFIX>
|
||||
|
||||
<PROPERTY.OVERLAYDEFS> (RW) : ORIGIN = AFTER(<STATIC.NAME>), LENGTH = 0x0 > <PROPERTY.OVERLAYDEFS><PROPERTY.SUFFIX>
|
||||
<PROPERTY.OVERLAYTABLE> (RW) : ORIGIN = AFTER(<STATIC.NAME>), LENGTH = 0x0 > <PROPERTY.OVERLAYTABLE><PROPERTY.SUFFIX>
|
||||
<FOREACH.OVERLAYS>
|
||||
<OVERLAY.NAME> (RWXO): ORIGIN = <OVERLAY.ADDRESS>, LENGTH = 0x0 > <TARGET.NAME=%_ov_><OVERLAY.NAME><PROPERTY.SUFFIX>
|
||||
<END.OVERLAYS>
|
||||
dummy.MAIN_EX (RW) : ORIGIN = 0x023e0000, LENGTH = 0x0
|
||||
arena.MAIN (RW) : ORIGIN = AFTER(<STATIC.NAME><FOREACH.OVERLAYS=MAIN>,<OVERLAY.NAME><END.OVERLAYS>), LENGTH = 0x0
|
||||
arena.MAIN_EX (RW) : ORIGIN = AFTER(dummy.MAIN_EX<IF.EXIST.AUTOLOAD.MAINEX=,MAINEX><FOREACH.OVERLAYS=MAINEX>,<OVERLAY.NAME><END.OVERLAYS>), LENGTH = 0x0
|
||||
arena.ITCM (RW) : ORIGIN = AFTER(ITCM<FOREACH.OVERLAYS=ITCM>,<OVERLAY.NAME><END.OVERLAYS>), LENGTH = 0x0
|
||||
arena.DTCM (RW) : ORIGIN = AFTER(DTCM<FOREACH.OVERLAYS=DTCM>,<OVERLAY.NAME><END.OVERLAYS>), LENGTH = 0x0
|
||||
binary.MODULE_FILES (RW) : ORIGIN = 0x0, LENGTH = 0x0 > <TARGET.NAME=%_>component.files
|
||||
check.ITCM (RWX) : ORIGIN = 0x0, LENGTH = 0x08000 > <TARGET.NAME=%_>itcm.check
|
||||
check.DTCM (RW) : ORIGIN = 0x0, LENGTH = 0x04000 > <TARGET.NAME=%_>dtcm.check
|
||||
}
|
||||
|
||||
FORCE_ACTIVE
|
||||
{
|
||||
SVC_SoftReset
|
||||
}
|
||||
|
||||
KEEP_SECTION
|
||||
{
|
||||
.sinit
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
############################ STATIC #################################
|
||||
.<STATIC.NAME>:
|
||||
{
|
||||
ALIGNALL(4); . = ALIGN(32); # Fit to cache line
|
||||
<IF.NITRO_LCFSPEC.GE.2>
|
||||
<FOREACH.STATIC.SEARCHSYMBOLS><IF.STATIC.SEARCHSYMBOL.FIRST=SEARCH_SYMBOL :,><STATIC.SEARCHSYMBOL><IF.STATIC.SEARCHSYMBOL.LAST=;><END.STATIC.SEARCHSYMBOLS>
|
||||
<ENDIF>
|
||||
#
|
||||
# TEXT BLOCK: READ ONLY
|
||||
#
|
||||
SDK_STATIC_START =.;
|
||||
SDK_STATIC_TEXT_START =.;
|
||||
#:::::::::: text/rodata
|
||||
libsyscall.a (.text)
|
||||
crt0.o (.text)
|
||||
crt0.o (.rodata)
|
||||
|
||||
* (.version)
|
||||
OBJECT(NitroMain,*)
|
||||
<FOREACH.STATIC.OBJECTS=.text>
|
||||
<STATIC.OBJECT=.text:t>
|
||||
<END.STATIC.OBJECTS>
|
||||
<FOREACH.STATIC.LIBRARIES=.text>
|
||||
<STATIC.LIBRARY=.text:t>
|
||||
<END.STATIC.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
* (.exception)
|
||||
. = ALIGN(4);
|
||||
SDK_STATIC_ETABLE_START =.;
|
||||
EXCEPTION
|
||||
SDK_STATIC_ETABLE_END =.;
|
||||
. = ALIGN(4);
|
||||
<FOREACH.STATIC.OBJECTS=.init>
|
||||
<STATIC.OBJECT=.init:t>
|
||||
<END.STATIC.OBJECTS>
|
||||
<FOREACH.STATIC.LIBRARIES=.init>
|
||||
<STATIC.LIBRARY=.init:t>
|
||||
<END.STATIC.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
<FOREACH.STATIC.OBJECTS=.rodata>
|
||||
<STATIC.OBJECT=.rodata:t>
|
||||
<END.STATIC.OBJECTS>
|
||||
<FOREACH.STATIC.LIBRARIES=.rodata>
|
||||
<STATIC.LIBRARY=.rodata:t>
|
||||
<END.STATIC.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
|
||||
SDK_STATIC_SINIT_START =.;
|
||||
#:::::::::: ctor
|
||||
<FOREACH.STATIC.OBJECTS=.ctor>
|
||||
<STATIC.OBJECT=.ctor:t>
|
||||
<END.STATIC.OBJECTS>
|
||||
<FOREACH.STATIC.LIBRARIES=.ctor>
|
||||
<STATIC.LIBRARY=.ctor:t>
|
||||
<END.STATIC.LIBRARIES>
|
||||
<FOREACH.STATIC.OBJECTS=.sinit>
|
||||
<STATIC.OBJECT=.sinit:t>
|
||||
<END.STATIC.OBJECTS>
|
||||
<FOREACH.STATIC.LIBRARIES=.sinit>
|
||||
<STATIC.LIBRARY=.sinit:t>
|
||||
<END.STATIC.LIBRARIES>
|
||||
<FOREACH.AUTOLOADS>
|
||||
<FOREACH.AUTOLOAD.OBJECTS=.ctor>
|
||||
<AUTOLOAD.OBJECT=.ctor:t>
|
||||
<END.AUTOLOAD.OBJECTS>
|
||||
<FOREACH.AUTOLOAD.LIBRARIES=.ctor>
|
||||
<AUTOLOAD.LIBRARY=.ctor:t>
|
||||
<END.AUTOLOAD.LIBRARIES>
|
||||
<FOREACH.AUTOLOAD.OBJECTS=.sinit>
|
||||
<AUTOLOAD.OBJECT=.sinit:t>
|
||||
<END.AUTOLOAD.OBJECTS>
|
||||
<FOREACH.AUTOLOAD.LIBRARIES=.sinit>
|
||||
<AUTOLOAD.LIBRARY=.sinit:t>
|
||||
<END.AUTOLOAD.LIBRARIES>
|
||||
<END.AUTOLOADS>
|
||||
WRITEW 0;
|
||||
#:::::::::: ctor
|
||||
SDK_STATIC_SINIT_END =.;
|
||||
|
||||
#:::::::::: text/rodata
|
||||
. = ALIGN(32);
|
||||
SDK_STATIC_TEXT_END =.;
|
||||
|
||||
#
|
||||
# DATA BLOCK: READ WRITE
|
||||
#
|
||||
SDK_STATIC_DATA_START =.;
|
||||
#:::::::::: data
|
||||
<FOREACH.STATIC.OBJECTS=.sdata>
|
||||
<STATIC.OBJECT=.sdata:t>
|
||||
<END.STATIC.OBJECTS>
|
||||
<FOREACH.STATIC.LIBRARIES=.sdata>
|
||||
<STATIC.LIBRARY=.sdata:t>
|
||||
<END.STATIC.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
<FOREACH.STATIC.OBJECTS=.data>
|
||||
<STATIC.OBJECT=.data:t>
|
||||
<END.STATIC.OBJECTS>
|
||||
<FOREACH.STATIC.LIBRARIES=.data>
|
||||
<STATIC.LIBRARY=.data:t>
|
||||
<END.STATIC.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
SDK_OVERLAY_DIGEST =.;
|
||||
# NO DIGEST
|
||||
SDK_OVERLAY_DIGEST_END =.;
|
||||
#:::::::::: data
|
||||
. = ALIGN(32);
|
||||
SDK_STATIC_DATA_END =.;
|
||||
SDK_STATIC_END =.;
|
||||
|
||||
SDK_STATIC_TEXT_SIZE = SDK_STATIC_TEXT_END - SDK_STATIC_TEXT_START;
|
||||
SDK_STATIC_DATA_SIZE = SDK_STATIC_DATA_END - SDK_STATIC_DATA_START;
|
||||
SDK_STATIC_SIZE = SDK_STATIC_END - SDK_STATIC_START;
|
||||
__sinit__ = SDK_STATIC_SINIT_START; # for static initializer
|
||||
__exception_table_start__ = SDK_STATIC_ETABLE_START; # for exception table
|
||||
__exception_table_end__ = SDK_STATIC_ETABLE_END; # for exception table
|
||||
} > <STATIC.NAME>
|
||||
|
||||
.<STATIC.NAME>.bss:
|
||||
{
|
||||
ALIGNALL(4); . = ALIGN(32);
|
||||
<IF.NITRO_LCFSPEC.GE.2>
|
||||
<FOREACH.STATIC.SEARCHSYMBOLS><IF.STATIC.SEARCHSYMBOL.FIRST=SEARCH_SYMBOL :,><STATIC.SEARCHSYMBOL><IF.STATIC.SEARCHSYMBOL.LAST=;><END.STATIC.SEARCHSYMBOLS>
|
||||
<ENDIF>
|
||||
#
|
||||
# BSS BLOCK
|
||||
#
|
||||
SDK_STATIC_BSS_START =.;
|
||||
#:::::::::: bss
|
||||
<FOREACH.STATIC.OBJECTS=.sbss>
|
||||
<STATIC.OBJECT=.sbss:t>
|
||||
<END.STATIC.OBJECTS>
|
||||
<FOREACH.STATIC.LIBRARIES=.sbss>
|
||||
<STATIC.LIBRARY=.sbss:t>
|
||||
<END.STATIC.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
<FOREACH.STATIC.OBJECTS=.bss>
|
||||
<STATIC.OBJECT=.bss:t>
|
||||
<END.STATIC.OBJECTS>
|
||||
<FOREACH.STATIC.LIBRARIES=.bss>
|
||||
<STATIC.LIBRARY=.bss:t>
|
||||
<END.STATIC.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
#:::::::::: bss
|
||||
. = ALIGN(32);
|
||||
SDK_STATIC_BSS_END = .;
|
||||
SDK_STATIC_BSS_SIZE = SDK_STATIC_BSS_END - SDK_STATIC_BSS_START;
|
||||
|
||||
} >> <STATIC.NAME>
|
||||
|
||||
|
||||
############################ AUTOLOADS ##############################
|
||||
SDK_AUTOLOAD.ITCM.START = 0x01ff8000;
|
||||
SDK_AUTOLOAD.ITCM.END = SDK_AUTOLOAD.ITCM.START;
|
||||
SDK_AUTOLOAD.ITCM.BSS_END = SDK_AUTOLOAD.ITCM.START;
|
||||
SDK_AUTOLOAD.ITCM.SIZE = 0;
|
||||
SDK_AUTOLOAD.ITCM.BSS_SIZE = 0;
|
||||
SDK_AUTOLOAD.DTCM.START = 0x027e0000;
|
||||
SDK_AUTOLOAD.DTCM.END = SDK_AUTOLOAD.DTCM.START;
|
||||
SDK_AUTOLOAD.DTCM.BSS_END = SDK_AUTOLOAD.DTCM.START;
|
||||
SDK_AUTOLOAD.DTCM.SIZE = 0;
|
||||
SDK_AUTOLOAD.DTCM.BSS_SIZE = 0;
|
||||
SDK_AUTOLOAD_START = SDK_STATIC_END;
|
||||
SDK_AUTOLOAD_SIZE = 0;
|
||||
SDK_AUTOLOAD_NUMBER = <NUMBER.AUTOLOADS>;
|
||||
|
||||
<FOREACH.AUTOLOADS>
|
||||
.<AUTOLOAD.NAME>:
|
||||
{
|
||||
ALIGNALL(4); . = ALIGN(32);
|
||||
<IF.NITRO_LCFSPEC.GE.2>
|
||||
<FOREACH.AUTOLOAD.SEARCHSYMBOLS><IF.AUTOLOAD.SEARCHSYMBOL.FIRST=SEARCH_SYMBOL :,><AUTOLOAD.SEARCHSYMBOL><IF.AUTOLOAD.SEARCHSYMBOL.LAST=;><END.AUTOLOAD.SEARCHSYMBOLS>
|
||||
<ENDIF>
|
||||
#
|
||||
# TEXT BLOCK: READ ONLY
|
||||
#
|
||||
SDK_AUTOLOAD_<AUTOLOAD.NAME>_ID =<AUTOLOAD.ID>;
|
||||
SDK_AUTOLOAD.<AUTOLOAD.NAME>.ID =<AUTOLOAD.ID>;
|
||||
SDK_AUTOLOAD.<AUTOLOAD.NAME>.START =.;
|
||||
SDK_AUTOLOAD.<AUTOLOAD.NAME>.TEXT_START =.;
|
||||
#:::::::::: text/rodata
|
||||
<FOREACH.AUTOLOAD.OBJECTS=.text>
|
||||
<AUTOLOAD.OBJECT=.text:t>
|
||||
<END.AUTOLOAD.OBJECTS>
|
||||
<FOREACH.AUTOLOAD.LIBRARIES=.text>
|
||||
<AUTOLOAD.LIBRARY=.text:t>
|
||||
<END.AUTOLOAD.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
<FOREACH.AUTOLOAD.OBJECTS=.itcm>
|
||||
<AUTOLOAD.OBJECT=.itcm:t>
|
||||
<END.AUTOLOAD.OBJECTS>
|
||||
<FOREACH.AUTOLOAD.LIBRARIES=.itcm>
|
||||
<AUTOLOAD.LIBRARY=.itcm:t>
|
||||
<END.AUTOLOAD.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
<FOREACH.AUTOLOAD.OBJECTS=.init>
|
||||
<AUTOLOAD.OBJECT=.init:t>
|
||||
<END.AUTOLOAD.OBJECTS>
|
||||
<FOREACH.AUTOLOAD.LIBRARIES=.init>
|
||||
<AUTOLOAD.LIBRARY=.init:t>
|
||||
<END.AUTOLOAD.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
<FOREACH.AUTOLOAD.OBJECTS=.rodata>
|
||||
<AUTOLOAD.OBJECT=.rodata:t>
|
||||
<END.AUTOLOAD.OBJECTS>
|
||||
<FOREACH.AUTOLOAD.LIBRARIES=.rodata>
|
||||
<AUTOLOAD.LIBRARY=.rodata:t>
|
||||
<END.AUTOLOAD.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
#:::::::::: text/rodata
|
||||
SDK_AUTOLOAD.<AUTOLOAD.NAME>.TEXT_END =.;
|
||||
|
||||
#
|
||||
# DATA BLOCK: READ WRITE BLOCK
|
||||
#
|
||||
SDK_AUTOLOAD.<AUTOLOAD.NAME>.DATA_START =.;
|
||||
#:::::::::: data
|
||||
<FOREACH.AUTOLOAD.OBJECTS=.sdata>
|
||||
<AUTOLOAD.OBJECT=.sdata:t>
|
||||
<END.AUTOLOAD.OBJECTS>
|
||||
<FOREACH.AUTOLOAD.LIBRARIES=.sdata>
|
||||
<AUTOLOAD.LIBRARY=.sdata:t>
|
||||
<END.AUTOLOAD.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
<FOREACH.AUTOLOAD.OBJECTS=.data>
|
||||
<AUTOLOAD.OBJECT=.data:t>
|
||||
<END.AUTOLOAD.OBJECTS>
|
||||
<FOREACH.AUTOLOAD.LIBRARIES=.data>
|
||||
<AUTOLOAD.LIBRARY=.data:t>
|
||||
<END.AUTOLOAD.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
<FOREACH.AUTOLOAD.OBJECTS=.dtcm>
|
||||
<AUTOLOAD.OBJECT=.dtcm:t>
|
||||
<END.AUTOLOAD.OBJECTS>
|
||||
<FOREACH.AUTOLOAD.LIBRARIES=.dtcm>
|
||||
<AUTOLOAD.LIBRARY=.dtcm:t>
|
||||
<END.AUTOLOAD.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
#:::::::::: data
|
||||
. = ALIGN(32);
|
||||
SDK_AUTOLOAD.<AUTOLOAD.NAME>.DATA_END =.;
|
||||
SDK_AUTOLOAD.<AUTOLOAD.NAME>.END =.;
|
||||
|
||||
SDK_AUTOLOAD.<AUTOLOAD.NAME>.TEXT_SIZE = SDK_AUTOLOAD.<AUTOLOAD.NAME>.TEXT_END - SDK_AUTOLOAD.<AUTOLOAD.NAME>.TEXT_START;
|
||||
SDK_AUTOLOAD.<AUTOLOAD.NAME>.DATA_SIZE = SDK_AUTOLOAD.<AUTOLOAD.NAME>.DATA_END - SDK_AUTOLOAD.<AUTOLOAD.NAME>.DATA_START;
|
||||
SDK_AUTOLOAD.<AUTOLOAD.NAME>.SIZE = SDK_AUTOLOAD.<AUTOLOAD.NAME>.END - SDK_AUTOLOAD.<AUTOLOAD.NAME>.START;
|
||||
SDK_AUTOLOAD_SIZE = SDK_AUTOLOAD_SIZE + SDK_AUTOLOAD.<AUTOLOAD.NAME>.SIZE;
|
||||
|
||||
} > <AUTOLOAD.NAME>
|
||||
|
||||
.<AUTOLOAD.NAME>.bss:
|
||||
{
|
||||
ALIGNALL(4); . = ALIGN(32);
|
||||
<IF.NITRO_LCFSPEC.GE.2>
|
||||
<FOREACH.AUTOLOAD.SEARCHSYMBOLS><IF.AUTOLOAD.SEARCHSYMBOL.FIRST=SEARCH_SYMBOL :,><AUTOLOAD.SEARCHSYMBOL><IF.AUTOLOAD.SEARCHSYMBOL.LAST=;><END.AUTOLOAD.SEARCHSYMBOLS>
|
||||
<ENDIF>
|
||||
#
|
||||
# BSS BLOCK
|
||||
#
|
||||
SDK_AUTOLOAD.<AUTOLOAD.NAME>.BSS_START = .;
|
||||
#:::::::::: bss
|
||||
<FOREACH.AUTOLOAD.OBJECTS=.sbss>
|
||||
<AUTOLOAD.OBJECT=.sbss:t>
|
||||
<END.AUTOLOAD.OBJECTS>
|
||||
<FOREACH.AUTOLOAD.LIBRARIES=.sbss>
|
||||
<AUTOLOAD.LIBRARY=.sbss:t>
|
||||
<END.AUTOLOAD.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
<FOREACH.AUTOLOAD.OBJECTS=.bss>
|
||||
<AUTOLOAD.OBJECT=.bss:t>
|
||||
<END.AUTOLOAD.OBJECTS>
|
||||
<FOREACH.AUTOLOAD.LIBRARIES=.bss>
|
||||
<AUTOLOAD.LIBRARY=.bss:t>
|
||||
<END.AUTOLOAD.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
<FOREACH.AUTOLOAD.OBJECTS=.dtcm>
|
||||
<AUTOLOAD.OBJECT=.dtcm.bss:t>
|
||||
<END.AUTOLOAD.OBJECTS>
|
||||
<FOREACH.AUTOLOAD.LIBRARIES=.dtcm>
|
||||
<AUTOLOAD.LIBRARY=.dtcm.bss:t>
|
||||
<END.AUTOLOAD.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
<FOREACH.AUTOLOAD.OBJECTS=.itcm>
|
||||
<AUTOLOAD.OBJECT=.itcm.bss:t>
|
||||
<END.AUTOLOAD.OBJECTS>
|
||||
<FOREACH.AUTOLOAD.LIBRARIES=.itcm>
|
||||
<AUTOLOAD.LIBRARY=.itcm.bss:t>
|
||||
<END.AUTOLOAD.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
#:::::::::: bss
|
||||
. = ALIGN(32);
|
||||
SDK_AUTOLOAD.<AUTOLOAD.NAME>.BSS_END = .;
|
||||
|
||||
SDK_AUTOLOAD.<AUTOLOAD.NAME>.BSS_SIZE = SDK_AUTOLOAD.<AUTOLOAD.NAME>.BSS_END - SDK_AUTOLOAD.<AUTOLOAD.NAME>.BSS_START;
|
||||
|
||||
} >> <AUTOLOAD.NAME>
|
||||
|
||||
<END.AUTOLOADS>
|
||||
|
||||
SDK_AUTOLOAD_ITCM_START = SDK_AUTOLOAD.ITCM.START;
|
||||
SDK_AUTOLOAD_ITCM_END = SDK_AUTOLOAD.ITCM.END;
|
||||
SDK_AUTOLOAD_ITCM_BSS_END = SDK_AUTOLOAD.ITCM.BSS_END;
|
||||
SDK_AUTOLOAD_ITCM_SIZE = SDK_AUTOLOAD.ITCM.SIZE;
|
||||
SDK_AUTOLOAD_ITCM_BSS_SIZE = SDK_AUTOLOAD.ITCM.BSS_SIZE;
|
||||
SDK_AUTOLOAD_DTCM_START = SDK_AUTOLOAD.DTCM.START;
|
||||
SDK_AUTOLOAD_DTCM_END = SDK_AUTOLOAD.DTCM.END;
|
||||
SDK_AUTOLOAD_DTCM_BSS_END = SDK_AUTOLOAD.DTCM.BSS_END;
|
||||
SDK_AUTOLOAD_DTCM_SIZE = SDK_AUTOLOAD.DTCM.SIZE;
|
||||
SDK_AUTOLOAD_DTCM_BSS_SIZE = SDK_AUTOLOAD.DTCM.BSS_SIZE;
|
||||
|
||||
############################ AUTOLOAD_INFO ##########################
|
||||
.binary.AUTOLOAD_INFO:
|
||||
{
|
||||
<FOREACH.AUTOLOADS>
|
||||
WRITEW ADDR(.<AUTOLOAD.NAME>);
|
||||
WRITEW SDK_AUTOLOAD.<AUTOLOAD.NAME>.SIZE;
|
||||
WRITEW SDK_AUTOLOAD.<AUTOLOAD.NAME>.BSS_SIZE;
|
||||
<END.AUTOLOADS>
|
||||
} > binary.AUTOLOAD_INFO
|
||||
|
||||
SDK_AUTOLOAD_LIST = SDK_AUTOLOAD_START + SDK_AUTOLOAD_SIZE;
|
||||
SDK_AUTOLOAD_LIST_END = SDK_AUTOLOAD_START + SDK_AUTOLOAD_SIZE + SIZEOF(.binary.AUTOLOAD_INFO);
|
||||
SDK_AUTOLOAD_SIZE = SDK_AUTOLOAD_SIZE + SIZEOF(.binary.AUTOLOAD_INFO);
|
||||
|
||||
############################ STATIC_FOOTER ##########################
|
||||
.binary.STATIC_FOOTER:
|
||||
{
|
||||
WRITEW 0xdec00621; # LE(0x2106C0DE) = NITRO CODE
|
||||
WRITEW _start_ModuleParams - ADDR(.<STATIC.NAME>);
|
||||
WRITEW 0; # NO DIGEST
|
||||
} > binary.STATIC_FOOTER
|
||||
|
||||
############################ OVERLAYS ###############################
|
||||
SDK_OVERLAY_NUMBER = <NUMBER.OVERLAYS>;
|
||||
|
||||
<FOREACH.OVERLAYS>
|
||||
.<OVERLAY.NAME>:<IF.NITRO_LCFSPEC.GE.2><OVERLAY.NAME><ENDIF>
|
||||
{
|
||||
ALIGNALL(4); . = ALIGN(32);
|
||||
<IF.NITRO_LCFSPEC.GE.2>
|
||||
<FOREACH.OVERLAY.SEARCHSYMBOLS><IF.OVERLAY.SEARCHSYMBOL.FIRST=SEARCH_SYMBOL :,><OVERLAY.SEARCHSYMBOL><IF.OVERLAY.SEARCHSYMBOL.LAST=;><END.OVERLAY.SEARCHSYMBOLS>
|
||||
<ENDIF>
|
||||
#
|
||||
# TEXT BLOCK: READ ONLY
|
||||
#
|
||||
SDK_OVERLAY_<OVERLAY.NAME>_ID =<OVERLAY.ID>; ### SEGMENT <OVERLAY.NAME> OVERLAY ID
|
||||
SDK_OVERLAY.<OVERLAY.NAME>.ID =<OVERLAY.ID>;
|
||||
SDK_OVERLAY.<OVERLAY.NAME>.START =.;
|
||||
SDK_OVERLAY.<OVERLAY.NAME>.TEXT_START =.;
|
||||
#:::::::::: text/rodata
|
||||
<FOREACH.OVERLAY.OBJECTS=.text>
|
||||
<OVERLAY.OBJECT=.text:t>
|
||||
<END.OVERLAY.OBJECTS>
|
||||
<FOREACH.OVERLAY.LIBRARIES=.text>
|
||||
<OVERLAY.LIBRARY=.text:t>
|
||||
<END.OVERLAY.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
<FOREACH.OVERLAY.OBJECTS=.rodata>
|
||||
<OVERLAY.OBJECT=.rodata:t>
|
||||
<END.OVERLAY.OBJECTS>
|
||||
<FOREACH.OVERLAY.LIBRARIES=.rodata>
|
||||
<OVERLAY.LIBRARY=.rodata:t>
|
||||
<END.OVERLAY.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
<FOREACH.OVERLAY.OBJECTS=.init>
|
||||
<OVERLAY.OBJECT=.init:t>
|
||||
<END.OVERLAY.OBJECTS>
|
||||
<FOREACH.OVERLAY.LIBRARIES=.init>
|
||||
<OVERLAY.LIBRARY=.init:t>
|
||||
<END.OVERLAY.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
SDK_OVERLAY.<OVERLAY.NAME>.SINIT_START =.;
|
||||
#:::::::::: ctor
|
||||
<FOREACH.OVERLAY.OBJECTS=.ctor>
|
||||
<OVERLAY.OBJECT=.ctor:t>
|
||||
<END.OVERLAY.OBJECTS>
|
||||
<FOREACH.OVERLAY.LIBRARIES=.ctor>
|
||||
<OVERLAY.LIBRARY=.ctor:t>
|
||||
<END.OVERLAY.LIBRARIES>
|
||||
<FOREACH.OVERLAY.OBJECTS=.sinit>
|
||||
<OVERLAY.OBJECT=.sinit:t>
|
||||
<END.OVERLAY.OBJECTS>
|
||||
<FOREACH.OVERLAY.LIBRARIES=.sinit>
|
||||
<OVERLAY.LIBRARY=.sinit:t>
|
||||
<END.OVERLAY.LIBRARIES>
|
||||
WRITEW 0;
|
||||
#:::::::::: ctor
|
||||
SDK_OVERLAY.<OVERLAY.NAME>.SINIT_END =.;
|
||||
|
||||
#:::::::::: text/rodata
|
||||
. = ALIGN(32);
|
||||
SDK_OVERLAY.<OVERLAY.NAME>.TEXT_END =.;
|
||||
|
||||
#
|
||||
# DATA BLOCK: READ WRITE
|
||||
#
|
||||
SDK_OVERLAY.<OVERLAY.NAME>.DATA_START =.;
|
||||
#:::::::::: data
|
||||
<FOREACH.OVERLAY.OBJECTS=.sdata>
|
||||
<OVERLAY.OBJECT=.sdata:t>
|
||||
<END.OVERLAY.OBJECTS>
|
||||
<FOREACH.OVERLAY.LIBRARIES=.sdata>
|
||||
<OVERLAY.LIBRARY=.sdata:t>
|
||||
<END.OVERLAY.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
<FOREACH.OVERLAY.OBJECTS=.data>
|
||||
<OVERLAY.OBJECT=.data:t>
|
||||
<END.OVERLAY.OBJECTS>
|
||||
<FOREACH.OVERLAY.LIBRARIES=.data>
|
||||
<OVERLAY.LIBRARY=.data:t>
|
||||
<END.OVERLAY.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
#:::::::::: data
|
||||
. = ALIGN(32);
|
||||
SDK_OVERLAY.<OVERLAY.NAME>.DATA_END =.;
|
||||
SDK_OVERLAY.<OVERLAY.NAME>.END =.;
|
||||
|
||||
SDK_OVERLAY.<OVERLAY.NAME>.TEXT_SIZE = SDK_OVERLAY.<OVERLAY.NAME>.TEXT_END - SDK_OVERLAY.<OVERLAY.NAME>.TEXT_START;
|
||||
SDK_OVERLAY.<OVERLAY.NAME>.DATA_SIZE = SDK_OVERLAY.<OVERLAY.NAME>.DATA_END - SDK_OVERLAY.<OVERLAY.NAME>.DATA_START;
|
||||
SDK_OVERLAY.<OVERLAY.NAME>.SIZE = SDK_OVERLAY.<OVERLAY.NAME>.END - SDK_OVERLAY.<OVERLAY.NAME>.START;
|
||||
|
||||
} > <OVERLAY.NAME>
|
||||
|
||||
.<OVERLAY.NAME>.bss:<IF.NITRO_LCFSPEC.GE.2><OVERLAY.NAME><ENDIF>
|
||||
{
|
||||
ALIGNALL(4); . = ALIGN(32);
|
||||
<IF.NITRO_LCFSPEC.GE.2>
|
||||
<FOREACH.OVERLAY.SEARCHSYMBOLS><IF.OVERLAY.SEARCHSYMBOL.FIRST=SEARCH_SYMBOL :,><OVERLAY.SEARCHSYMBOL><IF.OVERLAY.SEARCHSYMBOL.LAST=;><END.OVERLAY.SEARCHSYMBOLS>
|
||||
<ENDIF>
|
||||
#
|
||||
# BSS BLOCK
|
||||
#
|
||||
SDK_OVERLAY.<OVERLAY.NAME>.BSS_START = .;
|
||||
#:::::::::: bss
|
||||
<FOREACH.OVERLAY.OBJECTS=.bss>
|
||||
<OVERLAY.OBJECT=.bss:t>
|
||||
<END.OVERLAY.OBJECTS>
|
||||
<FOREACH.OVERLAY.LIBRARIES=.bss>
|
||||
<OVERLAY.LIBRARY=.bss:t>
|
||||
<END.OVERLAY.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
<FOREACH.OVERLAY.OBJECTS=.sbss>
|
||||
<OVERLAY.OBJECT=.sbss:t>
|
||||
<END.OVERLAY.OBJECTS>
|
||||
<FOREACH.OVERLAY.LIBRARIES=.sbss>
|
||||
<OVERLAY.LIBRARY=.sbss:t>
|
||||
<END.OVERLAY.LIBRARIES>
|
||||
. = ALIGN(4);
|
||||
#:::::::::: bss
|
||||
. = ALIGN(32);
|
||||
SDK_OVERLAY.<OVERLAY.NAME>.BSS_END = .;
|
||||
|
||||
SDK_OVERLAY.<OVERLAY.NAME>.BSS_SIZE = SDK_OVERLAY.<OVERLAY.NAME>.BSS_END - SDK_OVERLAY.<OVERLAY.NAME>.BSS_START;
|
||||
|
||||
} >> <OVERLAY.NAME>
|
||||
|
||||
<END.OVERLAYS>
|
||||
|
||||
############################ MAIN EX ##################################
|
||||
# MAIN EX Area
|
||||
.dummy.MAIN_EX:
|
||||
{
|
||||
. = ALIGN(32);
|
||||
} > dummy.MAIN_EX
|
||||
|
||||
############################ ARENA ##################################
|
||||
.arena.MAIN:
|
||||
{
|
||||
. = ALIGN(32);
|
||||
SDK_SECTION_ARENA_START =.;
|
||||
} > arena.MAIN
|
||||
|
||||
.arena.MAIN_EX:
|
||||
{
|
||||
. = ALIGN(32);
|
||||
SDK_SECTION_ARENA_EX_START =.;
|
||||
} > arena.MAIN_EX
|
||||
|
||||
.arena.ITCM:
|
||||
{
|
||||
. = ALIGN(32);
|
||||
SDK_SECTION_ARENA_ITCM_START =.;
|
||||
} > arena.ITCM
|
||||
|
||||
.arena.DTCM:
|
||||
{
|
||||
. = ALIGN(32);
|
||||
SDK_SECTION_ARENA_DTCM_START =.;
|
||||
} > arena.DTCM
|
||||
|
||||
############################ OVERLAYDEFS ############################
|
||||
.<PROPERTY.OVERLAYDEFS>:
|
||||
{
|
||||
### <STATIC.NAME> module information
|
||||
WRITEW ADDR(.<STATIC.NAME>); # load address
|
||||
WRITEW _start; # entry address
|
||||
WRITEW SDK_STATIC_SIZE + SDK_AUTOLOAD_SIZE; # size of module
|
||||
WRITEW _start_AutoloadDoneCallback; # callback autoload done
|
||||
|
||||
### overlay filename
|
||||
<FOREACH.OVERLAYS>
|
||||
WRITES ("<TARGET.NAME=%_ov_><OVERLAY.NAME><PROPERTY.SUFFIX>"); # Overlay <OVERLAY.ID>
|
||||
<END.OVERLAYS>
|
||||
|
||||
} > <PROPERTY.OVERLAYDEFS>
|
||||
|
||||
|
||||
############################ OVERLAYTABLE ###########################
|
||||
.<PROPERTY.OVERLAYTABLE>:
|
||||
{
|
||||
<FOREACH.OVERLAYS>
|
||||
# Overlay <OVERLAY.ID>
|
||||
WRITEW <OVERLAY.ID>; # overlay ID
|
||||
WRITEW ADDR(.<OVERLAY.NAME>); # load address
|
||||
WRITEW SDK_OVERLAY.<OVERLAY.NAME>.SIZE; # size of module
|
||||
WRITEW SDK_OVERLAY.<OVERLAY.NAME>.BSS_SIZE; # size of bss
|
||||
WRITEW SDK_OVERLAY.<OVERLAY.NAME>.SINIT_START; # start address of static init
|
||||
WRITEW SDK_OVERLAY.<OVERLAY.NAME>.SINIT_END; # end address of static init
|
||||
WRITEW <OVERLAY.ID>; # ROM file ID
|
||||
WRITEW 0; # Reserved
|
||||
|
||||
<END.OVERLAYS>
|
||||
|
||||
} > <PROPERTY.OVERLAYTABLE>
|
||||
|
||||
|
||||
############################ OTHERS #################################
|
||||
SDK_MAIN_ARENA_LO = SDK_SECTION_ARENA_START;
|
||||
SDK_IRQ_STACKSIZE = <STATIC.IRQSTACKSIZE>; # allocated in DTCM
|
||||
SDK_SYS_STACKSIZE = <STATIC.STACKSIZE>; # when 0 means all remains of DTCM
|
||||
|
||||
# Module filelist
|
||||
.binary.MODULE_FILES:
|
||||
{
|
||||
WRITES ("<TARGET.NAME><PROPERTY.SUFFIX>");
|
||||
WRITES ("<PROPERTY.OVERLAYDEFS><PROPERTY.SUFFIX>");
|
||||
WRITES ("<PROPERTY.OVERLAYTABLE><PROPERTY.SUFFIX>");
|
||||
} > binary.MODULE_FILES
|
||||
|
||||
# ITCM/DTCM size checker => check AUTOLOAD_ITCM/DTCM
|
||||
.check.ITCM:
|
||||
{
|
||||
. = . + SDK_AUTOLOAD_ITCM_SIZE + SDK_AUTOLOAD_ITCM_BSS_SIZE;
|
||||
} > check.ITCM
|
||||
|
||||
SDK_SYS_STACKSIZE_SIGN = (SDK_SYS_STACKSIZE < 0x80000000) * 2 - 1;
|
||||
.check.DTCM:
|
||||
{
|
||||
. = . + SDK_AUTOLOAD_DTCM_SIZE + SDK_AUTOLOAD_DTCM_BSS_SIZE;
|
||||
. = . + SDK_IRQ_STACKSIZE + SDK_SYS_STACKSIZE * SDK_SYS_STACKSIZE_SIGN;
|
||||
} > check.DTCM
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user