Generally, the migration guides and API guides online have been really helpful and the inclusion of additional header files, changing some syntax and adding requirements to CMakeLists.txt have done a lot of the legwork.
What I've had issues wrestling with at the moment have been related to power management SoC permissions. Namely, I mention parameters ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_DOMAIN_RTC_FAST_MEM and ESP_PD_DOMAIN_RTC_SLOW_MEM (from sleep.h) but they are not being recognised despite me including the header file in the script, and mentioning the component name (esp_hw_support) as a requirement in CMakeLists.txt.
I realised that the reason for the this is because in earlier IDF versions such as 4.4, the parameters are mentioned in a typdef enum (in sleep.h) [1]:
Code: Untitled.c Select all
typedef enum {
ESP_PD_DOMAIN_RTC_PERIPH, //!< RTC IO, sensors and ULP co-processor
ESP_PD_DOMAIN_RTC_SLOW_MEM, //!< RTC slow memory
ESP_PD_DOMAIN_RTC_FAST_MEM, //!< RTC fast memory
ESP_PD_DOMAIN_XTAL, //!< XTAL oscillator
#if SOC_PM_SUPPORT_CPU_PD
ESP_PD_DOMAIN_CPU, //!< CPU core
#endif
ESP_PD_DOMAIN_RTC8M, //!< Internal 8M oscillator
ESP_PD_DOMAIN_VDDSDIO, //!< VDD_SDIO
ESP_PD_DOMAIN_MAX //!< Number of domains
} esp_sleep_pd_domain_t;Code: Untitled.c Select all
typedef enum {
#if SOC_PM_SUPPORT_RTC_PERIPH_PD
ESP_PD_DOMAIN_RTC_PERIPH, //!< RTC IO, sensors and ULP co-processor
#endif
#if SOC_PM_SUPPORT_RTC_SLOW_MEM_PD
ESP_PD_DOMAIN_RTC_SLOW_MEM, //!< RTC slow memory
#endif
#if SOC_PM_SUPPORT_RTC_FAST_MEM_PD
ESP_PD_DOMAIN_RTC_FAST_MEM, //!< RTC fast memory
#endifIf anyone has had any similar issues when migrating IDF versions or if someone knows about setting SOC support I would appreciate any help, thanks and I hope you're all well!
Links
[1] https://github.com/espressif/esp-idf/bl ... sp_sleep.h
[2] https://github.com/espressif/esp-idf/bl ... sp_sleep.h
Additional Info
IDF: Visual Studio 1.86.1
OS: Ubuntu 22.04