florisla / stm32loader

Flash firmware to STM32 microcontrollers using Python.
GNU General Public License v3.0
109 stars 53 forks source link

Add STM32G0x1 #32

Closed AlexKlimaj closed 4 years ago

AlexKlimaj commented 4 years ago

This PR adds the STM32G0x1 to the identification list.

Here is the output.

sudo stm32loader -p /dev/serial0 -f G0 -V
Open port /dev/serial0, baud 115200
*** Command: Get
    Bootloader version: 0x31
    Available commands: 0x0, 0x1, 0x2, 0x11, 0x21, 0x31, 0x44, 0x63, 0x73, 0x82, 0x92
Bootloader version: 0x31
*** Command: Get ID
Chip id: 0x460 (STM32G0x1)
*** Command: Read memory
*** Command: Read memory
Device UID: 0085-004C-31365011-20383048
Flash size: 128 KiB
florisla commented 4 years ago

Thanks, I'll add this to the next release.

The Travis failure is due to a change in black; that will be sorted out.

florisla commented 4 years ago

Is this usable at all for reading and writing, given the 2KB page size of the STM32G0?

Currently the page size is hard-coded to 1KB.

AlexKlimaj commented 4 years ago

Yes, I was able to flash a large quantity of STM32G0's with this.