flash-spi-at91bootstrap

Last modified by Microchip on 2025/07/17 07:20

Run SAM-BA with USB connection (equivalent to serial) and erase the beginning of the SPI flash and then write AT91Bootstrap binary:

# sam-ba -p serial -b sama5d2-xplained -a serialflash -c erase::0x3000 -c writeboot:at91bootstrap-sama5d2_xplained.bin
Opening serial port 'ttyACM0'
Connection opened.
Detected memory size is 4194304 bytes.
Page size is 256 bytes.
Buffer is 93952 bytes (367 pages) at address 0x002290c0.
Supported erase block sizes: 4KB, 32KB, 64KB
Executing command 'erase::0x3000'
Erased 4096 bytes at address 0x00000000 (33.33%)
Erased 4096 bytes at address 0x00001000 (66.67%)
Erased 4096 bytes at address 0x00002000 (100.00%)
Executing command 'writeboot:at91bootstrap-sama5d2_xplained.bin'
Appending 56 bytes of padding to fill the last written page
Wrote 10752 bytes at address 0x00000000 (100.00%)
Connection closed.
Information

Note that you can run several commands on the same SAM-BA invocation.