Created
September 8, 2015 00:41
-
-
Save spirilis/d11d09b2f40d8df0f065 to your computer and use it in GitHub Desktop.
RX210 ldscript example - providing Option Words
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Default value for Endian and Option Bytes is all binary-1's | |
* which provide a reasonably safe (if slow) default. | |
* Default Endian = Little-Endian | |
*/ | |
PROVIDE (__mdes = 0xFFFFFFFF); | |
PROVIDE (__ofs0 = 0xFFFFFFFF); | |
PROVIDE (__ofs1 = 0xFFFFFFFF); | |
.endian (0xFFFFFF80) : | |
{ | |
LONG (__mdes); | |
} | |
.option (0xFFFFFF88) : | |
{ | |
LONG (__ofs0); | |
LONG (__ofs1); | |
} | |
/* User-Boot codes, required to allow user bootloaders */ | |
PROVIDE (__ubcodea0 = 0x55736572); | |
PROVIDE (__ubcodea1 = 0x426F6F74); | |
PROVIDE (__ubcodeb0 = 0xFFFFFF07); | |
PROVIDE (__ubcodeb1 = 0x0008C04C); | |
.ubcode (0xFF7FFFE8) : | |
{ | |
LONG (__ubcodea0); | |
LONG (__ubcodea1); | |
LONG (__ubcodeb0); | |
LONG (__ubcodeb1); | |
} | |
/* E2 DataFlash */ | |
.dataflash : { | |
PROVIDE (__dataflash = .); | |
} > DATAFLASH | |
/* JTAG password */ | |
PROVIDE (__idkey_0 = 0xFFFFFFFF); | |
PROVIDE (__idkey_1 = 0xFFFFFFFF); | |
PROVIDE (__idkey_2 = 0xFFFFFFFF); | |
PROVIDE (__idkey_3 = 0xFFFFFFFF); | |
.idkey (0xFFFFFFA0) : | |
{ | |
LONG (__idkey_0); | |
LONG (__idkey_1); | |
LONG (__idkey_2); | |
LONG (__idkey_3); | |
} | |
/* ROM protect bit */ | |
PROVIDE (__romprotect = 0xFFFFFFFF); | |
.romprotect (0xFFFFFF9C) : | |
{ | |
LONG (__romprotect); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment