… dann macht die Fehlermeldung Sinn! ;-) Kann ich das fixen oder brauche ich da @Andreas zu? Habe jetzt einfach nur make install
über die Terkin Sandbox ausgeführt. @poesel, du lädst die Sachen ja anders aufs Gerät.
In meinem PR sind ein paar fixes, die das mpy-cross compiling ermöglichen. Bis zum Install habe ich das aber dann nicht weiter verfolgt, weil .mpy-files das ganze nicht wesentlich schneller machen.
Ich synce Dateien eh anders, dafür benutze ich nicht die Sandbox.
cross compiling mache ich auch noch nicht, sondern nutze die Terkin Sandbox nur zum hochladen, weil die einzelnen Dateien im repo ja verteilt rumliegen und wir für die aktuelle / latest kein package haben.
Vermutlich muss ich dafür das Makefile
anpassen, einfach flash/
raus?!
Hmmm, scheint nicht zu reichen, gibt noch die Fehlermeldung
Destination directory /flash/lib does not exist.
Unable to create /flash/lib/terkin
Destination directory /flash/lib/terkin does not exist.
Das kannst du ignorieren. Die mkdir
-Variante in RSHELL
kennt die -p
Option nicht und meckert, wenn das Verzeichnis schon existiert. Nur beim ersten Upload solltest du diese Meldung NICHT sehen. Danach tut es keinen Schaden
Nur zum Verständnis, ich habe da keine Ahnung! Wenn ich make install
aufrufe wir doch der code in Makefile aufgerufen. Reicht es wenn ich dort die Pfade z.B. von
install-requirements: check-mcu-port
$(rshell) $(rshell_options) mkdir /flash/dist-packages
$(rshell) $(rshell_options) rsync dist-packages /flash/dist-packages
nach
install-requirements: check-mcu-port
$(rshell) $(rshell_options) mkdir /dist-packages
$(rshell) $(rshell_options) rsync dist-packages /dist-packages
ändere? Das habe ich eigentlich gemacht und danach nochmal make install
aufgerufen, dennoch kommt die Meldung oben, entweder ist der Pfad noch wo anders drinnen oder meine Änderungen wurden nicht angenommen.
Wir müssen hier noch nachlegen. Nach der Anpassung des install-requirements
targets im Makefile
noch in jenen Dateien:
- https://github.com/hiveeyes/terkin-datalogger/blob/master/tools/upload-framework.rshell
- https://github.com/hiveeyes/terkin-datalogger/blob/master/tools/upload-sketch.rshell
Das stimmt in diesem Fall nicht ganz. Die Sandbox ist noch nicht darauf vorbereitet, mit non-/flash
im Ziel umzugehen.
Stimmt auch, aber die Meldung kommt trotzdem vom mehrmaligen mkdir
auf das gleiche Verzeichnis.
Korrekt. Glatteisgefahr ;]!
Habe ich gemacht, die Unable to create
-Meldungen kommen immer noch,
root@XPS13-CGruber:/home/cgruber/hiveeyes/sources/hiveeyes-micropython-firmware# make install
Device port: usb => /dev/ttyS6
.venv3/bin/rshell --port /dev/ttyS6 --user micro --password python --buffer-size 2048 mkdir /dist-packages
Using buffer-size of 2048
Connecting to /dev/ttyS6 (buffer-size 2048)...
Trying to connect to REPL connected
Testing if ubinascii.unhexlify exists ... Y
Retrieving root directories ... /boot.py/
Setting time ... Feb 20, 2020 16:50:35
Evaluating board_name ... pyboard
Retrieving time epoch ... Jan 01, 2000
Unable to create /dist-packages
.venv3/bin/rshell --port /dev/ttyS6 --user micro --password python --buffer-size 2048 rsync dist-packages /dist-packages
Using buffer-size of 2048
Connecting to /dev/ttyS6 (buffer-size 2048)...
Trying to connect to REPL .. connected
Testing if ubinascii.unhexlify exists ... Y
Retrieving root directories ... /boot.py/
Setting time ... Feb 20, 2020 16:50:39
Evaluating board_name ... pyboard
Retrieving time epoch ... Jan 01, 2000
.venv3/bin/rshell --port /dev/ttyS6 --user micro --password python --buffer-size 2048 --file tools/upload-framework.rshell
Using buffer-size of 2048
Connecting to /dev/ttyS6 (buffer-size 2048)...
Trying to connect to REPL .. connected
Testing if ubinascii.unhexlify exists ... Y
Retrieving root directories ... /boot.py/
Setting time ... Feb 20, 2020 16:50:42
Evaluating board_name ... pyboard
Retrieving time epoch ... Jan 01, 2000
Unable to create /lib/terkin
.venv3/bin/rshell --port /dev/ttyS6 --user micro --password python --buffer-size 2048 --file tools/upload-sketch.rshell
Using buffer-size of 2048
Connecting to /dev/ttyS6 (buffer-size 2048)...
Trying to connect to REPL .. connected
Testing if ubinascii.unhexlify exists ... Y
Retrieving root directories ... /boot.py/
Setting time ... Feb 20, 2020 16:50:45
Evaluating board_name ... pyboard
Retrieving time epoch ... Jan 01, 2000
und ansonst schaut das auch ziemlich leer aus:
>>> import os
>>> os.listdir()
['boot.py']
>>>
Zusammen mit @clemens konnten wir herausfinden, dass das Overlay-Verzeichnis aus rshell
-Perspektive in diesem Fall /pyboard
heißt. Danke!
Der Abschnitt in der rshell-Dokumentation bzgl. “File System” weist zwar ungefähr darauf hin, ist aber leider nicht ganz eindeutig.
Gut, dass wir das geklärt haben, jetzt kann die Reise weitergehen.
Soo, ein Teil funktioniert nun. Das Verzeichnis dist-packages/
wird angelegt, auch befüllt
/pyboard> ls
dist-packages/ boot.py main.py settings.py
Mit anderen Verzeichnissen gibt es aber Probleme …
Destination directory /pyboard/lib does not exist.
Unable to create /pyboard/lib/terkin
Destination directory /pyboard/lib/terkin does not exist.
In upload-framework.rshell
steht gerade bei mir
# Install libraries to MicroPython target device using "rshell".
# Upload lib folder
rsync ./lib /pyboard/lib
mkdir /pyboard/lib/terkin
rsync terkin /pyboard/lib/terkin
/lib
existiert auf den Pycom-Geräten standardmäßig. In diesem Kontext müssen wir es wohl explizit anlegen per mkdir /pyboard/lib
.
Ich schreibe das mal in die upload-framework.rshell
mkdir /pyboard/lib
# Upload lib folder
rsync ./lib /pyboard/lib
Nun bleibt er hier hängen …
.venv3/bin/rshell --port /dev/ttyS6 --user micro --password python --buffer-size 2048 --file tools/upload-framework.rshell
Using buffer-size of 2048
Connecting to /dev/ttyS6 (buffer-size 2048)...
Trying to connect to REPL .. connected
Testing if ubinascii.unhexlify exists ... Y
Retrieving root directories ... /boot.py/ /dist-packages/
Setting time ... Feb 20, 2020 21:11:58
Evaluating board_name ... pyboard
Retrieving time epoch ... Jan 01, 2000
… wenn ich dann nach ein paar Minuten abbreche
^X^CTraceback (most recent call last):
File ".venv3/bin/rshell", line 8, in <module>
sys.exit(main())
File "/home/cgruber/hiveeyes/sources/hiveeyes-micropython-firmware/.venv3/lib/python3.6/site-packages/rshell/command_line.py", line 4, in main
rshell.main.main()
File "/home/cgruber/hiveeyes/sources/hiveeyes-micropython-firmware/.venv3/lib/python3.6/site-packages/rshell/main.py", line 2843, in main
real_main()
File "/home/cgruber/hiveeyes/sources/hiveeyes-micropython-firmware/.venv3/lib/python3.6/site-packages/rshell/main.py", line 2815, in real_main
shell.cmdloop('')
File "/home/cgruber/hiveeyes/sources/hiveeyes-micropython-firmware/.venv3/lib/python3.6/site-packages/rshell/main.py", line 1692, in cmdloop
cmd.Cmd.cmdloop(self)
File "/usr/lib/python3.6/cmd.py", line 138, in cmdloop
stop = self.onecmd(line)
File "/home/cgruber/hiveeyes/sources/hiveeyes-micropython-firmware/.venv3/lib/python3.6/site-packages/rshell/main.py", line 1722, in onecmd
self.onecmd_exec("".join(group))
File "/home/cgruber/hiveeyes/sources/hiveeyes-micropython-firmware/.venv3/lib/python3.6/site-packages/rshell/main.py", line 1733, in onecmd_exec
return cmd.Cmd.onecmd(self, line)
File "/usr/lib/python3.6/cmd.py", line 217, in onecmd
return func(arg)
File "/home/cgruber/hiveeyes/sources/hiveeyes-micropython-firmware/.venv3/lib/python3.6/site-packages/rshell/main.py", line 2609, in do_rsync
print_func=pf, recursed=False, sync_hidden=args.all)
File "/home/cgruber/hiveeyes/sources/hiveeyes-micropython-firmware/.venv3/lib/python3.6/site-packages/rshell/main.py", line 883, in rsync
cp(src_filename, dst_filename)
File "/home/cgruber/hiveeyes/sources/hiveeyes-micropython-firmware/.venv3/lib/python3.6/site-packages/rshell/main.py", line 657, in cp
filesize, xfer_func=send_file_to_remote)
File "/home/cgruber/hiveeyes/sources/hiveeyes-micropython-firmware/.venv3/lib/python3.6/site-packages/rshell/main.py", line 1439, in remote
output = self.pyb.exec_raw_no_follow(func_src)
File "/home/cgruber/hiveeyes/sources/hiveeyes-micropython-firmware/.venv3/lib/python3.6/site-packages/rshell/pyboard.py", line 238, in exec_raw_no_follow
data = self.serial.read(2)
File "/home/cgruber/hiveeyes/sources/hiveeyes-micropython-firmware/.venv3/lib/python3.6/site-packages/serial/serialposix.py", line 483, in read
ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left())
KeyboardInterrupt
Makefile:240: recipe for target 'install-framework' failed
make: *** [install-framework] Error 1
Das kann schon mal etwas länger dauern, gerade beim framework. Die Fehlermeldung scheint mir dann auch üblich.
@poesel hatte per Cross-compilation for MicroPython 1.12 by poesel · Pull Request #61 · hiveeyes/terkin-datalogger · GitHub angefangen, den Bytecode-Support für Genuine MicroPython 1.12 auf Vanilla ESP32 zu verbessern. @Thias hat das nun aufgegriffen und arbeitet gerade an sandbox support for Pycom and Non-Pycom devices · thiasB/terkin-datalogger@210689d · GitHub.
Danke Euch beiden!
@poesel und @clemens könnt ihr in einer freien Minute den oben genannten HEAD testen - am besten auf einer sauberen Firmware (erase_all …)? Auf meinem Setup (LoPy4, Pycom MP und Bytecode) funktioniert das schon. Wäre schön zu wissen, ob der T-Call damit richtig angesprochen wird.
-
git checkout:
git remote add thias git@github.com:thiasB/terkin-datalogger.git git fetch thias git checkout --track thias/mpy-simple
-
sandbox install:
make recycle-ng MPY_CROSS=true MPY_TARGET=bytecode MPY_VERSION=1.12
Äh - ich bin verwirrt. Wo drin soll ich das testen? Meine git skills sind nicht so dolle.
Nelson:terkin-datalogger markus$ make install-ng
Device port: usb => /dev/cu.SLAB_USBtoUART
[INFO] Uploading MicroPython code to device using USB
Traceback (most recent call last):
File "tools/terkin.py", line 12, in <module>
import netaddr
ModuleNotFoundError: No module named 'netaddr'
make[1]: *** [notify] Error 1
make: *** [install-ng] Error 2
Verstehe ich nicht. netaddr
ist in den requirements drin. ???
source .venv3/bin/activate
pip install netaddr netifaces scapy
Sicher das das nicht pip2 oder pip3 sein muss? Habs für alle 3 ausgeführt. Dann kam das:
Nelson:terkin-datalogger markus$ make install-ng
Device port: usb => /dev/cu.SLAB_USBtoUART
[INFO] Uploading MicroPython code to device using USB
Device port: usb => /dev/cu.SLAB_USBtoUART
if test “bytecode” = “pycom”; then
.venv3/bin/rshell --port /dev/cu.SLAB_USBtoUART --user micro --password python --buffer-size 2048 mkdir /flash/dist-packages;
.venv3/bin/rshell --port /dev/cu.SLAB_USBtoUART --user micro --password python --buffer-size 2048 rsync dist-packages /flash/dist-packages;
else
/bin/sh: -c: line 1: syntax error: unexpected end of file
make[2]: *** [install-requirements] Error 2
make[1]: *** [install-rshell] Error 2
make: *** [install-ng] Error 2