If I try to program a S19XE with a S-record (.S19) using USBDM 4.9.4b I am told:
Programming of the target flash failed!
Reason: Program data not within Target Flash Memory.
This same .s19 is fine with P&E BDM multilink.
I use Bin2S19.exe to create a .S19 from a 32K binary file, by setting start address to 7F8000.
Thanks in advance
RichA
Dear RichA,
Assuming you are referring to MC9S12XEP.
There are two memory maps supported (by choosing either MC9S12XEP100 or MC9S12XEP-Linear)
The MC9S12XEP100 memory map is based upon that used by Codewarrior. For page addressing the following XML describes the virtual address mapping using paging:
<memory pageAddress="0x0015" registerAddress="0x0100" type="flash" securityAddress="0xFF00" sectorSize="1024"> <securityInfoRef ref="HCS12-default-security-off" /> <securityInfoRef ref="HCS12-default-security-on" /> <memoryRange end= "0x7FFF" start= "0x4000" /> <!-- Fixed 0xFD --> <memoryRange end= "0xBFFF" start= "0x8000" pageNo="0xFE" /> <!-- Reset default 0xFE --> <memoryRange end="0xC0BFFF" start="0xC08000" /> <memoryRange end="0xC1BFFF" start="0xC18000" /> <memoryRange end="0xC2BFFF" start="0xC28000" /> <memoryRange end="0xC3BFFF" start="0xC38000" /> <memoryRange end="0xC4BFFF" start="0xC48000" /> <memoryRange end="0xC5BFFF" start="0xC58000" /> <memoryRange end="0xC6BFFF" start="0xC68000" /> <memoryRange end="0xC7BFFF" start="0xC78000" /> <memoryRange end="0xC8BFFF" start="0xC88000" /> <memoryRange end="0xC9BFFF" start="0xC98000" /> <memoryRange end="0xCABFFF" start="0xCA8000" /> <memoryRange end="0xCBBFFF" start="0xCB8000" /> <memoryRange end="0xCCBFFF" start="0xCC8000" /> <memoryRange end="0xCDBFFF" start="0xCD8000" /> <memoryRange end="0xCEBFFF" start="0xCE8000" /> <memoryRange end="0xCFBFFF" start="0xCF8000" /> <memoryRange end="0xD0BFFF" start="0xD08000" /> <memoryRange end="0xD1BFFF" start="0xD18000" /> <memoryRange end="0xD2BFFF" start="0xD28000" /> <memoryRange end="0xD3BFFF" start="0xD38000" /> <memoryRange end="0xD4BFFF" start="0xD48000" /> <memoryRange end="0xD5BFFF" start="0xD58000" /> <memoryRange end="0xD6BFFF" start="0xD68000" /> <memoryRange end="0xD7BFFF" start="0xD78000" /> <memoryRange end="0xD8BFFF" start="0xD88000" /> <memoryRange end="0xD9BFFF" start="0xD98000" /> <memoryRange end="0xDABFFF" start="0xDA8000" /> <memoryRange end="0xDBBFFF" start="0xDB8000" /> <memoryRange end="0xDCBFFF" start="0xDC8000" /> <memoryRange end="0xDDBFFF" start="0xDD8000" /> <memoryRange end="0xDEBFFF" start="0xDE8000" /> <memoryRange end="0xDFBFFF" start="0xDF8000" /> <memoryRange end="0xE0BFFF" start="0xE08000" /> <memoryRange end="0xE1BFFF" start="0xE18000" /> <memoryRange end="0xE2BFFF" start="0xE28000" /> <memoryRange end="0xE3BFFF" start="0xE38000" /> <memoryRange end="0xE4BFFF" start="0xE48000" /> <memoryRange end="0xE5BFFF" start="0xE58000" /> <memoryRange end="0xE6BFFF" start="0xE68000" /> <memoryRange end="0xE7BFFF" start="0xE78000" /> <memoryRange end="0xE8BFFF" start="0xE88000" /> <memoryRange end="0xE9BFFF" start="0xE98000" /> <memoryRange end="0xEABFFF" start="0xEA8000" /> <memoryRange end="0xEBBFFF" start="0xEB8000" /> <memoryRange end="0xECBFFF" start="0xEC8000" /> <memoryRange end="0xEDBFFF" start="0xED8000" /> <memoryRange end="0xEEBFFF" start="0xEE8000" /> <memoryRange end="0xEFBFFF" start="0xEF8000" /> <memoryRange end="0xF0BFFF" start="0xF08000" /> <memoryRange end="0xF1BFFF" start="0xF18000" /> <memoryRange end="0xF2BFFF" start="0xF28000" /> <memoryRange end="0xF3BFFF" start="0xF38000" /> <memoryRange end="0xF4BFFF" start="0xF48000" /> <memoryRange end="0xF5BFFF" start="0xF58000" /> <memoryRange end="0xF6BFFF" start="0xF68000" /> <memoryRange end="0xF7BFFF" start="0xF78000" /> <memoryRange end="0xF8BFFF" start="0xF88000" /> <memoryRange end="0xF9BFFF" start="0xF98000" /> <memoryRange end="0xFABFFF" start="0xFA8000" /> <memoryRange end="0xFBBFFF" start="0xFB8000" /> <memoryRange end="0xFCBFFF" start="0xFC8000" /> <memoryRange end="0xFDBFFF" start="0xFD8000" /> <memoryRange end="0xFEBFFF" start="0xFE8000" /> <memoryRange end="0xFFBFFF" start="0xFF8000" /> <memoryRange end= "0xFFFF" start= "0xC000" /> <!-- Fixed 0xFF --> </memory>
The programmer also supports linear addressing for MC9S12XEP-Linear but this is somewhat arbitrary. It is based upon the linear address map descibed in the reference manual for the device.
Figure 3-19. S12XE CPU & BDM Global Address Mapping
This is as follows:
<memory registerAddress="0x0100" type="flash" securityAddress="0x7FFF00" sectorSize="1024" addressMode="linear"> <securityInfoRef ref="HCS12-default-security-off" /> <securityInfoRef ref="HCS12-default-security-on" /> <memoryRange end="0x7FFFFF" start="0x700000" /> </memory>
The later has had no practical testing as I have not used any tools that use a linear map.
Can descibe how your 32K image is meant to map into the Flash and/or memory space of the target? If you can provide the original binary file and and .sx19 file I can investigate further.
bye