diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5b5fb670a..b68c9bbf2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -113,9 +113,9 @@ jobs: fetch-depth: 2 - name: Build esp32 binary run: | - bash -c '. /home/testbot/.bash_profile ; git config --global --add safe.directory "$ESP_ROOT"/esp-idf && make build-esp32-bin && cargo +esp build -p micro-rdk-ffi --target=xtensa-esp32-espidf -Zbuild-std=std,panic_abort --locked --release' + bash -c '. /home/testbot/.bash_profile ; git config --global --add safe.directory "$ESP_ROOT"/esp-idf && make build-esp32-bin && cargo +esp build -p micro-rdk-ffi --target=xtensa-esp32-espidf -Zbuild-std=std,panic_abort --locked --profile release-ffi' cp target/xtensa-esp32-espidf/micro-rdk-server-esp32.bin micro-rdk-server-esp32.bin - cp target/xtensa-esp32-espidf/release/libmicrordk.a libmicrordk.a + cp target/xtensa-esp32-espidf/release-ffi/libmicrordk.a libmicrordk.a cp micro-rdk-ffi/include/micrordk.h micrordk.h - name: Upload release Lib uses: actions/upload-artifact@v4 diff --git a/Cargo.lock b/Cargo.lock index 30859d148..d9e157e2f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2470,7 +2470,7 @@ dependencies = [ [[package]] name = "micro-rdk" -version = "0.2.3" +version = "0.2.4" dependencies = [ "async-channel 2.3.1", "async-executor", @@ -2529,7 +2529,7 @@ dependencies = [ [[package]] name = "micro-rdk-ffi" -version = "0.2.3" +version = "0.2.4" dependencies = [ "async-channel 2.3.1", "base64 0.21.7", @@ -2552,7 +2552,7 @@ dependencies = [ [[package]] name = "micro-rdk-installer" -version = "0.2.3" +version = "0.2.4" dependencies = [ "anyhow", "clap 4.5.7", @@ -2574,7 +2574,7 @@ dependencies = [ [[package]] name = "micro-rdk-macros" -version = "0.2.3" +version = "0.2.4" dependencies = [ "micro-rdk", "proc-macro-crate 2.0.0", @@ -2585,7 +2585,7 @@ dependencies = [ [[package]] name = "micro-rdk-modular-driver-example" -version = "0.2.3" +version = "0.2.4" dependencies = [ "log", "micro-rdk", @@ -2593,7 +2593,7 @@ dependencies = [ [[package]] name = "micro-rdk-server" -version = "0.2.3" +version = "0.2.4" dependencies = [ "async-channel 2.3.1", "embedded-hal 0.2.7", diff --git a/Cargo.toml b/Cargo.toml index a53f074fa..d06e069b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,17 +22,21 @@ description = "Viam RDK for microcontroller" edition = "2021" license = "AGPL-3.0" repository = "https://github.com/viamrobotics/micro-rdk" -version = "0.2.3" +version = "0.2.4" rust-version = "1.75" [profile.release] -debug = true # Symbols are nice and they don't increase the size on Flash opt-level = "s" [profile.dev] debug = true # Symbols are nice and they don't increase the size on Flash opt-level = "z" +[profile.release-ffi] +inherits = "release" +debug = true # Symbols are nice and they don't increase the size on Flash +opt-level = "s" + [workspace.dependencies] anyhow = "1.0.71" async-channel = "2" diff --git a/micro-rdk-ffi/include/micrordk.h b/micro-rdk-ffi/include/micrordk.h index 8054bdefa..2fc4d91a2 100644 --- a/micro-rdk-ffi/include/micrordk.h +++ b/micro-rdk-ffi/include/micrordk.h @@ -199,7 +199,7 @@ enum viam_code get_readings_add_string(struct get_readings_context *ctx, const char *value); /* - This function adds raw attributes to a sensor reading request + This function can be use by a sensor during the call to `get_readings_callback` to add a `raw_attributes` struct */ enum viam_code get_readings_add_raw_attributes(struct get_readings_context *ctx, const struct raw_attributes *raw_attrs); diff --git a/micro-rdk-ffi/micrordklib-idf-component/CMakeLists.txt b/micro-rdk-ffi/micrordklib-idf-component/CMakeLists.txt index aa3345422..ac150ad20 100644 --- a/micro-rdk-ffi/micrordklib-idf-component/CMakeLists.txt +++ b/micro-rdk-ffi/micrordklib-idf-component/CMakeLists.txt @@ -1,7 +1,7 @@ idf_component_register(INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}") idf_build_set_property(INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/assets" APPEND) -set(LIBMICRORDK_VERSION v0.2.3) +set(LIBMICRORDK_VERSION v0.2.4) set(LIBMICRORDK_URL https://github.com/viamrobotics/micro-rdk/releases/download/${LIBMICRORDK_VERSION}/micro-rdk-lib.zip) set(LIBMICRORDK_PATH ${CMAKE_BINARY_DIR}/import/micro-rdk-lib.zip) diff --git a/micro-rdk-ffi/micrordklib-idf-component/Kconfig b/micro-rdk-ffi/micrordklib-idf-component/Kconfig index bf19782ed..43ca9cbc7 100644 --- a/micro-rdk-ffi/micrordklib-idf-component/Kconfig +++ b/micro-rdk-ffi/micrordklib-idf-component/Kconfig @@ -2,7 +2,7 @@ menu "Micro RDK configuration" config MICRO_RDK_ENABLE_BUILD_LIBRARY bool "Enable Micro-RDK library" default n - depends on (ESP_SYSTEM_EVENT_TASK_STACK_SIZE >= 4096) && (PTHREAD_TASK_STACK_SIZE_DEFAULT>=8192) && ESP32_SPIRAM_SUPPORT && (SPIRAM_MALLOC_ALWAYSINTERNAL >= 4090) && MBEDTLS_EXTERNAL_MEM_ALLOC + depends on (ESP_SYSTEM_EVENT_TASK_STACK_SIZE >= 4096) && (PTHREAD_TASK_STACK_SIZE_DEFAULT>=8192) && ESP32_SPIRAM_SUPPORT && (SPIRAM_MALLOC_ALWAYSINTERNAL <= 2048) && MBEDTLS_EXTERNAL_MEM_ALLOC select ESP_TLS_SERVER select SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY select MBEDTLS_SSL_PROTO_DTLS diff --git a/micro-rdk-ffi/micrordklib-idf-component/idf_component.yml b/micro-rdk-ffi/micrordklib-idf-component/idf_component.yml index 5e0ffffba..c212c200e 100644 --- a/micro-rdk-ffi/micrordklib-idf-component/idf_component.yml +++ b/micro-rdk-ffi/micrordklib-idf-component/idf_component.yml @@ -1,4 +1,4 @@ -version: "0.2.3" +version: "0.2.4" description: "Micro-RDK lib" dependencies: ## Required IDF version diff --git a/templates/module/Cargo.toml b/templates/module/Cargo.toml index f09c35910..43e6903c9 100644 --- a/templates/module/Cargo.toml +++ b/templates/module/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "{{project-name}}" -version = "0.2.3" +version = "0.2.4" edition = "2021" authors = ["{{authors}}"] resolver = "2" diff --git a/templates/project/Cargo.toml b/templates/project/Cargo.toml index 6b93cbf6d..cf2d6e19b 100644 --- a/templates/project/Cargo.toml +++ b/templates/project/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "{{project-name}}" -version = "0.2.3" +version = "0.2.4" edition = "2021" authors = ["{{authors}}"] resolver = "2"