Hello Xarion,
Xarion Comoretto wrote:
3) Is there some code that can interpret the S19 file in a way that allows me to reflash my device, or perhaps it would be easier to restructure the S19 file before sending over the air?
It is better to send the S19 file over the air because this has an ASCII text only format, and each line contains a checksum value for some measure of error detection. The incoming data should be checked line-by-line for any checksum error, before each record is stored in EEPROM. Storing the data as incoming S19 records will require an EEPROM size about 2.5 times the maximum program size. However you can repack each character pair to a single byte within the EEPROM, to halve the size. The overhead for each program data record consists of record type, record size, start address and the final checksum byte. For the QE32 device, only the S2 records, with 16-bit addresses, would be of interest.
It would alternatively be possible to treat the EEPROM as a direct image of the program space within flash (with a fixed offset value). The data within each program data record would be placed at the correct location within the image, as it is received. This would imply that the whole image would need to be programmed into flash irrespective of the actual program size.
Xarion Comoretto wrote:
2) In order for me to read from the EEPROM (via SPI) would I need to store my SPI routines in RAM too?
If using byte-by-byte programming, you would simply read each data byte from EEPROM, and then immediately program the value at the required address. However, if using burst mode programming of each flash row (slightly shorter programming time), the approach would be to store all the data from the particular record within a RAM buffer, prior to programming flash. Burst programming will require greater RAM resident code size than byte-by-byte programming.
Xarion Comoretto wrote:
1) In order for me to flash I need to make use of the doonstack files provided - This is stored in RAM which will allow me to write to where my user code. Which part in the doonstack ASM file says that it is stored in RAM?
Using the "doonstack" method means that the RAM resident code is temporarily loaded to the stack (in RAM), and executed from there.
Regards,
Mac