cederom commented on PR #20663:
URL: https://github.com/apache/nuttx/pull/20663#issuecomment-6214567381
My local testing with the Sony Spresense board below considering:
* Tested on Python versions: 3.8, 3.10, 3.11, 3.12, 3.13, 3.14, 3.15.
* Only SERIAL protocol is used for flashing. `import telnetlib` problem
seems fixed for Python3.13+ versions, so we are future proof again! Thank you
@Brijesh-Thakkar :-)
* Don't know how to erase chip before flashing to make sure it is blank and
flashing works correctly, @jerpelea any hints welcome :-)
* **NO TELNET FLASHING TESTED HERE**. @jerpelea could you please verity
TELNET flashing part? Or instructions on how to test? :-)
Build host and initial `spresense:nsh` firmware build:
```
% uname -a
FreeBSD hexagon 14.5-RELEASE-p2 FreeBSD 14.5-RELEASE-p2
releng/14.5-n274894-872ce416b253 GENERIC amd64
% git checkout Brijesh-Thakkar/fix/flash-writer-telnetlib-py313
% git reflog -1
304f986bab9 (HEAD, Brijesh-Thakkar/fix/flash-writer-telnetlib-py313)
HEAD@{0}: checkout: moving from master to
Brijesh-Thakkar/fix/flash-writer-telnetlib-py313
% ./tools/configure.sh -B spresense:nsh
(..)
% gmake -j
(..)
LD: nuttx
Memory region Used Size Region Size %age Used
ram: 118004 B 1536 KB 7.50%
gnssram: 0 B 640 KB 0.00%
Generating: nuttx.spk
tools/cxd56/mkspk -c2 nuttx nuttx nuttx.spk;
```
Python 3.8:
```
% python3.8 -m venv ~/.local/venv3.8
% source ~/.local/venv3.8/bin/activate
(venv3.8) hexagon% pip install xmodem pyserial
(..)
(venv3.8) hexagon% python3.8 tools/flash_writer.py -s -c /dev/cuaU0 -d -b
115200 -n nuttx.spk
>>> Install files ...
install -b 115200
Install nuttx.spk
|0%-----------------------------50%------------------------------100%|
######################################################################
118128 bytes loaded.
Package validation is OK.
Saving package to "nuttx"
updater# sync
updater# Restarting the board ...
reboot
(venv3.8) hexagon% cu -l /dev/cuaU0 -s 115200
Connected
nsh> uname -a
NuttX 10.4.0 304f986bab9 Oct 16 2026 12:54:07 arm spresense
```
Python 3.10:
```
% python3.10 -m venv ~/.local/venv3.10
% source ~/.local/venv3.10/bin/activate
(venv3.10) hexagon% pip install xmodem pyserial
(..)
(venv3.10) hexagon% python3.10 tools/flash_writer.py -s -c /dev/cuaU0 -d -b
115200 -n nuttx.spk
>>> Install files ...
install -b 115200
Install nuttx.spk
|0%-----------------------------50%------------------------------100%|
######################################################################
118128 bytes loaded.
Package validation is OK.
Saving package to "nuttx"
updater# sync
updater# Restarting the board ...
reboot
(venv3.10) hexagon% cu -l /dev/cuaU0 -s 115200
Connected
cxd56_farapiinitialize: Mismatched version: loader(20591) != Self(20596)
cxd56_farapiinitialize: Please update loader and gnssfw firmwares!!
NuttShell (NSH) NuttX-10.4.0
nsh> uname -a
NuttX 10.4.0 304f986bab9 Oct 16 2026 12:54:07 arm spresense
```
Python 3.11:
```
% python3.11 -m venv ~/.local/venv3.11
hexagon% source ~/.local/venv3.11/bin/activate
(venv3.11) hexagon% pip install xmodem pyserial
(..)
(venv3.11) hexagon% python3.11 tools/flash_writer.py -s -c /dev/cuaU0 -d -b
115200 -n nuttx.spk
>>> Install files ...
install -b 115200
Install nuttx.spk
|0%-----------------------------50%------------------------------100%|
######################################################################
118128 bytes loaded.
Package validation is OK.
Saving package to "nuttx"
updater# sync
updater# Restarting the board ...
reboot
(venv3.11) hexagon% cu -l /dev/cuaU0 -s 115200
Connected
cxd56_farapiinitialize: Mismatched version: loader(20591) != Self(20596)
cxd56_farapiinitialize: Please update loader and gnssfw firmwares!!
NuttShell (NSH) NuttX-10.4.0
nsh> uname -a
NuttX 10.4.0 304f986bab9 Oct 16 2026 12:54:07 arm spresense
```
Python 3.12:
```
% python3.12 -m venv ~/.local/venv3.12
% source ~/.local/venv3.12/bin/activate
(venv3.12) hexagon% pip install xmodem pyserial
(..)
(venv3.12) hexagon% python3.12 tools/flash_writer.py -s -c /dev/cuaU0 -d -b
115200 -n nuttx.spk
>>> Install files ...
install -b 115200
Install nuttx.spk
|0%-----------------------------50%------------------------------100%|
######################################################################
118128 bytes loaded.
Package validation is OK.
Saving package to "nuttx"
updater# sync
updater# Restarting the board ...
reboot
(venv3.12) hexagon% cu -l /dev/cuaU0 -s 115200
Connected
cxd56_farapiinitialize: Mismatched version: loader(20591) != Self(20596)
cxd56_farapiinitialize: Please update loader and gnssfw firmwares!!
NuttShell (NSH) NuttX-10.4.0
nsh> uname -a
NuttX 10.4.0 304f986bab9 Oct 16 2026 12:54:07 arm spresense
```
Python3.13:
```
% python3.13 -m venv ~/.local/venv3.13
hexagon% source ~/.local/venv3.13/bin/activate
(venv3.13) hexagon% pip install xmodem pyserial
(..)
(venv3.13) hexagon% python3.13 tools/flash_writer.py -s -c /dev/cuaU0 -d -b
115200 -n nuttx.spk
>>> Install files ...
install -b 115200
Install nuttx.spk
|0%-----------------------------50%------------------------------100%|
######################################################################
118128 bytes loaded.
Package validation is OK.
Saving package to "nuttx"
updater# sync
updater# Restarting the board ...
reboot
(venv3.13) hexagon% cu -l /dev/cuaU0 -s 115200
Connected
cxd56_farapiinitialize: Mismatched version: loader(20591) != Self(20596)
cxd56_farapiinitialize: Please update loader and gnssfw firmwares!!
NuttShell (NSH) NuttX-10.4.0
nsh> uname -a
NuttX 10.4.0 304f986bab9 Oct 16 2026 12:54:07 arm spresense
```
Python3.14:
```
% python3.14 -m venv ~/.local/venv3.14
hexagon% source ~/.local/venv3.14/bin/activate
(venv3.14) hexagon% pip install xmodem pyserial
(..)
% python3.14 tools/flash_writer.py -s -c /dev/cuaU0 -d -b 115200 -n nuttx.spk
>>> Install files ...
install -b 115200
Install nuttx.spk
|0%-----------------------------50%------------------------------100%|
######################################################################
118128 bytes loaded.
Package validation is OK.
Saving package to "nuttx"
updater# sync
updater# Restarting the board ...
reboot
(venv3.14) hexagon% cu -l /dev/cuaU0 -s 115200
Connected
cxd56_farapiinitialize: Mismatched version: loader(20591) != Self(20596)
cxd56_farapiinitialize: Please update loader and gnssfw firmwares!!
NuttShell (NSH) NuttX-10.4.0
nsh> uname -a
NuttX 10.4.0 304f986bab9 Oct 16 2026 12:54:07 arm spresense
```
Python 3.15:
```
% python3.15 -m venv ~/.local/venv3.15
hexagon% source ~/.local/venv3.15/bin/activate
(venv3.15) hexagon% pip install xmodem pyserial
(..)
% python3.15 tools/flash_writer.py -s -c /dev/cuaU0 -d -b 115200 -n nuttx.spk
>>> Install files ...
install -b 115200
Install nuttx.spk
|0%-----------------------------50%------------------------------100%|
######################################################################
118128 bytes loaded.
Package validation is OK.
Saving package to "nuttx"
updater# sync
updater# Restarting the board ...
reboot
(venv3.15) hexagon% cu -l /dev/cuaU0 -s 115200
Connected
cxd56_farapiinitialize: Mismatched version: loader(20591) != Self(20596)
cxd56_farapiinitialize: Please update loader and gnssfw firmwares!!
NuttShell (NSH) NuttX-10.4.0
nsh> uname -a
NuttX 10.4.0 304f986bab9 Oct 16 2026 12:54:07 arm spresense
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]