M0 Flashing questions

Started by ulli, May 26, 2021, 12:22:56 PM

ulli

Hello,
I have two questions regarding M0 flasing:
* is the PA13 pin used anyhow of the moteino eco system?
   I am confused why it is routed to the pin group for flashing. There is also a note 'ATN' on the pin. What is it stand for?
   And the reset pin is not located next to the SWD pins which is also needed for flashing.
* can the uf2&FOTA bootloader be downloaded somewhere to reflash the chip?

Thanks in advance!
Ulli

Felix

#1
SWD pins have nothing to do with other GPIO like PA13. The SWD pins can be used independently of how the board is defined, otherwise they are GPIO like any others. The PA13 is just a GPIO broken on the side header, it is pin 38 in the M0 board definition.
"ATN" has no special meaning per se, it is labeled the same on some other boards so it is an alias for pin 38/PA13.
I posted a link on the M0 page for the M0 bootloader, (this link).


ulli

#2
Thanks Felix also for your greate work!

ulli

Hi Felix,
I have some issues reflashing the bootloader.
I use gdb and it says the from you provided bin file can not be read.

arm-none-eabi-gdb bootloader-moteino_m0-v3.4.0-LowPowerLab.bin
"0x7ffc64ad8320s": not in executable format: file format not recognized


Is there an elf file also available? How do you flash the bootloader?

Regards!

ulli

Fixed by myself :)
I converted the bin file to elf format with following command:
arm-none-eabi-objcopy -I binary -O elf32-little bootloader-moteino_m0-v3.4.0-LowPowerLab.bin  bootloader-moteino_m0-v3.4.0-LowPowerLab.elf

Afterwards the elf file can be flashed with gdb!