Buy(Cart) Contact NSDSP Home

nshex - partition

The partition command partitions the device. The partitioning of the device can also be requested from the nshex command line with the -p switch. Once the device is partitioned, this cannot be undone.

This command is only valid for dual-partition devices. Such devices may be treated as any other device, or they can be partitioned. When partitioned, the device is split into two partitions and each partition can hold its own application. Partitioning changes the addressing, so HEX files for partitioned and unpartitioned devices are not compatible. Therefore the partition command must be used if the target device is expected to be partitioned.

When the device is partitioned, all subsequent write commands will add the FBOOT register to the HEX file being written. This is necessary to inform NSDSP (or other programmer) that the device must be partitioned before being programmed.






# Merge two applications in two different partitions

#specify device name and request partitioning
device PIC24FJ1024GA610

#read the application HEX files
app1 = read(%1.hex)
app2 = read(%2.hex)

#shift app2 into the second partition
app2 = shift(app2,0x400000,dev)

#combine everything together
mix = merge(app1,app2)

This example shows how two separate applications can be put together (each in its own partition).

First, the HEX files for both applications are loaded. The names of the HEX files must be supplied on the command line.

Then, one of the applications is shifted to the second partition with the shift command (second partition starts at address 0x400000).

Finally, the partitions are mixed together with the merge command and saved as "production.hex". The file is ready to be programmed on the chip

Northern Software Home NSDSP Contact Us Purchase/Vew Cart

© 2007-2021 Northern Software Inc. All Rights Reserved.