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

Michael Balzer dexter at expeedo.de
Sat Feb 18 05:54:56 HKT 2023


Ludovic,

using the docker image I managed to make some progress.

I can now start the build process, but then run into printf format 
errors on main/ovms_module.cpp, e.g.

/project/main/ovms_module.cpp: In function 'void 
print_blocks(OvmsWriter*, TaskHandle_t, bool)':
/project/main/ovms_module.cpp:438:37: error: format '%d' expects 
argument of type 'int', but argument 4 has type 'uint32_t' {aka 'long 
unsigned int'} [-Werror=format=]

I'm here:

commit 19e36125c6e0597c901eb82a546ef82c1dea8a1e (HEAD -> 
experimental-esp-idf-v5, llange/experimental-esp-idf-v5)
Author: Ludovic LANGE <llange at users.noreply.github.com>

I thought maybe you've sorted that out in your new build branch, but 
apparently that has the same error, which leaves me wondering how the 
automated build can work…

I see you don't have CONFIG_FREERTOS_USE_TRACE_FACILITY in your new 
"sdkconfig.defaults.esp5", so the module isn't included in your build. 
But you also have CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y, which 
automatically enables CONFIG_FREERTOS_USE_TRACE_FACILITY in my setup.

Disabling both options, I just almost got through, just a final linker 
error:

/project/components/zip/libzip/lib/zip_crypto_mbedtls.c:124: undefined 
reference to `mbedtls_pkcs5_pbkdf2_hmac'

I assume there are more differences in your new branch / sdkconfig, I'll 
try that one next.

Regards,
Michael


Am 10.02.23 um 09:37 schrieb Ludovic LANGE:
> Hi,
>
> Just as a curiosity, I setup GitHub to build the v5 branch with 
> "GitHub actions".
>
> You can find the latest runs here : 
> https://github.com/llange/Open-Vehicle-Monitoring-System-3/actions
>
> The configuration file is here : 
> https://github.com/llange/Open-Vehicle-Monitoring-System-3/blob/experimental-esp-idf-build-workflow/.github/workflows/build-ovms.yml
>
> /Note: It's a specific branch because I had to add some configuration 
> files (default sdkconfig options for example), change the reference to 
> wolfssl submodule, add a patch for our mongoose version, ... ; but in 
> the future I could make a PR for this feature if we find it useful./
> /(I also would like to experiment a little bit with static code 
> analysis, unit tests, etc...)/
>
> Regards,
>
> Le 06/02/2023 à 15:23, Ludovic LANGE a écrit :
>> Hi again,
>>
>> Additionally, I've just verified that the official docker image for 
>> ESP-IDF (doc: 
>> https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-docker-image.html 
>> ) is able to build the branch.
>>
>> The only thing to add to the image is the "dos2unix" utility ("apt 
>> update && apt-get install dos2unix"), after that you'll be able to 
>> build the image.
>>
>> Do not forget to update your sdkconfig (enabling FreeRTOS 
>> compatibility and unchecking SSL for mongoose) before building, and 
>> to do the patches for mongoose / wolfssl as described here: 
>> https://github.com/llange/Open-Vehicle-Monitoring-System-3/blob/experimental-esp-idf-v5/README.md
>>
>> Then "idf.py build" should work - at least !
>>
>> I've used the `docker run --rm -v $PWD:/project -w /project -it 
>> espressif/idf:|release-v5.0|` command to have a shell prompt (launch 
>> that in your source file path)
>>
>> Then install dos2unix, launch menuconfig, then build.
>>
>> Tell me how it works for you.
>>
>> (You may have some component build failure ; depending on the 
>> sdkconfig flags, I'm still trying to document it)
>>
>> Regards,
>>
>
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev

-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20230217/4a63f76a/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 203 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20230217/4a63f76a/attachment.sig>


More information about the OvmsDev mailing list