Skip to content

Commit 64b7fc9

Browse files
mykmelezivmarkov
authored andcommitted
enable console component and generate bindings for its header files
To enable use of the ESP-IDF "console" component (https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/console.html) in a Rust application, such as a Rust port of the console example apps (https://github.com/espressif/esp-idf/tree/4dc74c9/examples/system/console), this branch enables the component and generates bindings for its esp_console.h, linenoise.h, and argtable3.h header files.
1 parent b33f721 commit 64b7fc9

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

build/common.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const TOOLS_WORKSPACE_INSTALL_DIR: &str = ".embuild";
3232
const ALL_COMPONENTS: &[&str] = &[
3333
// TODO: Put all IDF components here
3434
"comp_app_update_enabled",
35+
"comp_console_enabled",
3536
"comp_esp_adc_cal_enabled",
3637
"comp_esp_eth_enabled",
3738
"comp_esp_event_enabled",

src/include/esp-idf/bindings.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
#include "esp_interface.h"
1717
#include "esp_ipc.h"
1818

19+
#ifdef ESP_IDF_COMP_CONSOLE_ENABLED
20+
#include "esp_console.h"
21+
#include "linenoise/linenoise.h"
22+
#include "argtable3/argtable3.h"
23+
#endif
24+
1925
#ifdef ESP_IDF_COMP_ESP_PM_ENABLED
2026
#include "esp_pm.h"
2127
#endif

0 commit comments

Comments
 (0)