This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
trying to build ROM image for hello
Hello.
I'm using CYG_HAL_STARTUP = ROM, and i have built a .elf for the hello.c
program.
I'm trying to make a binary image or S-record file so I can burn a EPROM.
The linker script locates RAM and ROM as shown:
MEMORY
{
ram : ORIGIN = 0x80000400, LENGTH = 0xfffc00
rom : ORIGIN = 0x9fc00000, LENGTH = 0x80000
}
I make a binary with (is this right?):
$ objcopy --verbose -O binary -S -g -R .mdebug hello hello.img
I get a huge file since RAM sections are being included.
Below is the output of objdump, I only want the ROM sections, so what do i
need to do ?
are those .lit8 and .lit4 sections screwing things up ?
Thanks,
Chris
$ objdump -h hello
hello: file format elf32-bigmips
Sections:
Idx Name Size VMA LMA File off
Algn
0 .rom_vectors 00000498 000000009fc00000 000000009fc00000 00001000
2**0
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .init 00000000 000000009fc004c0 000000009fc004c0 00014788
2**0
CONTENTS
2 .text 00011d38 000000009fc004c0 000000009fc004c0 000014c0
2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
3 .fini 00000000 000000009fc12200 000000009fc12200 00014788
2**0
CONTENTS
4 .rodata 000009d4 000000009fc12200 000000009fc12200 00013200
2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .rodata1 00000000 000000009fc12c00 000000009fc12c00 00014788
2**0
CONTENTS
6 .data 00000288 0000000080000400 000000009fc12c00 00014400
2**2
CONTENTS, ALLOC, LOAD, DATA
7 .data1 00000000 00000000800006c0 00000000800006c0 00014788
2**0
CONTENTS
8 .eh_frame 00000000 00000000800006c0 00000000800006c0 00014788
2**0
CONTENTS
9 .gcc_except_table 00000000 00000000800006c0 00000000800006c0 00014788
2**0
CONTENTS
10 .ctors 00000030 00000000800006c0 000000009fc12ec0 000146c0
2**2
CONTENTS, ALLOC, LOAD, DATA
11 .dtors 00000020 0000000080000700 000000009fc12f00 00014700
2**2
CONTENTS, ALLOC, LOAD, DATA
12 .devtab 00000040 0000000080000740 000000009fc12f40 00014740
2**3
CONTENTS, ALLOC, LOAD, DATA
13 .got 00000000 0000000080000780 0000000080000780 00014788
2**0
CONTENTS
14 .dynamic 00000000 0000000080000780 0000000080000780 00014788
2**0
CONTENTS
15 .sdata 00000008 0000000080000780 000000009fc12f80 00014780
2**2
CONTENTS, ALLOC, LOAD, DATA
16 .lit8 00000000 00000000800007c0 00000000800007c0 00014788
2**0
CONTENTS, ALLOC, LOAD, DATA
17 .lit4 00000000 00000000800007c0 00000000800007c0 00014788
2**0
CONTENTS, ALLOC, LOAD, DATA
18 .sbss 00000030 00000000800007c0 00000000800007c0 000007c0
2**3
ALLOC
19 .bss 00004024 0000000080000800 0000000080000800 000007d0
2**4
ALLOC
20 .reginfo 00000018 0000000000000000 0000000000000000 00014788
2**2
CONTENTS, READONLY