SQTP in PIC with MPLAB X IPE

Thread Starter

bug13

Joined Feb 13, 2012
2,002
Hi guys

Just recently playing with SQTP, so I read this file:

http://ww1.microchip.com/downloads/en/DeviceDoc/50002539A.pdf

And understand how it format and stuff. But it doesn't seen to tell me how to use it.

So I try it myself with a simple blinking code, I program the chip with a normal blinking code, work fine.

Then reprogram the chip with SQTP file included. It looks like the IPE just simply replace the data at the address specify in the SQTP file. And this corrupted my code and the blinking doesn't work anymore.

So if I want to add a serial number in my firmware, do I reserve some space in my firmware?

For example, if I want to add a 4 bytes serial number at address 0x1000, do I put something like this in my firmware so my normal code is not overwritten by the SQTP?
Code:
// reserve 4 bytes at address 0x1000 for serial number
const uint8_t serial_num[] @ 0x1000 = {0xFF, 0xFF, 0xFF, 0xFF};
Thanks guys
 
Top