|
I wound up writing my own SAM-BA client on my Mac. It's just a Python script I run from a terminal. The Atmel SAM-BA docs were incomplete at best, and had a couple significant errors. I had to use VMWare to snoop the USB traffic from Atmel's Windows program in order to find the undocumented stuff to make it work.
For example, they put in a chapter about XMODEM but the USB interface doesn't use it at all; instead, the data is transferred as raw bytes in the read/write file commands.
Also there's an undocumented "N#" command that puts it in native mode so you send parameters in binary instead of hex ASCII ("T#" puts it back). These commands are mentioned but undocumented in the SAM3S data sheet. Atmel's SAM-BA client only uses N# mode.
Anyway, what I've got requires Python 2.6 or so (should be built-in to OS X 10.6) and the "pyserial" extension. You use it by running something like "samba.py -p /dev/tty.usbmodem1234 -E -W gcc/demo.bin -S F0" (erase, write file, and set boot to Flash 0). The device name is different for each machine, but it's usually the only /dev/tty.usbmodem* available when you have the USB plugged in. It's not fully tested (I think there are still bugs in readback), but it seems to work for me.
| Attachments: |
File comment: Python script to talk to Atmel's SAM-BA over a USB serial port. Tested on a Mac. Requires Python 2.6 or 2.7 and pyserial.
sam-ba_py_0.1.zip [19.12 KiB]
Downloaded 20 times
|
_________________ --- Admins: Please enable BBCode. ---
|