As a general question would be to me, what parts do i need to have same as pycom devices and what do i not need.
Do we have a howto, or something, where someone flashed terkin-datalogger to a ESP32? What are the steps (e.g. after installing the micropython firmware)?
@poesel You have been working with other ESP32 based modules pycom ?
I have used terkin on a TTGO T8 & TTGO T-Call (disclaimer: not in the field, yet).
You just need to flash the mpy firmware as described here: https://docs.micropython.org/en/latest/esp32/tutorial/intro.html
From then on the ESP32 behaves like a pycom device. You can use the same tools. ‘make install’ does work as does syncing it with VSC.
But when trying to install our firmware on the device, I am getting errors, which seems, that the /flash/ is not there/accessible/… .
$ make install-ng
Unable to create /flash/lib
Unable to copy 'hiveeyes-micropython-firmware/src/pybytes_config.json' to '/flash'
Unable to copy 'hiveeyes-micropython-firmware/src/settings.py' to '/flash'
[...]
Unable to create /flash/lib-mpy
Unable to create /flash/lib-mpy
/flash doesn’t exist when using Genuine MicroPython. I think you need to set these two settings in your presets.mk:
# Use "bytecode" or "pycom" here for Genuine MicroPython vs. Pycom MicroPython.
MPY_TARGET ?= pycom
# Specify MicroPython version.
MPY_VERSION ?= 1.11
to bytecode and 1.12. IIRC that sets it right – like:
# Use "bytecode" or "pycom" here for Genuine MicroPython vs. Pycom MicroPython.
MPY_TARGET ?= bytecode
# Specify MicroPython version.
MPY_VERSION ?= 1.12
Thanks @poesel , that helped. Now install-ng does its job. But as thanks to @Andreas it has been pointed out,
that there are some other obstacles on the path that need to be jumped over, or better spoken, digged in, under and out on the other side. First is here.
MicroPython v1.12-357-g740946736 on 2020-04-13; ESP32 module with ESP32
Type "help()" for more information.
>>>
>>>
MPY: soft reboot
[boot.py] INFO: Python module search path is: ['', '/lib']
[boot.py] INFO: Universal MicroPython Application Loader (umal)
[umal] INFO: Python module search path is: ['/lib', '/dist-packages', '/lib-mpy', '']
[main.py] INFO: Loading settings
[main.py] INFO: Starting logging
[main.py] INFO: Loading Terkin Datalogger
[main.py] INFO: Loading modules
Traceback (most recent call last):
File "main.py", line 61, in <module>
File "main.py", line 39, in main
File "/lib/terkin/datalogger.py", line 14, in <module>
File "/lib/terkin/device.py", line 13, in <module>
MemoryError: memory allocation failed, allocating 578 bytes
When i find time, I might start digging and report here!