Guided by the description from https://docs.espressif.com/projects/esp ... oader.html I copied the folder /esp-idf/components/bootloader to /my_project/components/bootloader.
The page said one should edit the file called bootloader_main.c, however, there is the only file named bootloader_start.c in the directory (it looks like a mistake in the description).
Nevertheless, when trying to build my project I got the following:
Code: Select all
Executing "ninja all"...
[1/98] Performing configure step for 'bootloader'
FAILED: bootloader-prefix/src/bootloader-stamp/bootloader-configure
cmd.exe /C "cd /D C:\firmware\esp32\test\build\bootloader && C:\Users\PC\.espressif\tools\cmake\3.13.4\bin\cmake.exe -DSDKCONFIG=C:/firmware/esp32/test/sdkconfig -DIDF_PATH=C:/esp-idf -DIDF_TARGET=esp32 -DPYTHON_DEPS_CHECKED=1 -DPYTHON=C:\Users\PC\.espressif\python_env\idf4.1_py3.7_env\Scripts\python.exe -DEXTRA_COMPONENT_DIRS=C:/firmware/esp32/components/bootloader -DLEGACY_INCLUDE_COMMON_HEADERS= -GNinja C:/firmware/esp32/components/bootloader/subproject && C:\Users\PC\.espressif\tools\cmake\3.13.4\bin\cmake.exe -E touch C:/firmware/esp32/test/build/bootloader-prefix/src/bootloader-stamp/bootloader-configure"
CMake Error: The source "C:/firmware/esp32/components/bootloader/subproject/CMakeLists.txt" does not match the source "C:/esp-idf/components/bootloader/subproject/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.
[2/98] Building CXX object esp-idf/battery/CMakeFiles/__idf_battery.dir/battery.cpp.obj
Does someone have experience in building the custom bootloader?