Has anyone hacked up the linux BP tool pirate-loader to upload firmware for the
web platform? It seems like a vast overkill to install mono just to run the ds30 GUI;
all it's really doing is shoving a HEX file across a serial port. Clearly pirate-loader
has been hand-hacked specifically for the BP, but isn't the protocol the same?
When pirate-loader is pointed at the web platform and run it says:
compute% pirate-loader --dev=/dev/webplatform --hello
+++++++++++++++++++++++++++++++++++++++++++
+ Pirate-Loader for BP with Bootloader v4 +
+++++++++++++++++++++++++++++++++++++++++++
Opening serial device /dev/webplatform...OK
Configuring serial port settings...OK
Sending Hello to the Bootloader...OK
Device ID: UNKNOWN [ab]
Bootloader version: 1,02
Unsupported device (ab:UNKNOWN), only 0xD4 PIC24FJ64GA002 is supported
After a quick look at the pirate-loader.c code, it looks like some careful crafting of the
defines might make it work but I'm an AVR dude and know nothing about PICs.
Hi Jim,
I think you're right, it probably could be updated.
The key variables would be the ID, flash size, and the number of bytes that are sent in each packet.
.ifdef __33FJ128GP204
.include "p33FJ128GP204.inc"
.equ VALID_DEV, 1
.equ FLASHSIZE, 0x15800
.equ HAS_UART2, 1
.equ DEVICEID, 171
.equ HAS_PPS, 1
.endif
Looks like only ID (171) and flashsize (0x15800) differ.
actually though - the flash config bit location is different, so be careful or you could overwrite that region. In Bus pIrate it is last page, in web platform it is next to last page.
The bootloader author did a bunch of crazy stuff with it, maybe there is more info here:
http://dangerousprototypes.com/2010/02/ ... er-hacking (http://dangerousprototypes.com/2010/02/16/web-platform-bootloader-hacking)