PROG

From ElectroDragon
Jump to navigation Jump to search

Interface

Type Interface Pins Software Tools Hardware Tools
STM8 SWM RST, SWIM, 3.3V, GND ST Visual Programmer (STVP)
STM8L UART 3.3V, GND, RXD, TXD Flasher-STM8(STMFlashDownloader)
STM32 SWD SWCLK, SWDIO, GND, 3.3V STM32 ST-Link Utility
STM32 USB USB DFUSEdemo
STM32 UART Flasher-STM32, flyMCU, SSCOM5.13
AVR ISP6 VCC, SCK|MOSI, RST|GND
UART UART 3.3V, GND, RXD, TXD
Nuvoton ICP NUmicroICP NU-LINK
Nuvoton UART
PIC PICKITC Interface X IPE PICKIT

Raspberry Pi

AVR

2019-06-04 141936.png

env.sh configure chip type probe.sh detect the chip and connections flash_dump.sh read flash flash_write.sh flash flash

Modify avrdude.conf for RPI

  1. Linux GPIO configuration for avrdude.
  2. Change the lines below to the GPIO pins connected to the AVR.
programmer
  id    = "linuxgpio";
  desc  = "Use the Linux sysfs interface to bitbang GPIO lines";
  type  = "linuxgpio";
  reset = 12;
  sck   = 24;
  mosi  = 23;
  miso  = 18;
;

OPENOCD

STM32

  • env.sh Configure the platform to which the chip belongs, such as stm32f1x, stm32f2x, etc. When calling other scripts, you need to execute source ./env.sh first to initialize the environment variables, the same below.
  • probe.sh is used to detect the existence of the chip
  • attach.sh attach to the chip, then another window can call $telnet localhost 4444 for single step debugging
  • flash_dump.sh dumps the flash data from the chip
  • flash_erase.sh erase flash data in the chip
  • flash_write.sh Flash inside the chip
  • lock.sh stm32 series chip provides flash write protection. After the write protection is turned on, the chip cannot be debugged. The flash data is read. The product commercial recommendation is to open the write protection function.
  • unlock.sh cancels write protection.

Flash

  • probe.sh detect the flash type
  • flash_dump.sh read flash
  • flash_write.sh write flash

EEPROM

  • env.sh Configure the chip model, you can call avrdude -p ? to view the currently supported chips.
  • probe.sh probes the i2c bus
  • flash_dump.sh read flash
  • flash_write.sh flashing flash