Hello,
I just have a problem with the linker or ELF-producer (clabs.exe) for getting a ELF-File that can be downloaded and debugged with the Hiware debugger using Multilink.
The problem does not occur when I am downloading a S19-file. The firmware runs correctly but debugging is not possible. With all tried settings I always get the error from the elf-loader "no memory at location..." when tring the ELF-file.
extract from linker:
+seg .text -b0xC000 -o0xC000 -n.text -m0x3F00 -s flash --> no memory at location 0x00C000
when using this setting:
+seg .text -b0xF8000 -o0xC000 -n.text -m0x3F00 -s flash --> no memory at location 0x0F8000
The S19 always looks correct and works.
Has anyone a hint what settings I have to change?
Solved! Go to Solution.
Christain,
The PFlash map for the S12G is basically the same as the S12P. Here are the +seg definitions I used in an S12P64 project with the Cosmic compiler, using the Hiwave debugger:
+seg .text -b 0x4000 -m 0x4000 -x -f 0x3f
+seg .text -b 0x38000 -o 0x8000 -m 0x4000 -x -f 0x3f
+seg .text -b 0xc000 -m 0x3f00 -n .text
+seg .const -a .text -f 0x3f
The -f option fills unused space within a segment with the SWI instruction (0x3f). The -x option allows one segment to automatically "spill over" into the next non-contiguous segment when the segment becomes full.
When using the cvdwarf utility to create an ELF/DWARF file for Hiwave, make sure to use the +page1 option on the command line. i.e. cvdwarf +page1 -o <OutputPathFileName> <InputPathFileName>.h12
Hope this helps.
Best Regards,
Gordon
Christain,
The PFlash map for the S12G is basically the same as the S12P. Here are the +seg definitions I used in an S12P64 project with the Cosmic compiler, using the Hiwave debugger:
+seg .text -b 0x4000 -m 0x4000 -x -f 0x3f
+seg .text -b 0x38000 -o 0x8000 -m 0x4000 -x -f 0x3f
+seg .text -b 0xc000 -m 0x3f00 -n .text
+seg .const -a .text -f 0x3f
The -f option fills unused space within a segment with the SWI instruction (0x3f). The -x option allows one segment to automatically "spill over" into the next non-contiguous segment when the segment becomes full.
When using the cvdwarf utility to create an ELF/DWARF file for Hiwave, make sure to use the +page1 option on the command line. i.e. cvdwarf +page1 -o <OutputPathFileName> <InputPathFileName>.h12
Hope this helps.
Best Regards,
Gordon