itdaniher / sam-ba-party

yo so there was this rom
GNU General Public License v3.0
0 stars 0 forks source link

Figure out why BOSSA log doesn't match XMODEM protocol. #1

Closed itdaniher closed 10 years ago

itdaniher commented 10 years ago

BOSSA is the only tool that reliably works, but I'm not entirely sure what it's doing. The serial dumps generated by

sudo strace -x -s9999 -eread,write -o bossac-partascii.log -P/dev/ttyACM0 /usr/local/bin/bossac -e -w -v -b helium.bin

don't seem to match descriptions of the XMODEM Protocol theoretically implemented in SAM-BA.

itdaniher commented 10 years ago

so xmodem is only used when using the usart path of rommonitor, when using USB / CDC-ACM, the ROM relies on USB checksums / framing and the writes are transparent.

note, you can't use the "S" command to write straight to flash via USB as it DMAs to the specified address, and the SAM3U's DMA controllers can't touch internal flash.