Beim vergleichen der MAP Files ist mir ist folgendes aufgefallen:
Alter Linker:
1 | 0x20008000 _estack = 0x20008000
|
2 | 0x0801f000 _seemul = 0x801f000
|
3 | 0x00001000 _Minimum_Stack_Size = 0x1000
|
4 | 0x00000001 ASSERT (0x1, Start of memory region flash not aligned for startup vector table)
|
5 |
|
6 | .text 0x08005800 0xb6b8
|
7 | 0x08005800 . = ALIGN (0x80)
|
8 | 0x00000000 _isr_vectorsflash_offs = (. - 0x8005800)
|
9 | *(.isr_vectorsflash)
|
10 | .isr_vectorsflash
|
11 | 0x08005800 0x1e4 FLASH_RUN/startup_stm32f10x_cl.o
|
12 | 0x08005800 g_pfnVectors
|
13 | 0x080059e4 . = ALIGN (0x4)
|
Neuer Linker:
1 | 0x20008000 _estack = (ORIGIN (RAM) + 0x8000)
|
2 | 0x0801f000 _seemul = ORIGIN (EEMUL)
|
3 | 0x00001000 _Minimum_Stack_Size = 0x1000
|
4 | 0x00000001 ASSERT ((ORIGIN (FLASH) == ALIGN (ORIGIN (FLASH), 0x80)), Start of memory region flash not aligned for startup vector table)
|
5 |
|
6 | .text 0x08005800 0xc210
|
7 | 0x08005800 . = ALIGN (0x80)
|
8 | 0x00000000 _isr_vectorsflash_offs = (. - ORIGIN (FLASH))
|
9 | *(.isr_vectorsflash)
|
10 | .isr_vectorsflash
|
11 | 0x08005800 0x1e4 FLASH_RUN/startup_stm32f10x_cl.o
|
12 | 0x08005800 g_pfnVectors
|
13 | 0x080059e4 . = ALIGN (0x4)
|
Der neue Linker scheint die ORIGIN() Funktion nicht mehr zu kennen?
Ich habe das Linkerskript geändert und die Werte hart reingeschrieben,
statt mit ORIGIN():
1 | 0x20008000 _estack = 0x20008000
|
2 | 0x0801f000 _seemul = 0x801f000
|
3 | 0x00001000 _Minimum_Stack_Size = 0x1000
|
4 | 0x00000001 ASSERT ((ORIGIN (FLASH) == ALIGN (ORIGIN (FLASH), 0x80)), Start of memory region flash not aligned for startup vector table)
|
5 |
|
6 | .text 0x08005800 0xc210
|
7 | 0x08005800 . = ALIGN (0x80)
|
8 | 0x00000000 _isr_vectorsflash_offs = (. - 0x8005800)
|
9 | *(.isr_vectorsflash)
|
10 | .isr_vectorsflash
|
11 | 0x08005800 0x1e4 FLASH_RUN/startup_stm32f10x_cl.o
|
12 | 0x08005800 g_pfnVectors
|
13 | 0x080059e4 . = ALIGN (0x4)
|
Ich habe beide MAP Files verglichen, er ändert nichts anderes.
Aber die neue HEX läuft!
Es gibt nur einen Unterschied zwischen den Hex.
Bei der funktionierenden steht an einer Stelle
08000000
und bei der nicht funktionierenden
08005800
Es reicht übrigens, wenn ich nur das ORIGIN() bei
_isr_vectorsflash_offs = (. - 0x8005800)
ersetze.
Irgendwie kommt er mit dem ORIGIN() durcheinander oder das ist falsch
eingesetzt worden.