Add environment checks and update partition sizes in CMake#56
Add environment checks and update partition sizes in CMake#56
Conversation
…CMake and documentation - Added checks for IDF_PATH in CMakeLists.txt for both main and recovery builds. - Updated partition sizes in partitions.md and partitions.csv for accuracy. - Enhanced troubleshooting documentation for ESP-IDF environment setup. - Introduced unit test for status_led component.
| - `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`) |
There was a problem hiding this comment.
Idk if it makes sense to include these if they change everytime
| #include "unity.h" | ||
| #include "status_led.h" | ||
|
|
||
| TEST_CASE("Unity test framework is running", "[status_led]") |
There was a problem hiding this comment.
Isn't it called "unit test"? Or are we planning on using some external framework?
There was a problem hiding this comment.
Unity is the "official" recommended test framework for testing by espressif
|
|
||
| TEST_CASE("Unity test framework is running", "[status_led]") | ||
| { | ||
| TEST_ASSERT_TRUE(1); |
There was a problem hiding this comment.
Question is if unnecessary tests don't add too much bloat / if the tradeoff is given
There was a problem hiding this comment.
This is just a test test, and test are only flashed to an esp when you need to test code
| endif() | ||
|
|
||
| if(NOT DEFINED IDF_TARGET AND NOT DEFINED ENV{IDF_TARGET}) | ||
| set(IDF_TARGET "esp32c6") |
There was a problem hiding this comment.
As someone who doesn't test with esp32c6 I am not a fan haha
There was a problem hiding this comment.
Now I don't know about these. Are we sure?
We had this issue with cmake and esp-idf
This pull request introduces several improvements and fixes related to build environment validation, partition layout, documentation, and test infrastructure. The most significant changes are the addition of environment checks for ESP-IDF, updates to the partition table and associated documentation, and the introduction of a basic unit test to verify the test framework setup.
This was entirely made by AI, so i dont actually know if this is the best way to fix the issues, but it works lol.
Build system and environment validation:
CMakeLists.txtandvigilant-engine-recovery/CMakeLists.txtto ensureIDF_PATHis set, preventing builds from running without the ESP-IDF environment. Improved error messages guide users to use the ESP-IDF shell or VS Code extension. [1] [2]IDF_TARGETtoesp32c6invigilant-engine-recovery/CMakeLists.txtif not already defined, improving build reliability.Partition layout and documentation updates:
partitions.csvto increase thefactorypartition size and adjust theota_0partition start and size, reflecting these changes indocs/partitions.md. [1] [2]Documentation improvements:
For later test infrastructure:
test_vigilant_engine.cto confirm that the test framework is set up correctly.…CMake and documentation