sebi wrote: ↑Sun Sep 01, 2019 12:48 pm
they just cannot coexist in same python version with nrfutil
What about in two python virtual environments?
possibly. They both need same dependencies of different version, if you install one with pip, the other will stop working due to wrong version of something.
sebi wrote: ↑Sun Sep 01, 2019 12:48 pm
Does it mean that to update the bootloader with the one with no animation I can use the serial DFU procedure?
Yes, you just run adafruit-nrfutils with different zip files like this
Code: Select all
pi@raspberrypi:~ $ adafruit-nrfutil dfu serial -b 38400 -pkg DS-D6-desay-bootloader-noanim-fix.zip -p /dev/ttyUSB0
Upgrading target on /dev/ttyUSB0 with DFU package /home/pi/DS-D6-desay-bootloader-noanim-fix.zip. Flow control is disabled, Dual bank, Touch disabled
########################################
##
Activating new firmware
Device programmed.
pi@raspberrypi:~ $ adafruit-nrfutil dfu serial -b 38400 -pkg DS-D6-desay-bootloader-noanim-fix.zip -p /dev/ttyUSB0
Upgrading target on /dev/ttyUSB0 with DFU package /home/pi/DS-D6-desay-bootloader-noanim-fix.zip. Flow control is disabled, Dual bank, Touch disabled
########################################
##
Activating new firmware
Device programmed.
pi@raspberrypi:~ $ adafruit-nrfutil dfu serial -b 38400 -pkg DS-D6-adafruit-bootloader-sd132v611.zip -p /dev/ttyUSB0
Upgrading target on /dev/ttyUSB0 with DFU package /home/pi/DS-D6-adafruit-bootloader-sd132v611.zip. Flow control is disabled, Dual bank, Touch disabled
########################################
########################################
########################################
########################################
########################################
########################################
########################################
########################################
#######
Activating new firmware
Device programmed.
And now if you had this prepared (with no 38400 speed) it would work too in the 3 second timeout
Code: Select all
pi@raspberrypi:~ $ adafruit-nrfutil dfu serial -pkg dsd6-micropython-190901.zip -p /dev/ttyUSB0
Upgrading target on /dev/ttyUSB0 with DFU package /home/pi/dsd6-micropython-190901.zip. Flow control is disabled, Dual bank, Touch disabled
########################################
########################################
########################################
########################################
########################################
########################################
########################################
###################################
Activating new firmware
Device programmed.
sebi wrote: ↑Sun Sep 01, 2019 12:48 pm
To modify the Adafruit bootolader so that it defaults to serial update, I can modify
Not the timeout. This is after each reboot. Typically if there is valid application flashed, nordic bootloader will switch to it immediately. Only if there is no valid app or you force it via some flags, it will stay in DFU mode. This adafruit bootloader is different, it will try serial DFU for 3 seconds always after each reboot no matter what. This helps if your code is broken and restarts in a loop or when you use watchdog. Only then after this times out it decides what to do next according to normal rules - start the app or stay in some DFU mode (serial or bluetooth) because of flags.
So change the flags, not the initial timeout. maybe reversing it would work like this
serial_only_dfu = serial_only_dfu || !_ota_dfu ;
instead of
_ota_dfu = _ota_dfu || !serial_only_dfu;
sebi wrote: ↑Sun Sep 01, 2019 12:48 pm
I saw a picture on your GitHub where you show how to wire a SWD probe. Can I use the ST-LINK V2 probe to flash the firmware?
Yes, definitely. It is easy with openocd. Sooner or later you will need it unless you are very careful which is not fun. it is now for $4.99 so get few more and open at least one to test everything.
BTW I just built current tree and have the display working. I needed to enable framebuffer
in ports/nrf/mpconfigport.h
and then put drivers/display/ssd1306.py into freeze folder and build with
make BOARD=dsd6 SD=s132 FROZEN_MPY_DIR=freeze
It needs some changes to work optimally but even the default code will work with some additional commands send via write_cmd to fix it. I will put it to github or gists