From 4bf5fef40b178468682fa0b08ad33f3036a4fe67 Mon Sep 17 00:00:00 2001 From: Mitchell M Date: Sat, 21 Mar 2026 20:38:15 -0500 Subject: [PATCH] setup hello world from component --- .vscode/settings.json | 5 +++-- CMakeLists.txt | 2 +- components/blk_box_lib | 2 +- main/CMakeLists.txt | 9 ++++++--- main/main.cpp | 3 ++- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 9b252d7..1f74492 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,7 +3,7 @@ "idf.openOcdConfigs": [ "board/esp32s3-builtin.cfg" ], - "idf.port": "detect", + "idf.port": "/dev/ttyACM0", "idf.currentSetup": "/home/mitchell/.espressif/v6.0/esp-idf", "idf.customExtraVars": { "IDF_TARGET": "esp32s3" @@ -13,5 +13,6 @@ "--background-index", "--query-driver=**", "--compile-commands-dir=/home/mitchell/cpp/blk_box_control/build" - ] + ], + "idf.flashType": "JTAG" } diff --git a/CMakeLists.txt b/CMakeLists.txt index 048ddbe..1f00d52 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,5 +4,5 @@ cmake_minimum_required(VERSION 3.22) include($ENV{IDF_PATH}/tools/cmake/project.cmake) # "Trim" the build. Include the minimal set of components, main, and anything it depends on. -idf_build_set_property(MINIMAL_BUILD ON) +# idf_build_set_property(MINIMAL_BUILD ON) project(blk_box_control) diff --git a/components/blk_box_lib b/components/blk_box_lib index d91b058..a5411c4 160000 --- a/components/blk_box_lib +++ b/components/blk_box_lib @@ -1 +1 @@ -Subproject commit d91b05856dde07b49a254778a49cf14680ef2a1e +Subproject commit a5411c45f5b6f8636b02149b35cf94c1405143ea diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 6cba8cc..c4cd1fb 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -1,3 +1,6 @@ -idf_component_register(SRCS "main.cpp" - PRIV_REQUIRES spi_flash - INCLUDE_DIRS "") +idf_component_register( + SRCS "main.cpp" + PRIV_REQUIRES + spi_flash + blk_box_lib + INCLUDE_DIRS "") diff --git a/main/main.cpp b/main/main.cpp index 90b17a7..4fd9887 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -12,10 +12,11 @@ #include "esp_chip_info.h" #include "esp_flash.h" #include "esp_system.h" +#include "blk_box.h" extern "C" void app_main(void) { - printf("Hello world!\n"); + printf(get_hello_world()); /* Print chip information */ esp_chip_info_t chip_info;