Page 1 of 1

custome board

Posted: Thu Oct 07, 2021 1:47 pm
by tafa20
how to define a custom board?
are there any documents or guides for defining a custom board and it's peripherals?
I just used https://github.com/espressif/esp-adf/tr ... p3_control examples as my guide but I still stuck using gpio35 as my volup input key

Re: custome board

Posted: Tue Aug 02, 2022 9:37 pm
by felixcollins
I'm struggling to get the latest ADF working with my custom board too. It would be great if someone who understands more about how it all works could write some architectural descriptions on to to use the audio event system and how the peripheral drivers work. At the moment the code is the documentation...

Re: custome board

Posted: Thu Aug 11, 2022 1:36 pm
by tempo.tian
I think you can follow below steps to customize a board.

Under components/audio_board you can see lots of board sub folder, each of the folder is a board.
So customized board also can place in such folder ex: your_board.
under your_board you need put
board.h --> this file just define API
board_pins_config.c --> this file mainly define I2C, I2S, SPI pin, API name should keep as original
board.c --> you need implement the API define in board.h, if API not used by example, do not need to implement is


You need add a special define for your new board, and change Kconfig.projbuild

config ESP32_C3_LYRA_V2_BOARD
bool "ESP32-C3-Lyra-v2.0"
config YOUR_BOARD
bool "ESP32-Your-Board"

You need change CMakelist.txt so that it can build your new added code

if (CONFIG_ESP32_S3_BOX_BOARD)
message(STATUS "Current board name is " CONFIG_ESP32_S3_BOX_BOARD)
list(APPEND COMPONENT_ADD_INCLUDEDIRS ./esp32_s3_box)
set(COMPONENT_SRCS
./esp32_s3_box/board.c
./esp32_s3_box/board_pins_config.c
)
endif()

if (CONFIG_YOUR_BOARD)
message(STATUS "Current board name is " CONFIG_YOUR_BOARD)
list(APPEND COMPONENT_ADD_INCLUDEDIRS ./your_board)
set(COMPONENT_SRCS
./your_board/board.c
./your_board/board_pins_config.c
)
endif()

Finally when you build code, you can change board to your newly added
idf.py menuconfig --> Audio HAL --> Audio board --> ESP32-Your-Board

Re: custome board

Posted: Wed Aug 17, 2022 1:17 am
by felixcollins
It appears that the ADF is using "IOT Solution" library. Board support information is here https://docs.espressif.com/projects/esp ... oards.html