From: <rr...@ih...> - 2024-03-21 06:28:20
|
I seek a wider opinion on bug 292 which I closed and have reopened for more input . Some processors such as the 12F675 are shipped with the last program instruction (0x3ff on 12F675) with 0x34XX (retlw 0xXX) where XX is the factory RC calibration correction. The data sheet provides an example of "call 0x3ff; movwf OSCCAL" to set the RC oscillator calibration to the factory value.Currently in gpsim the last instruction is the default blank value of 0x3fff. When the above call is executed gpsim steps the PC to 0x400 which causes a memory violation which resets the PC to 0 causing an infinite loop. I originally closed the bug on the basis that doing a bulk erase prior to loading the program will clear the factory value. The programing spec indicates you should read the value prior to erase and reload it with the program. Thus I provided a way to do this in the test code. The creator of the bug countered that this should be the responsibility of the programing tools rather than the program developer. So the question is should gpsim put a valid instruction, probably 0x3480, as default into this program address? |