Просмотр исходного кода

fix: Fix RAM example build and add it to the CI for future

create_resources() CMake function GLOB-ed every folder inside the example binaries directory provided, however we have added the example binaries sources and want them not to be considered.
Additionally, adding RAM example build to the CI enables us to catch regressions in the future, and build failiures have been fixed for all supported ESP-IDF versions.
Djordje Nedic 2 лет назад
Родитель
Сommit
520adfdb3a
3 измененных файлов с 4 добавлено и 2 удалено
  1. 2 0
      .gitlab-ci.yml
  2. 1 1
      examples/common/bin2array.cmake
  3. 1 1
      examples/esp32_load_ram_example/main/main.c

+ 2 - 0
.gitlab-ci.yml

@@ -34,6 +34,8 @@ variables:
     - cd $CI_PROJECT_DIR/examples/esp32_example
     - idf.py build -DMD5_ENABLED=1
     - idf.py build -DMD5_ENABLED=0
+    - cd $CI_PROJECT_DIR/examples/esp32_load_ram_example
+    - idf.py build
 
 build_idf_v4.2:
   extends: .build_idf_template

+ 1 - 1
examples/common/bin2array.cmake

@@ -3,7 +3,7 @@ function(create_resources dir output)
     # Create empty output file
     file(WRITE ${output} "#include <stdint.h>\n\n")
     # Collect input files
-    file(GLOB_RECURSE bin_paths ${dir}/*)
+    file(GLOB bin_paths ${dir}/ESP*/*)
     # Iterate through input files
     foreach(bin ${bin_paths})
         # Get short filenames, by discarding relative path

+ 1 - 1
examples/esp32_load_ram_example/main/main.c

@@ -28,7 +28,7 @@ static const char *TAG = "serial_ram_loader";
 
 // Max line size
 #define BUF_LEN 128
-static char buf[BUF_LEN] = {0};
+static uint8_t buf[BUF_LEN] = {0};
 
 void slave_monitor(void *arg)
 {