I am writing a PC application to communicate with the ROM bootstrap loader to load my code through the UART0 serial interface. My app synchronizes the baud, sends the download and status commands, sends all the data, with no errors reported by the BSL. Then I inspect the FLASH using the JTAG and I see that every byte is correct except for the first 8. Since this is the stack pointer and reset vector, my code doesn't run.
I've tried different block sizes, just 8, 32, 200. In all cases the first 8 bytes don't program.
I've tried going back after the rest of the image is flashed, then flash just the first 8 bytes. No errors are reported by the BSL, but bytes 0-7 remain at 0xFF,
Is there some sort of lock on these first few bytes? How do I program them using the ROM BSL over UART0?