mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-04-11 16:37:45 -04:00
The JZ47xx and S5L87xx processor families used their own special defines (__ASSEMBLY__ and ASM respectively) in their CPU headers to check if they were included from an assembly source file. For GCC the standard seems to be __ASSEMBLER__, so check for that instead and remove the non-standard symbols. Being more consistent across platforms makes it easier to include cpu.h from cross-platform files (eg. plugin.lds). Change-Id: I282930cad34e1a2ff18166f3b4338548b34f4a49
59 lines
1.1 KiB
Text
59 lines
1.1 KiB
Text
#define __ASSEMBLER__
|
|
#include "config.h"
|
|
#include "cpu.h"
|
|
#include "mks5lboot.h"
|
|
|
|
ENTRY(_start)
|
|
OUTPUT_FORMAT(elf32-littlearm)
|
|
OUTPUT_ARCH(arm)
|
|
|
|
#define BIN_ORIG DFU_LOADADDR + BIN_OFFSET
|
|
#define BIN_SIZE MAX_PAYLOAD
|
|
|
|
MEMORY
|
|
{
|
|
IRAM : ORIGIN = BIN_ORIG, LENGTH = BIN_SIZE
|
|
}
|
|
|
|
SECTIONS
|
|
{
|
|
.text : {
|
|
*(.init.text*)
|
|
*(.text*)
|
|
*(.icode*)
|
|
. = ALIGN(4);
|
|
} > IRAM
|
|
|
|
/* include initialized BSS (if any) into DFU image */
|
|
.bss : {
|
|
*(.bss*)
|
|
*(.ibss*)
|
|
*(COMMON)
|
|
. = ALIGN(4);
|
|
} > IRAM
|
|
|
|
#if 1
|
|
/* reuse pwnage as stack, 0x30c bytes available */
|
|
_exception_stack = BIN_ORIG;
|
|
_supervisor_stack = _exception_stack;
|
|
#else
|
|
/* include stack into DFU image */
|
|
.stack : {
|
|
. += 0x400;
|
|
_supervisor_stack = .;
|
|
. += 0x200;
|
|
_exception_stack = .;
|
|
} > IRAM
|
|
#endif
|
|
|
|
.data : {
|
|
*(.data*)
|
|
*(.rodata*)
|
|
*(.idata*)
|
|
*(.irodata*)
|
|
/* place bootloader IM3 header at the end, mkdfu
|
|
will concatenate the bootloader binary here */
|
|
. = ALIGN(16);
|
|
*(.im3info.data*)
|
|
} > IRAM
|
|
}
|