Page 1 of 1

Use of spi driver (+ freertos) in bootloader

Posted: Wed Jan 20, 2021 8:33 am
by timm_f
Hello everybody,

how can I add support for the idf spi-driver into bootloader?
I have a spi-sd-card driver (which already works in firmware) which I want to use in the bootloader.


I have added a custom bootloader into a project called "bldr".
Copied from /esp-idf/components/bootloader into my project: bldr/components/bootloader/
This works so far.

I have tried adding component "driver" (which includes spi-driver) in several CMakeLists.txt:

(1) into bldr/components/bootloader/CMakeLists.txt
add_dependencies(bootloader partition_table_bin driver)

This gave the error: The dependency target "driver" of target "bootloader" does not exist.


(2) into bldr/components/bootloader/subproject/CMakeLists.txt
set(COMPONENTS bootloader esptool_py partition_table soc bootloader_support log spi_flash micro-ecc main efuse driver)

This gave the error:
esp-idf/esp-idf_Release_V4_2/components/esp_ringbuf/ringbuf.c:17:10: fatal error: freertos/FreeRTOS.h: No such file or directory
#include "freertos/FreeRTOS.h"


Greetings, Timm