ESP_IDF_EXTRA_COMPONENTS: TWAI and include problem

#1

I’m using the CAN (TWAI) controller and experiencing a problem where a soft reset, such as after an OTA update or a config change, does not reset the phepherial. I’m therefore trying to use the ESP-IDF code, but I’m unable to get a small test all to compile.

In my mos.yml file I have added:

ESP_IDF_EXTRA_COMPONENTS: TWAI

And in my code I added:

#include "twai.h"

When I build, the errors include:

/data/fwbuild-volumes/latest/apps/Test_Espressif_CAN/esp32/build_contexts/build_ctx_250605963/src/twai.c:15:26: fatal error: soc/soc_caps.h: No such file or directory
compilation terminated.
/mongoose-os/platforms/esp32/src/esp32_src.mk:101: recipe for target 'twai.o' failed
make[1]: *** [twai.o] Error 1

Since the missing file is not from my code, I can’t adjust the include path. Is there a way to make this work?

#2

AFAIK, the twai driver is available only with esp-idf latest.

#3

And I see Mongoose is using 3.3. Is there any way I can use latest?

#4

Actually, when I set TWAI in exta components, it does find the twai.h file, so that would seem to indicate that ESP-IDF 3.3 has some support.