[Ovmsdev] ESP-IDF v4 / v5 - baby steps
dexter at expeedo.de
Mon Feb 20 04:15:43 HKT 2023
you're totally right being impatient, sorry for the delay. My spare time
is currently rare, but I've at least now merged your bug & compatibility
fixes so far.
Actually one of the next things I wanted to try/determine is why you
want/need to use wolfSSL instead of mbedTLS, which we've been using
since wolfSSL failed so miserably about the Let's encrypt root
certificate transition. Is there an issue with mbedTLS in idf5?
We still need to decide on the integration way. Mark's suggestion was
doing the idf5 transition in a separate branch that will later become
the new "master". That would keep the idf3 build clean from any
regressions, but need merging any work done on that branch into the idf5
branch, which may become a lot of additional work, depending on the time
needed to finish the transition. Adding IDF version switches to all code
sections that need differentiation may introduce some additional points
of failure, but also makes identifying the idf5 rework sections easy. I
haven't come to a final opinion on this, but I tend to merging this into
the master as you suggest, once we know it doesn't impact idf3
The idf5 build branch does not yet build using idf3, currently failing
with a wolfssl issue:
In file included from
fatal error: esp_random.h: No such file or directory
Am 19.02.23 um 16:29 schrieb Ludovic LANGE:
> Hi Michael,
> Hi list,
> Thanks Michael for having taken the time to reproduce the build, and
> thus making this branch go from the state of "urban legend" to "has
> been confirmed at least once" :-)
> I hope more of you will be able to follow the instructions of Michael,
> that are very clear and should ease your work when wanting to test
> this branch.
> Ideally, I wanted that some of you having both the time (...) and a
> vehicle to test would be able to use this build as a daily driver,
> hoping that the known missing parts would not be a showstopper. Let me
> know, and also if you have some spare cycles you can check
> https://github.com/wolfSSL/wolfssl/issues/6028 in order to help fix
> some remaining issues on this library we depend on.
> In the meantime, I believe we can try to integrate (part of) this
> branch in master. I already started to distillate some parts of this
> in multiples MRs here
> ; which could be merged without -I hope, but the review will confirm-
> any impact nor regression to the current master branch.
> Let me know if I should continue in that direction, and sorry for
> sounding impatient about it :-)
> Le 18/02/2023 à 10:12, Michael Balzer a écrit :
>> the issue is bound to the docker image version, I was using
>> "espressif/idf", which is "latest".
>> The build works using the same sdkconfig with
>> "espressif/idf:release-v5.0" (and again fails at that mbedtls module
>> when switching back to the "latest" image).
>> So to build the current experimental state, I recommend using the
>> docker image and basically doing the steps Ludovic formalized in the
>> github action:
>> ### SETUP ###
>> cd ~/esp/Open-Vehicle-Monitoring-System-3
>> # setup branch:
>> git remote add llange
>> git at github.com:llange/Open-Vehicle-Monitoring-System-3.git
>> git branch -t experimental-esp-idf-build-workflow
>> # switch to branch:
>> git checkout experimental-esp-idf-build-workflow
>> git submodule update --init --recursive
>> # apply mongoose patch:
>> git apply --directory=vehicle/OVMS.V3/components/mongoose/mongoose
>> # install v5 sdkconfig defaults:
>> cp vehicle/OVMS.V3/support/sdkconfig.defaults.esp5
>> # install v5 idf components:
>> cp vehicle/OVMS.V3/support/idf_component.yml.esp5
>> ### BUILD ###
>> cd ~/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3
>> # launch docker shell:
>> docker run --rm -v $PWD:/project -w /project -it
>> # init docker image (needs to be done on every start):
>> apt-get update && apt-get install -y dos2unix
>> # OPTION 1: start with default config:
>> rm vehicle/OVMS.V3/sdkconfig
>> # NOTE: this will build for ESP32 >= rev3, excluding the SPIRAM bug
>> # OPTION 2: update your existing sdkconfig:
>> idf.py menuconfig
>> # → press '/'
>> # … enable FREERTOS_ENABLE_BACKWARD_COMPATIBILITY
>> # … disable FREERTOS_ASSERT_ON_UNTESTED_FUNCTION
>> # … disable MG_ENABLE_SSL
>> # build:
>> idf.py build
>> # flash & start USB monitor:
>> idf.py app-flash && idf.py monitor
>> The build boots & works, issues you described excluded.
>> An issue I didn't expect:
>> I (0) cpu_start: Starting scheduler on APP CPU.
>> E (0) task_wdt: esp_task_wdt_add(747): TWDT was never initialized
>> E (10) task_wdt: esp_task_wdt_add(747): TWDT was never initialized
>> …and then repeated 4x per second:
>> E (3130) task_wdt: esp_task_wdt_reset(783): task not found
>> I'll try to find the cause, as we cannot silent these ("early"
>> logging) they make using the shell challenging.
>> But, besides that, it has Wifi & cellular connectivity, so looks very
>> promising -- nice work, Ludovic!
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 203 bytes
Desc: OpenPGP digital signature
More information about the OvmsDev