removeshift shrink write Download
nshex - remove
The remove command removes a part of a HEX image. The image part may be selected by memory type (such as code, configuration, EEPROM etc.), or as a range of addresses.
target = remove(source,type,from,to,units)
|source||The Source image.|
|type||Memory to remove. May be one of the following:
|from||May only be specified if the type is "range". Specifies the beginning of the range to be removed.|
|to||May only be specified if the type is "range". Specifies the end of the range to be removed. This address itself is not included in the range.|
|units||Optional. May only be specified if the type is "range".
Specifies the addresses to be used. For PIC18 and PIC32, there is no difference
between units. For PIC16, PIC24,and dsPIC33, the "hex" units are
the device units multiplied by two. If the device is unknown, only "hex"
units may be used.
May be one of the following:
noeeprom = remove(raw,eeprom)
This command removes all the EEPROM data from the raw HEX image. The new image containing no EEPROM data is named "noeeprom".
# nootp.txt - Remove OTP Memory from HEX file
#read the HEX file
hex = read(%1.hex)
hex = remove(hex,otp)
#write file back
This example shows an nshex command file designed to remove all OTP memory from the HEX file.
First, a HEX file is loaded. The name of the file must be specified on the command line.
Then the OTP memory is removed.
Finally, the file us written back, overwriting the original HEX file.
This command file could be used like this:
nshex -s nootp.txt -d dsPIC33EP128GS808 app
Here nshex is used to remove OTP memory from the "app.hex" file. The PIC name must be specified because different PICs have OTP memory at different addresses.
© 2007-2023 Northern Software Inc. All Rights Reserved.