-
Notifications
You must be signed in to change notification settings - Fork 7
Add environment checks and update partition sizes in CMake #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #include "unity.h" | ||
| #include "status_led.h" | ||
|
|
||
| TEST_CASE("Unity test framework is running", "[status_led]") | ||
| { | ||
| TEST_ASSERT_TRUE(1); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question is if unnecessary tests don't add too much bloat / if the tradeoff is given
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is just a test test, and test are only flashed to an esp when you need to test code |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,8 +4,8 @@ The project uses a custom partition layout defined in `partitions.csv`. | |
|
|
||
| ## Primary partitions | ||
|
|
||
| - `factory`: Recovery firmware (1 MB at `0x10000`) | ||
| - `ota_0`: Main firmware (~2.94 MB at `0x110000`) | ||
| - `factory`: Recovery firmware (1.1875 MB at `0x10000`) | ||
| - `ota_0`: Main firmware (2.75 MB at `0x140000`) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Idk if it makes sense to include these if they change everytime |
||
| - `otadata`: OTA selection data | ||
|
|
||
| The `factory` partition is intended as a stable fallback and should not be overwritten during | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now I don't know about these. Are we sure? |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,16 @@ | |
| # CMakeLists in this exact order for cmake to work correctly | ||
| cmake_minimum_required(VERSION 3.16) | ||
|
|
||
| if(NOT DEFINED ENV{IDF_PATH} OR "$ENV{IDF_PATH}" STREQUAL "") | ||
| message(FATAL_ERROR | ||
| "IDF_PATH is not set. Open the recovery firmware from an exported ESP-IDF shell or use the VS Code ESP-IDF extension. " | ||
| "Generic CMake Tools launches do not load the ESP-IDF environment automatically.") | ||
| endif() | ||
|
|
||
| if(NOT DEFINED IDF_TARGET AND NOT DEFINED ENV{IDF_TARGET}) | ||
| set(IDF_TARGET "esp32c6") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As someone who doesn't test with esp32c6 I am not a fan haha
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. xD |
||
| endif() | ||
|
|
||
| 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) | ||
|
|
@@ -20,7 +30,7 @@ if(VE_BUILD_WEB) | |
| set(VE_NODE_ROOT_DIR "${VE_REPO_ROOT}") | ||
| set(VE_WEB_DIR "${VE_REPO_ROOT}/vigilant-engine-frontend") | ||
|
|
||
| set(VE_OUT_RECOVERY "${CMAKE_SOURCE_DIR}/main/static/index.html") | ||
| set(VE_OUT_RECOVERY "${VE_REPO_ROOT}/build/static/recovery/index.html") | ||
| set(VE_WEB_STAMP "${CMAKE_BINARY_DIR}/ve_web_build.stamp") | ||
|
|
||
| file(GLOB_RECURSE VE_WEB_SOURCES CONFIGURE_DEPENDS | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it called "unit test"? Or are we planning on using some external framework?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unity is the "official" recommended test framework for testing by espressif