Skip to content

Commit

Permalink
Repair misguided false handle rodata in LD-file
Browse files Browse the repository at this point in the history
  • Loading branch information
ckormanyos committed Dec 29, 2023
1 parent e1ab22f commit cc7b6b1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
14 changes: 8 additions & 6 deletions ref_app/target/micros/atmega4809/make/atmega4809.ld
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ __initial_stack_pointer = 0x00803FFE;

MEMORY
{
VEC(rx) : ORIGIN = 0, LENGTH = 0x100
ROM(rx) : ORIGIN = 0x100, LENGTH = 48K - 0x100
VEC(rx) : ORIGIN = 0x00000000, LENGTH = 0x00000100
ROM(rx) : ORIGIN = 0x00000100, LENGTH = 48K - 0x00000100
RAM(rwx) : ORIGIN = 0x00802800, LENGTH = 0x00001600
}

Expand Down Expand Up @@ -65,10 +65,6 @@ SECTIONS
. = ALIGN(2);
*(.text*)
. = ALIGN(2);
*(.rodata)
. = ALIGN(2);
*(.rodata*)
. = ALIGN(2);
} > ROM

. = 0x00802800;
Expand All @@ -84,6 +80,12 @@ SECTIONS
*(.data*)
. = ALIGN(2);
KEEP (*(.data*))
*(.rodata) /* Use special handling of rodata (i.e., as part of data since _const_ variables are stored in RAM for AVR arch). */
. = ALIGN(2);
KEEP (*(.rodata))
*(.rodata*)
. = ALIGN(2);
KEEP (*(.rodata*))
_data_end = .;
} > RAM AT > ROM

Expand Down
14 changes: 8 additions & 6 deletions ref_app/target/micros/avr/make/avr.ld
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ __initial_stack_pointer = 0x00800900 - 2;

MEMORY
{
VEC(rx) : ORIGIN = 0, LENGTH = 0x80
ROM(rx) : ORIGIN = 0x80, LENGTH = 32K - 0x80
VEC(rx) : ORIGIN = 0x00000000, LENGTH = 0x00000080
ROM(rx) : ORIGIN = 0x00000080, LENGTH = 32K - 0x00000080
RAM(rwx) : ORIGIN = 0x00800100, LENGTH = 0x00000780 - 0x00000100
}

Expand Down Expand Up @@ -65,10 +65,6 @@ SECTIONS
. = ALIGN(2);
*(.text*)
. = ALIGN(2);
*(.rodata)
. = ALIGN(2);
*(.rodata*)
. = ALIGN(2);
} > ROM

. = 0x00800100;
Expand All @@ -84,6 +80,12 @@ SECTIONS
*(.data*)
. = ALIGN(2);
KEEP (*(.data*))
*(.rodata) /* Use special handling of rodata (i.e., as part of data since _const_ variables are stored in RAM for AVR arch). */
. = ALIGN(2);
KEEP (*(.rodata))
*(.rodata*)
. = ALIGN(2);
KEEP (*(.rodata*))
_data_end = .;
} > RAM AT > ROM

Expand Down

0 comments on commit cc7b6b1

Please sign in to comment.