Merge pull request #3 from ChSotiriou/main

added picotool for dumping firmware
pull/6/head
Swissky 2022-10-02 21:33:50 +02:00 committed by GitHub
commit 44cf294676
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 0 deletions

View File

@ -14,6 +14,8 @@
### Send a new firmware into the microcontroller using serial port ### Send a new firmware into the microcontroller using serial port
- avrdude
```powershell ```powershell
# send raw data firmware # send raw data firmware
$ avrdude -p m328p -c usbasp -P /dev/ttyUSB0 -b 9600 -U flash:w:flash_raw.bin $ avrdude -p m328p -c usbasp -P /dev/ttyUSB0 -b 9600 -U flash:w:flash_raw.bin
@ -25,6 +27,13 @@ $ avrdude -c usbasp -p m328p -F -U flash:r:dump.hex:i
$ avrdude -c usbasp -p m328p -C /etc/avrdude.conf -U flash:w:hardcodedPassword.ino.arduino_standard.hex $ avrdude -c usbasp -p m328p -C /etc/avrdude.conf -U flash:w:hardcodedPassword.ino.arduino_standard.hex
``` ```
- picotool
```bash
# extention indicates the type (bin, uf2)
picotool load firmware.bin
```
### Dump firmware using debug port ### Dump firmware using debug port
* avrdude * avrdude
@ -51,6 +60,13 @@ exit
sudo openocd -f /home/maki/tools/hardware/openocd/tcl/interface/stlink-v2-1.cfg -f /home/maki/tools/hardware/openocd/tcl/target/nrf51.cfg -f dump_fw.cfg sudo openocd -f /home/maki/tools/hardware/openocd/tcl/interface/stlink-v2-1.cfg -f /home/maki/tools/hardware/openocd/tcl/target/nrf51.cfg -f dump_fw.cfg
``` ```
- picotool
```bash
# extention indicates the type (bin, uf2)
picotool save firmware.bin
```
### Convert ihex to elf ### Convert ihex to elf
> The Intel HEX is a transitional file format for microcontrollers, (E)PROMs, and other devices. The documentation states that HEXs can be converted to binary files and programmed into a configuration device. > The Intel HEX is a transitional file format for microcontrollers, (E)PROMs, and other devices. The documentation states that HEXs can be converted to binary files and programmed into a configuration device.