pinetime

installing infinitime on the pinetime

OTA - over the air firwmare installation

You can use gadgetbridge.

  • Download infinitime on your phone. You need the file with dfu in its name. The last version I installed was: 1.16.0 and the name of the zip I flashed was: pinetime-mcuboot-app-dfu-1.16.0.zip
  • Open the gadgetbridge app go to the devices tab on the bottom.
  • Connect your pinetime
  • Press thee dots on the right side -> File installer
  • Press select file select the downloaded zipfile: e.g. pinetime-mcuboot-app-dfu-1.16.0.zip
  • You should see PineTime firmware and your version 1.16.0. Press install
  • On the pinetime you will see a progress bar. The pinetime will reboot once the installation is finished.

More info here

flashing pinetime through st-programmer

You can flash the pinetime with the swd interface. Which is based on the jtag standard but only uses 4 pins. This interface can be found on the inside of the pinetime.

I bought the following st-link programmer on aliexpress

connect the wires

st-probe

You can use the stlink software from github to inspect you device. I installed the stlink package on archlinux to install it

st-info --probe
Found 1 stlink programmers
  version:    V2J37S7
  serial:     300014000A0000393333574E
  flash:      0 (pagesize: 0)
  sram:       0
  chipid:     0x0000
  descr:      unknown device

openocd

run

openocd \
    -c 'source [find interface/stlink.cfg]' \
    -c 'transport select hla_swd' \
    -c 'source [find target/nrf52.cfg]' \
    -c 'init'

connect to the running openocd instance

telnet 127.0.0.1 4444

in the telnet console you can type commands like:

> targets
    TargetName         Type       Endian TapName            State
--  ------------------ ---------- ------ ------------------ ------------
 0* nrf52.cpu          hla_target little nrf52.cpu          running

> flash banks
#0 : nrf52.flash (nrf5) at 0x00000000, size 0x00000000, buswidth 1, chipwidth 1
#1 : nrf52.uicr (nrf5) at 0x10001000, size 0x00000000, buswidth 1, chipwidth 1
 reset halt
[nrf52.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x000000d8 msp: 0x20010000
> program /home/user/Downloads/pinetime/infinitime/pinetime-mcuboot-app-image-1.14.0.bin 0x8000 verify reset
[nrf52.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x000000d8 msp: 0x20010000
** Programming Started **
nRF52832-QFAA(build code: E1) 512kB Flash, 64kB RAM
Adding extra erase range, 0x00062858 .. 0x00062fff
** Programming Finished **
** Verify Started **
** Verified OK **
** Resetting Target **
> reset run