[Ovmsdev] ESP-IDF v4 / v5 - baby steps

Ludovic LANGE ll-ovmsdev at lange.nom.fr
Tue Jan 31 08:49:48 HKT 2023


Hi list,

Another quick post to share with you the progress on the ESP-IDFv5 + 
cmake endeavour:

  * ESP-IDF v5 version of OVMSv3 is now officially booting and seems to
    work fine (then again, I'm not doing any real-world testing for lack
    of time / car at the moment - it's here that you can help me) with a
    few caveats detailed in the PR or the README.md
    <https://github.com/llange/Open-Vehicle-Monitoring-System-3/blob/experimental-esp-idf-v5/README.md>.

  * The branch
    https://github.com/llange/Open-Vehicle-Monitoring-System-3/tree/experimental-esp-idf-v5
    is now ready for testing, sharing, studying, ...

  * I created a draft PR
    https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/pull/810
    (just like for ESP-IDFv4), in order to show the diff and gather
    feedback. Not to be merged as-is.

  * I'll try to break it into smaller low-impact / easy-to-review PR's
    that could be merged as-is in current master (warning corrections,
    header definitions, xxprintf type impact, etc...), so that the big
    pieces could be more easily reviewed.


Please note that those branches / PRs are still Work-In-Progress, and 
that I may certainly (and wrongly) `push --force` some changes as I 
rebase, update or split the big PR into smaller, easy to study PRs. I'll 
try not to but can't promise :-)
So if you checkout the branch, please be warned and know your git 
commands to either reset or rebase your working copy...

Next on my list are, in no particular order:

  * Have a few patches/bugs fixed in upstream wolfSSL (in progress) in
    order to enable
  * Check to see if we could upgrade mongoose (not absolutely necessary
    because it works / compile OK with a small patch)
  * Fix the remaining warnings
      o And change the ADC implementation that is deprecated now
      o deprecation of esp_vfs_fat_spiflash_mount /
        esp_vfs_fat_spiflash_unmount
  * Fix the WIP WIP WIP commits
  * Resume work on
    https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/issues/752


Boot time warnings to study and check if OK:

  * W (1091) esp_psram: Virtual address not enough for PSRAM, map as
    much as we can. 4MB is mapped
  * W (2132) ADC: legacy driver is deprecated, please migrate to
    `esp_adc/adc_oneshot.h`   (<- this one is easy to understand...)


Additional instructions:

When first building, your sdkconfig will be converted as some config 
options did change betwen ESP-IDF v3.x and v5.x.

Run `menuconfig` and :

  * *Select FREERTOS_ENABLE_BACKWARD_COMPATIBILITY*(=y)
    "configENABLE_BACKWARD_COMPATIBILITY"
  * *Unselect MG_ENABLE_SSL*(=n) "Enable MONGOOSE SSL/TLS support"


If any of you with some free time could be nice enough to try to 
reproduce such a build and share the experience here. Let me know how 
the instructions could be updated and what issues you are facing.


Best regards,


Le 27/01/2023 à 03:17, Michael Geddes a écrit :
> I may try this on my spare board as a start! (The Aux 12v switch 
> didn't work... But otherwise it's mostly OK)
>
> Michael.
>
> On Thu, 26 Jan 2023, 4:41 pm Mark Webb-Johnson, 
> <mark at webb-johnson.net> wrote:
>
>     Progress looks good on this. Thanks for stepping up to try to
>     tackle it.
>
>     Pain points for me with our current approach are:
>
>      1. RAM usage (in particular IRAM)
>      2. IDF bugs that may be improved in newer versions
>      3. Support for newer hardware (including ESP32-S3)
>
>
>     #3 would give us a welcome 12 more GPIOs with minimal hardware
>     changes, but possibly worse RAM situation (520KB->512KB, see #1).
>
>     My preference would be v5 IDF (for the newer hardware support).
>
>     I think it would be fine to have this as a new branch. Not
>     particularly important to make it work in the master one.
>
>     Regards, Mark.
>
>>     On 26 Jan 2023, at 8:56 AM, Ludovic LANGE
>>     <ll-ovmsdev at lange.nom.fr> wrote:
>>
>>     Hi,
>>
>>     A quick note to share with you the progress on the ESP-IDFv4 +
>>     cmake endeavour:
>>
>>       * The branch
>>         https://github.com/llange/Open-Vehicle-Monitoring-System-3/tree/experimental-esp-idf-v4-rework-network
>>         is now ready for greater review. Most of the warnings are
>>         gone, and I'll need some help for the last ones.
>>
>>       * I created a draft PR
>>         https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/pull/806
>>         . Not that I want to merge it as-is nor soon, but it may help
>>         the review process to have some central discussion point.
>>
>>       * I'll now switch to ESP-IDFv5 porting - on a new branch (based
>>         on the v4) :
>>         https://github.com/llange/Open-Vehicle-Monitoring-System-3/tree/experimental-esp-idf-v5
>>         (empty at the moment).
>>
>>
>>     Regards,
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20230131/de5b7869/attachment-0001.htm>


More information about the OvmsDev mailing list