LowPowerLab Forum

Hardware support => Moteino M0 => Topic started by: ulli on May 26, 2021, 12:22:56 PM

Title: M0 Flashing questions
Post by: ulli on May 26, 2021, 12:22:56 PM
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
Title: Re: M0 Flashing questions
Post by: Felix on May 26, 2021, 03:41:23 PM
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 (https://lowpowerlab.com/guide/moteino/moteinom0/) for the M0 bootloader, (this link (https://lowpowerlab.com/bootloader-moteino_m0-v3.4.0-LowPowerLab.bin)).

Title: Re: M0 Flashing questions
Post by: ulli on May 27, 2021, 03:07:17 AM
Thanks Felix also for your greate work!
Title: Re: M0 Flashing questions
Post by: ulli on September 08, 2021, 02:53:57 AM
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!
Title: Re: M0 Flashing questions
Post by: ulli on September 08, 2021, 03:25:25 AM
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!