Skip to content

ESPIDF : Using custom board with esp_panel_board_custom_conf.h #217

Open
@martinroger

Description

@martinroger

I am trying to define a custom board out of the sdkconfig because I have to use some vendor init commands and there is a bit of trickery on the IO expander.
I have my main.cpp like so :

#include <stdio.h>
#include "esp_panel_board_custom_conf.h"
#include "esp_display_panel.hpp"
#include "esp_lib_utils.h"


using namespace esp_panel::drivers;
using namespace esp_panel::board;

static const char *TAG = "main";

extern "C" void app_main()
{
    Board *board = new Board();
    assert(board);

    ESP_LOGI(TAG,"Initializing board");
    ESP_UTILS_CHECK_FALSE_EXIT(board->init(),"Board init failed");
    ESP_UTILS_CHECK_FALSE_EXIT(board->begin(),"Board begin failed");
    auto lcd = board->getLCD();
    auto expander = board->getIO_Expander();
    expander->getBase()->printStatus();
    lcd->colorBarTest();

}

and my esp_panel_board_custom_conf.h file has #define ESP_PANEL_BOARD_DEFAULT_USE_CUSTOM (1) correctly set.

However, after compile-flash-monitor, I get an error that the default board configuration is not detected :

I (664) main_task: Calling app_main()
I (664) main: Initializing board
E (674) Panel: [esp_panel_board.cpp:0055](init):
No default board configuration detected. There are three ways to provide a default configuration: 
        1. Use the `esp_panel_board_supported_conf.h` file to enable a supported board. 
        2. Use the `esp_panel_board_custom_conf.h` file to define a custom board.
        3. Use menuconfig to enable a supported board or define a custom board.
E (704) Utils: [main.cpp:0018](app_main): Board init failed
I (714) main_task: Returned from app_main()

Where is my mistake ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions