Hi,
I'm working on a project using an Infinion XE164 and Keil PK166. My current objective is to re-flash the controller in the field. To get a update file I was trying this approach:
- Have PK166 compiler generate a *.obj file - use OH166.EXE to convert *.obj to *.h86 (Intel-HEX) - use my own program to interpret the hex file "back" into a memory dump - write this dump back to flash
My problem is the second step. What I want to do is this command line:
OH166.EXE file.obj offset(0xc00000) range(0xc00000-0xc3ffff) h167 flash (0x00)
This should extract the range 0xc0'0000-0xc3'ffff (the contents of the first flash segment of the XE) from the OBJ and write it as hex, address zero being 0xc0'0000 (start-of-flash).
However, it doesn't work as expected:
*** ERROR: DUPLICATE OR CONFLICTING CONTROL
The error is apparently that the options RANGE and OFFSET can't be used in the same command. If I omit OFFSET, I get the correct range, but the HEX has address zero as 0x0. If I omit the RANGE, the HEX has address zero as 0xc0'0000, but includes the full address space of the OBJ.
Theoretically, provided that OH166 doesn't actually use the zero address for anything else, it shouldn't be a problem as I know where to write the file to (starting at 0xc0'0000, not 0x0) but it is a little bit irritating.
Can anyone explain to me the discrepancy of the two switches?
Regs, Alto Speckhardt