mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
trezorhal: update linker scripts
This commit is contained in:
parent
435e96e1b3
commit
a440f3d322
@ -405,7 +405,7 @@ $(BUILD)/$(TARGET).elf: $(OBJ)
|
|||||||
$(Q)$(SIZE) $@
|
$(Q)$(SIZE) $@
|
||||||
|
|
||||||
$(BUILD)/$(TARGET).bin: $(BUILD)/$(TARGET).elf
|
$(BUILD)/$(TARGET).bin: $(BUILD)/$(TARGET).elf
|
||||||
$(Q)$(OBJCOPY) -O binary -j .flash -j .data $^ $(BUILD)/$(TARGET).bin
|
$(Q)$(OBJCOPY) -O binary -j .header -j .flash -j .data $^ $(BUILD)/$(TARGET).bin
|
||||||
|
|
||||||
$(BUILD)/%.o: %.S
|
$(BUILD)/%.o: %.S
|
||||||
$(ECHO) "CC $<"
|
$(ECHO) "CC $<"
|
||||||
|
@ -139,7 +139,7 @@ $(BUILD)/$(TARGET).elf: $(OBJ)
|
|||||||
$(Q)$(SIZE) $@
|
$(Q)$(SIZE) $@
|
||||||
|
|
||||||
$(BUILD)/$(TARGET).bin: $(BUILD)/$(TARGET).elf
|
$(BUILD)/$(TARGET).bin: $(BUILD)/$(TARGET).elf
|
||||||
$(Q)$(OBJCOPY) -O binary -j .flash -j .data $^ $(BUILD)/$(TARGET).bin
|
$(Q)$(OBJCOPY) -O binary -j .header -j .flash -j .data $^ $(BUILD)/$(TARGET).bin
|
||||||
|
|
||||||
$(BUILD)/%.o: %.S
|
$(BUILD)/%.o: %.S
|
||||||
$(ECHO) "CC $<"
|
$(ECHO) "CC $<"
|
||||||
|
@ -25,11 +25,16 @@ ENTRY(Reset_Handler)
|
|||||||
/* define output sections */
|
/* define output sections */
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
|
/* Firmware Header */
|
||||||
|
.header :
|
||||||
|
{
|
||||||
|
KEEP(*(.header))
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
/* The startup code goes first into FLASH */
|
/* The startup code goes first into FLASH */
|
||||||
.flash :
|
.flash :
|
||||||
{
|
{
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
KEEP(*(.header)) /* Firmware Header */
|
|
||||||
KEEP(*(.isr_vector)) /* Startup code */
|
KEEP(*(.isr_vector)) /* Startup code */
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
*(.text*) /* .text* sections (code) */
|
*(.text*) /* .text* sections (code) */
|
||||||
@ -87,7 +92,7 @@ SECTIONS
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* RAM extents for the garbage collector */
|
/* RAM extents for the garbage collector */
|
||||||
_codelen = SIZEOF(.flash) + SIZEOF(.data) - 512;
|
_codelen = SIZEOF(.flash) + SIZEOF(.data);
|
||||||
_ram_start = ORIGIN(RAM);
|
_ram_start = ORIGIN(RAM);
|
||||||
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
|
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
|
||||||
_heap_start = _ebss; /* heap starts just after statically allocated memory */
|
_heap_start = _ebss; /* heap starts just after statically allocated memory */
|
||||||
|
@ -25,11 +25,16 @@ ENTRY(Reset_Handler)
|
|||||||
/* define output sections */
|
/* define output sections */
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
|
/* Firmware Header */
|
||||||
|
.header :
|
||||||
|
{
|
||||||
|
KEEP(*(.header))
|
||||||
|
} > FLASH
|
||||||
|
|
||||||
/* The startup code goes first into FLASH */
|
/* The startup code goes first into FLASH */
|
||||||
.flash :
|
.flash :
|
||||||
{
|
{
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
KEEP(*(.header)) /* Firmware Header */
|
|
||||||
KEEP(*(.isr_vector)) /* Startup code */
|
KEEP(*(.isr_vector)) /* Startup code */
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
*(.text*) /* .text* sections (code) */
|
*(.text*) /* .text* sections (code) */
|
||||||
@ -87,7 +92,7 @@ SECTIONS
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* RAM extents for the garbage collector */
|
/* RAM extents for the garbage collector */
|
||||||
_codelen = SIZEOF(.flash) + SIZEOF(.data) - 512;
|
_codelen = SIZEOF(.flash) + SIZEOF(.data);
|
||||||
_ram_start = ORIGIN(RAM);
|
_ram_start = ORIGIN(RAM);
|
||||||
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
|
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
|
||||||
_heap_start = _ebss; /* heap starts just after statically allocated memory */
|
_heap_start = _ebss; /* heap starts just after statically allocated memory */
|
||||||
|
Loading…
Reference in New Issue
Block a user