Forum Discussion
Altera_Forum
Honored Contributor
20 years agonios2-elf-objcopy BUG??
we are using nios2-elf-objcopy.exe to produce hex file after building a project. in ihex file 03 record, that points to program entry point, should be MSB. for example we are have 0x00020000 as ...
Altera_Forum
Honored Contributor
20 years agoHi m_fox,
> this is produced string: > :04000003200001C810 > > WHY??? Because it is the correct format for intel-hex. The address is specified as CS:IP (code segment register value:instruction pointer register value). Together they form a 20-bit segmented address. > it should be > :04000003000201C82E No, this would generate the linear address 000_01e8. The first two bytes "2000" represent bits [19:4], the second two are bits [16:0] ... the two values are added together in the proper bit positions. Basically, the correct values are added like this: 20000 (CS) 001c8 (IP) -------------- 201c8 (20-bit linear) > does it bug in objcopy or in elf file? No, it is not a bug. Regards, --Scott