Please help me on solving error with handling sdkconfing parameters of ESP32

I was building code with these mos.yml parameters

build_vars:
  MGOS_ROOT_FS_SIZE: 524288 #  512kB = 0x80000
  APP_SLOT_SIZE: 3145728    # 3072kB = 0x200000
  ESP_IDF_SDKCONFIG_OPTS: >
    ${build_vars.ESP_IDF_SDKCONFIG_OPTS}
      CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y
      CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240
      CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
      CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM=80
      CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE_1=y
      CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1=y
      CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y

It was a stable build for my previous versions of the mos tool but after the recent update, it’s not building my fw.zip file.
It is showing an error as…

LD /data/fwbuild-volumes/2.19.0/apps/pub_log_01_2021_optimized/esp32/build_contexts/build_ctx_259652374/build/objs/pub_log_01_2021_optimized.elf
/opt/Espressif/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/fwbuild-volumes/2.19.0/apps/pub_log_01_2021_optimized/esp32/build_contexts/build_ctx_259652374/build/objs/mosapp/libmosapp.a(mgos_freertos_core_dump.c.o):(.text.mgos_freertos_core_dump+0x20): undefined reference to `mgos_freertos_extract_regs'
/opt/Espressif/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/fwbuild-volumes/2.19.0/apps/pub_log_01_2021_optimized/esp32/build_contexts/build_ctx_259652374/build/objs/mosapp/libmosapp.a(mgos_freertos_core_dump.c.o): in function `mgos_freertos_core_dump':
/data/fwbuild-volumes/2.19.0/apps/pub_log_01_2021_optimized/esp32/build_contexts/build_ctx_259652374/deps/freertos/src/mgos_freertos_core_dump.c:40: undefined reference to `mgos_freertos_extract_regs'
collect2: error: ld returned 1 exit status

As you can see I’m using ESP32 - 8MB and I just want to start my esp as soon as it crashes… because I’m still handling every issue with my firmware.

let me know if I’m missing any dependency…
@nliviu @scaprile

In the current version of esp-idf (4.2-r1), mgos_freertos_extract_regs definition is protected by CONFIG_ESP32_ENABLE_COREDUMP_TO_UART.

In previous versions there was simply a #if 1.

So then how can I use the CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE register?
is there any alternate method? or overwriting the register??
@nliviu

Is there any way to use an older version of ESP-IDF?
or Is it possible to define the version of ESP-IDF?

Modify these lines

libs_version: ${mos.version}
modules_version: ${mos.version}
mongoose_os_version: ${mos.version}

with the version of your choice, e.g. 2.17.0 .

It worked for me… but the problem occurred is we cannot use SD card library with this version as your lib is not matching with the same versions.
Do you have any suggestions for that?

mos <= 2.18.0

  - origin: https://github.com/nliviu/sdlib
    version: 1.0.2

mos 2.19.0

  - origin: https://github.com/nliviu/sdlib
    version: 2.0

Thank you so much, it worked for me :smiley::v: