Skip to content

Commit 2495380

Browse files
tridgeAlkaMotors
authored andcommitted
fixed and clarified FILE_NAME offset in ldscripts
the main bug was in f031 which had this: FILE_NAME (rx) : ORIGIN = 0x08007C00 - 32, LENGTH = 32 EEPROM (rx) : ORIGIN = 0x080007C00, LENGTH = 1K there is one too many zeros in the EEPROM origin
1 parent b8ad37f commit 2495380

File tree

8 files changed

+10
-9
lines changed

8 files changed

+10
-9
lines changed

Mcu/e230/GD32E230K8_FLASH.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ _Min_Stack_Size = 0x400; /* required amount of stack */
1212
MEMORY
1313
{
1414
FLASH (rx) : ORIGIN = 0x08001000, LENGTH = 27K
15-
FILE_NAME (rx) : ORIGIN = 0x08007C00 - 32, LENGTH = 32
1615
EEPROM (rx) : ORIGIN = 0x08007C00, LENGTH = 1K
16+
FILE_NAME (rx) : ORIGIN = ORIGIN(EEPROM) - 32, LENGTH = 32
1717
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 16K
1818

1919
}

Mcu/f031/STM32F031C6TX_FLASH.ld

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ MEMORY
4040
RAM (xrw) : ORIGIN = 0x200000C0, LENGTH = 4K - 192
4141
FLASH_VECTAB (rx) : ORIGIN = 0x08001000, LENGTH = 192
4242
FLASH (rx) : ORIGIN = ORIGIN(FLASH_VECTAB) + LENGTH(FLASH_VECTAB), LENGTH = 27K - 32 - LENGTH(FLASH_VECTAB)
43-
FILE_NAME (rx) : ORIGIN = 0x08007C00 - 32, LENGTH = 32
44-
EEPROM (rx) : ORIGIN = 0x080007C00, LENGTH = 1K
45-
43+
EEPROM (rx) : ORIGIN = 0x08007C00, LENGTH = 1K
44+
FILE_NAME (rx) : ORIGIN = ORIGIN(EEPROM) - 32, LENGTH = 32
45+
4646
}
4747

4848
/* Sections */

Mcu/f051/STM32F051K6TX_FLASH.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ MEMORY
4141
RAM (xrw) : ORIGIN = 0x200000C0, LENGTH = 8K - 192
4242
FLASH_VECTAB (rx) : ORIGIN = 0x08001000, LENGTH = 192
4343
FLASH (rx) : ORIGIN = ORIGIN(FLASH_VECTAB) + LENGTH(FLASH_VECTAB), LENGTH = 27K - 32 - LENGTH(FLASH_VECTAB)
44-
FILE_NAME (rx) : ORIGIN = 0x08007C00 - 32, LENGTH = 32
4544
EEPROM (rx) : ORIGIN = 0x08007C00, LENGTH = 1K
45+
FILE_NAME (rx) : ORIGIN = ORIGIN(EEPROM) - 32, LENGTH = 32
4646
}
4747

4848
/* Sections */

Mcu/f421/AT32F421x6_FLASH.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ _Min_Stack_Size = 0x400; /* required amount of stack */
3939
MEMORY
4040
{
4141
FLASH (rx) : ORIGIN = 0x08001000, LENGTH = 27K
42-
FILE_NAME (rx) : ORIGIN = 0x08007C00 - 32, LENGTH = 32
4342
EEPROM (rx) : ORIGIN = 0x08007C00, LENGTH = 1K
43+
FILE_NAME (rx) : ORIGIN = ORIGIN(EEPROM) - 32, LENGTH = 32
4444
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 15K
4545

4646
}

Mcu/g031/STM32G031GBUX_FLASH.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ MEMORY
4242
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 8K
4343
FLASH_VECTAB (rx) : ORIGIN = 0x08001000, LENGTH = 192
4444
FLASH (rx) : ORIGIN = ORIGIN(FLASH_VECTAB) + LENGTH(FLASH_VECTAB), LENGTH = 62K - 32 - LENGTH(FLASH_VECTAB)
45-
FILE_NAME (rx) : ORIGIN = 0x0800F800 - 32, LENGTH = 32
4645
EEPROM (rx) : ORIGIN = 0x0800F800, LENGTH = 2K
46+
FILE_NAME (rx) : ORIGIN = ORIGIN(EEPROM) - 32, LENGTH = 32
4747
}
4848

4949
/* Sections */

Mcu/g071/STM32G071GBUX_FLASH.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ MEMORY
4242
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 36K
4343
FLASH_VECTAB (rx) : ORIGIN = 0x08001000, LENGTH = 192
4444
FLASH (rx) : ORIGIN = ORIGIN(FLASH_VECTAB) + LENGTH(FLASH_VECTAB), LENGTH = 62K - 32 - LENGTH(FLASH_VECTAB)
45-
FILE_NAME (rx) : ORIGIN = 0x0800F800 - 32, LENGTH = 32
4645
EEPROM (rx) : ORIGIN = 0x0800F800, LENGTH = 2K
46+
FILE_NAME (rx) : ORIGIN = ORIGIN(EEPROM) - 32, LENGTH = 32
4747
}
4848

4949
/* Sections */

Mcu/g431/STM32G431_FLASH.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ MEMORY
1616
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K
1717
FLASH_VECTAB (rx) : ORIGIN = 0x08001000, LENGTH = 512
1818
FLASH (rx) : ORIGIN = ORIGIN(FLASH_VECTAB) + LENGTH(FLASH_VECTAB), LENGTH = 62K - 32 - LENGTH(FLASH_VECTAB)
19-
FILE_NAME (rx) : ORIGIN = 0x0800F800 - 32, LENGTH = 32
2019
EEPROM (rx) : ORIGIN = 0x0800F800, LENGTH = 2K
20+
FILE_NAME (rx) : ORIGIN = ORIGIN(EEPROM) - 32, LENGTH = 32
2121
}
2222

2323
/* Sections */

Mcu/v203/Link.ld

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ MEMORY
2020
RESET_FLASH(rx) : ORIGIN = 0x00001000, LENGTH = 192
2121
FLASH_VERSION(rx) : ORIGIN = 0x000010C0, LENGTH = 16
2222
FLASH (rx) : ORIGIN = 0x000010D0, LENGTH = 56K - 0xD0
23+
EEPROM (rx) : ORIGIN = 0x0000f800, LENGTH = 1K
2324
FILE_NAME (rx) : ORIGIN = 0x0000f800 - 32, LENGTH = 32
2425
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K
2526
}

0 commit comments

Comments
 (0)