Hello everyone!
the frameworks : framework-arduinoespressif32 has precompil lib for all esp component and use the file sdkconfig fils as build flag configuration. I need to change the configuration of build flag CONFIG_UART_ISR_IN_IRAM to place usart function in RAM section!
I try to change it in sdkconfig file but does not seem to works
Is it a way to rebuild the framwork to taking in acount this flag or another way to place usart hal function in ram section?
Thanks for your help
Correct, since the library / the ESP-IDF base is precompiled, sdkconfig changes have exactly 0 effect.
You have to start your project as a ESP-IDF project with the Arduino core as component on top. This is discussed in How to setup PlatformIO for Framework developement (arduino-esp32)? - #4 by maxgerhardt with an official example available and the accompanying documentation.
Hi Max thanks for your reply!
I try the exemple espidf-arduino-blink but it does not build! some error related to espif
may it come from
platform_packages =
framework-arduinoespressif32 @ GitHub - marcovannoord/arduino-esp32: Arduino core for the ESP32
I try on my projet too by adding
platform = espressif32@4.4.0
framework = arduino, espidf
there is anther build project
CMake Error at C:/Users/thoma/.platformio/packages/framework-espidf@3.40001.200521/tools/cmake/build.cmake:185 (message):
Failed to resolve component ‘esp_ipc’.
I try :
platform = espressif32@4.4.0
framework = arduino
works well
and
platform = espressif32@4.4.0
framework = espidf
works well too
any idea?
Do you have the requirement that you must work with the 1.0.6 Arduino-ESP32 core instead of the latest 2.0.4 or 2.0.3? The current platform version with
uses Arduino-ESP32 2.0.3.
I have no restriction! I think that use good last version of arduino_ESP32 core:
PLATFORM: Espressif 32 (4.4.0) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (cmsis-dap, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 @ 3.20003.220626 (2.0.3)
- framework-espidf @ 3.40001.200521 (4.0.1)
I try too
platform = espressif32
PLATFORM: Espressif 32 (5.0.0) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 @ 3.20003.220626 (2.0.3)
- framework-espidf @ 3.40401.0 (4.4.1)
and I have another issue
c:/users/thoma/.platformio/packages/toolchain-xtensa-esp32/bin/…/lib/gcc/xtensa-esp32-elf/8.4.0/…/…/…/…/xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\esp-idf\freertos\libfreertos.a(port_common.o):(.literal.main_task+0x10): undefined reference to app_main' c:/users/thoma/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\esp-idf\freertos\libfreertos.a(port_common.o): in function
main_task’:
C:\Users\thoma.platformio\packages\framework-espidf\components\freertos\port/port_common.c:118: undefined reference to `app_main’
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\esp32dev\firmware.elf] Error 1
I have a main.cpp file where I have 2 function setup() and loop()
I think you’re missing the sdkconfig
file, or at least the
option, since this should create an app_main()
that starts setup() and loop(). Try to copy the file into the root of your project and remove any old sdkconfig.*
files to force a regeneration of the config.
Did you also copy the CMakeLists.txt from the root and src/
directory of the official example into your project?
Works perfectly!!!
my CMakeLists.txt was ok, problem come from the missing sdkconfig.default! I add in my plateformio.ini too the flag :
-DCONFIG_UART_ISR_IN_IRAM=y
and usart function from espidf sdk are place in RAM section
thank you so much, you are the best max!
There is one thing I can still don’t understand! why that does not build with :
platform = espressif32@4.4.0