Using the P2 ROM monitor for debugging
David Betz
Posts: 14,516
It seems many have fallen in love with the P2 ROM monitor and I don't blame them. It provides some nice on-chip debugging assistance. I'm wondering though how this is going to work once we move to the real P2 and production boards. We've already seen that it is necessary to pull the SPI flash chip from the FPGA boards to get into the ROM monitor because otherwise the P2 boot ROM will start the program in the flash instead of entering the monitor. This is fine on the FPGA boards because the SPI flash chip is in a socket. What happens on production boards which most often have soldered-on chips? It seems like it will be necessary to either provide a jumper to disable the SPI flash chip or to program something bogus into it that won't pass authentication. The nice thing about the ROM serial loader is that it will work even if there is a program in the boot flash without modifying the flash. How do we expect this to be handled when using the ROM monitor to do debugging on a production board or any board with a soldered-on SPI flash chip?
Comments
That is NOT necessary --- You need only run slightly modified Chip's "programmer.spin" that remove PROGRAMMED flag in Flash
Whether or not the monitor runs on boot then is up to the developer no matter what the board looks like right? This isn't any different than thoes autoload EEPROM programs on P1.
If somebody does that, they essentially have a signed booter, that will then load unsigned code and or the monitor. Great for development, then when it's time for field deployment, remove those things, and it's just a signed booter loading the authorized code set.
While I don't disagree that I would have preferred other things (like SD boot), that is what we have.
This is my understanding of the inclusion of the Rom Monitor...
The SPI flash runs if there is valid code in the flash because that is what is expected to run. That code can get to the monitor if required. You want to ensure authorised protection.
If there is no flash, or it is unprogrammed, and no code protection, then the rom monitor runs. This allows a user to play with the prop quite simply.
You can have any data in Flash that You can use without starting it -- Boot see only Flash as programed if You place that in it.
data7E0 byte long $00000001[8]
You only need erase that positions in Flash -- Not entire data to be able starting with Monitor
data7E0 byte long $00000000[8]
Look in my post in this thread.
http://forums.parallax.com/showthread.php/144683-Propeller-II-programing-questions-to-Chip?p=1173213&viewfull=1#post1173213
data7E0 byte long $00000001[8]
To re-enter Boot from it.
On real P2 -- I dont know what type of check value Chip will use