Hey,
I have an Arduino UNO R4 WiFi board with RA4M1 and ESP32S3 on board.
I’m trying to replicate this project GitHub - vshymanskyy/UNO-R4-WiFi-freedom: UNO R4 WiFi set free! while using both espidf
and arduino
frameworks, as shown in this example: platform-espressif32/examples/espidf-arduino-blink at develop · platformio/platform-espressif32 · GitHub.
The reason I want to do that is I want to have access to ESP-IDF framework for using Bluepad32, which I hope to connect with RA4M1 using the serial communication between two MCUs. However, I had some trouble with using ESP-IDF’s serial connection directly, and I figured I don’t want to reinvent the wheel, and just use Arduino’s implementations, which are way easier to use.
As the Freedom library is using TinyUSB, I tried enabling it step-by-step in my example project. As soon as I add -DCONFIG_TINYUSB_ENABLED
to my CMakeLists.txt
file, I get this error:
In file included from /home/seba/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-tinyusb.c:36:
/home/seba/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-tinyusb.h:24:10: fatal error: tusb.h: No such file or directory
**************************************************************
* Looking for tusb.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:tusb.h"
* Web > https://registry.platformio.org/search?q=header:tusb.h
*
**************************************************************
#include "tusb.h"
^~~~~~~~
compilation terminated.
Compiling .pio/build/esp32s3/Tone.cpp.o
*** [.pio/build/esp32s3/esp32-hal-tinyusb.c.o] Error 1
I don’t have the slightest idea why this is not included. In main.cpp
, I can #include "tusb.h"
and call tusb_init
, and it compiles, but for some reason this header is not visible from the esp32-hal-tinyusb.c
file.
This is my platformio.ini
file:
[env]
platform = espressif32
framework = arduino, espidf
monitor_speed = 115200
[env:esp32s3]
board = esp32-s3-devkitc-1
CMakeLists.txt
in root folder:
cmake_minimum_required(VERSION 3.16.0)
add_definitions(-DCONFIG_TINYUSB_ENABLED)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(esp-tests-1)
I’ve tried also using the esp32_uno_r4
board included in the Freedom project, but nothing changes.
Any help would be appreciated.