custome board

tafa20
Posts: 1
Joined: Thu Oct 07, 2021 1:45 pm

custome board

Postby tafa20 » Thu Oct 07, 2021 1:47 pm

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

felixcollins
Posts: 125
Joined: Fri May 24, 2019 2:02 am

Re: custome board

Postby felixcollins » Tue Aug 02, 2022 9:37 pm

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...

tempo.tian
Posts: 40
Joined: Wed Jun 22, 2022 12:10 pm

Re: custome board

Postby tempo.tian » Thu Aug 11, 2022 1:36 pm

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

felixcollins
Posts: 125
Joined: Fri May 24, 2019 2:02 am

Re: custome board

Postby felixcollins » Wed Aug 17, 2022 1:17 am

It appears that the ADF is using "IOT Solution" library. Board support information is here https://docs.espressif.com/projects/esp ... oards.html

Who is online

Users browsing this forum: No registered users and 44 guests