История изменений
Исправление trex6, (текущая версия) :
$ arm-none-eabi-objdump -h ./test1.elf
./test1.elf: file format elf32-littlearm
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000048 00000000 00000000 00008000 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000008 10000000 00000048 00010000 2**2
CONTENTS, ALLOC, LOAD, DATA
2 .bss 00000001 10000008 00000050 00010008 2**0
ALLOC
3 .heap 00001000 10000010 10000010 00010008 2**3
CONTENTS
4 .stack_dummy 00000100 10001010 10001010 00011008 2**3
CONTENTS
5 .ARM.attributes 00000025 00000000 00000000 00011108 2**0
CONTENTS, READONLY
6 .comment 0000002a 00000000 00000000 0001112d 2**0
CONTENTS, READONLY
7 .debug_line 000000ae 00000000 00000000 00011157 2**0
CONTENTS, READONLY, DEBUGGING
8 .debug_info 000000cb 00000000 00000000 00011205 2**0
CONTENTS, READONLY, DEBUGGING
9 .debug_abbrev 0000005d 00000000 00000000 000112d0 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_aranges 00000048 00000000 00000000 00011330 2**3
CONTENTS, READONLY, DEBUGGING
11 .debug_ranges 00000030 00000000 00000000 00011378 2**3
CONTENTS, READONLY, DEBUGGING
12 .debug_macinfo 000021b8 00000000 00000000 000113a8 2**0
CONTENTS, READONLY, DEBUGGING
13 .debug_loc 00000038 00000000 00000000 00013560 2**0
CONTENTS, READONLY, DEBUGGING
14 .debug_pubnames 0000001b 00000000 00000000 00013598 2**0
CONTENTS, READONLY, DEBUGGING
15 .debug_str 00000044 00000000 00000000 000135b3 2**0
CONTENTS, READONLY, DEBUGGING
16 .debug_frame 0000002c 00000000 00000000 000135f8 2**2
CONTENTS, READONLY, DEBUGGING
P.S. В итоге с получившимся файлом:
(gdb) load
Loading section .text, size 0x48 lma 0x0
Loading section .data, size 0x8 lma 0x48
Start address 0x0, load size 80
Transfer rate: 307 bytes/sec, 40 bytes/write.
(gdb) break main
Function "main" not defined.
Make breakpoint pending on future shared library load? (y or [n])y
(gdb)continue
P.P.S. В openocd:
Warn : acknowledgment received, but no packet pending
Warn : Verification will fail since checksum in image (0x6803b508) to be written to flash is different from calculated vector checksum (0x11c95673).
Warn : To remove this warning modify build tools on developer PC to inject correct LPC vector checksum.
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Исправление trex6, :
$ arm-none-eabi-objdump -h ./test1.elf
./test1.elf: file format elf32-littlearm
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000048 00000000 00000000 00008000 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000008 10000000 00000048 00010000 2**2
CONTENTS, ALLOC, LOAD, DATA
2 .bss 00000001 10000008 00000050 00010008 2**0
ALLOC
3 .heap 00001000 10000010 10000010 00010008 2**3
CONTENTS
4 .stack_dummy 00000100 10001010 10001010 00011008 2**3
CONTENTS
5 .ARM.attributes 00000025 00000000 00000000 00011108 2**0
CONTENTS, READONLY
6 .comment 0000002a 00000000 00000000 0001112d 2**0
CONTENTS, READONLY
7 .debug_line 000000ae 00000000 00000000 00011157 2**0
CONTENTS, READONLY, DEBUGGING
8 .debug_info 000000cb 00000000 00000000 00011205 2**0
CONTENTS, READONLY, DEBUGGING
9 .debug_abbrev 0000005d 00000000 00000000 000112d0 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_aranges 00000048 00000000 00000000 00011330 2**3
CONTENTS, READONLY, DEBUGGING
11 .debug_ranges 00000030 00000000 00000000 00011378 2**3
CONTENTS, READONLY, DEBUGGING
12 .debug_macinfo 000021b8 00000000 00000000 000113a8 2**0
CONTENTS, READONLY, DEBUGGING
13 .debug_loc 00000038 00000000 00000000 00013560 2**0
CONTENTS, READONLY, DEBUGGING
14 .debug_pubnames 0000001b 00000000 00000000 00013598 2**0
CONTENTS, READONLY, DEBUGGING
15 .debug_str 00000044 00000000 00000000 000135b3 2**0
CONTENTS, READONLY, DEBUGGING
16 .debug_frame 0000002c 00000000 00000000 000135f8 2**2
CONTENTS, READONLY, DEBUGGING
P.S. В итоге с получившимся файлом:
(gdb) load
Loading section .text, size 0x48 lma 0x0
Loading section .data, size 0x8 lma 0x48
Start address 0x0, load size 80
Transfer rate: 307 bytes/sec, 40 bytes/write.
(gdb) break main
Function "main" not defined.
Make breakpoint pending on future shared library load? (y or [n])
Исходная версия trex6, :
$ arm-none-eabi-objdump -h ./test1.elf
./test1.elf: file format elf32-littlearm
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000048 00000000 00000000 00008000 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000008 10000000 00000048 00010000 2**2
CONTENTS, ALLOC, LOAD, DATA
2 .bss 00000001 10000008 00000050 00010008 2**0
ALLOC
3 .heap 00001000 10000010 10000010 00010008 2**3
CONTENTS
4 .stack_dummy 00000100 10001010 10001010 00011008 2**3
CONTENTS
5 .ARM.attributes 00000025 00000000 00000000 00011108 2**0
CONTENTS, READONLY
6 .comment 0000002a 00000000 00000000 0001112d 2**0
CONTENTS, READONLY
7 .debug_line 000000ae 00000000 00000000 00011157 2**0
CONTENTS, READONLY, DEBUGGING
8 .debug_info 000000cb 00000000 00000000 00011205 2**0
CONTENTS, READONLY, DEBUGGING
9 .debug_abbrev 0000005d 00000000 00000000 000112d0 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_aranges 00000048 00000000 00000000 00011330 2**3
CONTENTS, READONLY, DEBUGGING
11 .debug_ranges 00000030 00000000 00000000 00011378 2**3
CONTENTS, READONLY, DEBUGGING
12 .debug_macinfo 000021b8 00000000 00000000 000113a8 2**0
CONTENTS, READONLY, DEBUGGING
13 .debug_loc 00000038 00000000 00000000 00013560 2**0
CONTENTS, READONLY, DEBUGGING
14 .debug_pubnames 0000001b 00000000 00000000 00013598 2**0
CONTENTS, READONLY, DEBUGGING
15 .debug_str 00000044 00000000 00000000 000135b3 2**0
CONTENTS, READONLY, DEBUGGING
16 .debug_frame 0000002c 00000000 00000000 000135f8 2**2
CONTENTS, READONLY, DEBUGGING