From 6223f55726e32a1e94f9c0b6843827a635674972 Mon Sep 17 00:00:00 2001 From: pennam Date: Tue, 15 Nov 2022 14:08:36 +0100 Subject: [PATCH 01/11] Make mbed_app.json more readable --- mbed_app.json | 122 +++++++++++++++++++++++++++++++------------------- 1 file changed, 76 insertions(+), 46 deletions(-) diff --git a/mbed_app.json b/mbed_app.json index 01d3766..f204f28 100644 --- a/mbed_app.json +++ b/mbed_app.json @@ -1,6 +1,23 @@ { - "requires": ["bare-metal", "mbedtls", "mcuboot", "flashiap-block-device", "spif-driver", "qspif", "mbed-trace", "filesystem", "fat_chan", "littlefs", "rtos", "cmsis-cmsis5-rtos2", "events"], - "macros": ["MBED_FAULT_HANDLER_DISABLED", "USE_USB_HS", "LOWSPEED=1", "MBEDTLS_USER_CONFIG_FILE=\"mbedtls_config.h\""], + "requires": [ + "bare-metal", + "mbedtls", + "mcuboot", + "flashiap-block-device", + "spif-driver", + "qspif", + "mbed-trace", + "filesystem", + "fat_chan", + "littlefs", + "rtos", + "cmsis-cmsis5-rtos2", + "events" + ], + "macros": [ + "MBED_FAULT_HANDLER_DISABLED", + "MBEDTLS_USER_CONFIG_FILE=\"mbedtls_config.h\"" + ], "config": { "serial-bootloader-enable": { "help": "Build bootloader with serial update support", @@ -11,19 +28,32 @@ "*": { "target.restrict_size": "0x20000", "target.c_lib": "small", - "mcuboot.log-level": "MCUBOOT_LOG_LEVEL_INFO", - "mbed-trace.enable": false, - "mbed-trace.fea-ipv6": false - }, - "PORTENTA_H7_M7": { - "target.clock_source": "USE_PLL_HSE_EXTC", - "target.use-mpu": false, - "target.components_remove" : ["WHD", "4343W_FS", "CYW43XXX"], - "target.extra_labels_remove" : ["CORDIO"], - "target.features_remove" : ["BLE"], - "target.device_has_remove": ["USBDEVICE", "EMAC", "CAN", "SPI_ASYNCH", "SPISLAVE", "SPI","SERIAL_FC", "PWMOUT", "ANALOGIN", "ANALOGOUT", "I2CSLAVE", "I2C_ASYNC", "OSPI", "TRNG", "DAC", "CRC", "WATCHDOG", "RTC", "LPTICKER", "SLEEP"], "target.printf_lib": "minimal-printf", "target.i2c_timing_value_algo": false, + "target.extra_labels_remove" : ["CORDIO"], + "target.features_remove" : ["BLE"], + "target.device_has_remove": [ + "USBDEVICE", + "EMAC", + "CAN", + "SPI_ASYNCH", + "SPISLAVE", + "SPI", + "SERIAL_FC", + "PWMOUT", + "ANALOGIN", + "ANALOGOUT", + "I2CSLAVE", + "I2C_ASYNC", + "OSPI", + "TRNG", + "DAC", + "CRC", + "WATCHDOG", + "RTC", + "LPTICKER", + "SLEEP" + ], "platform.minimal-printf-enable-floating-point": false, "platform.minimal-printf-enable-64-bit": false, "platform.stdio-flush-at-exit": false, @@ -31,6 +61,7 @@ "fat_chan.ff_use_mkfs": 0, "fat_chan.ff_use_lfn": 0, "fat_chan.ff_fs_rpath": 0, + "mcuboot.log-level": "MCUBOOT_LOG_LEVEL_INFO", "mcuboot.primary-slot-address": "0x8020000", "mcuboot.slot-size": "0x1E0000", "mcuboot.scratch-address": "0x9000000", @@ -40,49 +71,48 @@ "mcuboot.bootstrap": true, "mcuboot.application-hooks": true, "mcuboot.application-littlefs": true, - "mcuboot.application-sdcard": true, "mcuboot.application-dfu": true, "mcuboot.signature-algorithm": "SIGNATURE_TYPE_EC256", "mcuboot.encrypt-ec256": true, "mcuboot.include-keys": null, "mcuboot.bootloader-build": false, "mcuboot.encrypt-scratch": true, - "mcuboot.swap-buf-size": 131072 + "mcuboot.swap-buf-size": 131072, + "mbed-trace.enable": false, + "mbed-trace.fea-ipv6": false + }, + "PORTENTA_H7_M7": { + "target.clock_source": "USE_PLL_HSE_EXTC", + "target.use-mpu": false, + "target.macros_add": [ + "USE_USB_HS", + "LOWSPEED=1" + ], + "target.components_remove" : [ + "WHD", + "4343W_FS", + "CYW43XXX" + ], + "mcuboot.application-sdcard": true }, "NICLA_VISION": { "target.clock_source": "USE_PLL_HSE_EXTC", "target.use-mpu": false, - "target.components_remove" : ["WHD", "4343W_FS", "CYW43XXX", "SE050"], - "target.extra_labels_remove" : ["CORDIO"], - "target.features_remove" : ["BLE"], - "target.device_has_remove": ["USBDEVICE", "EMAC", "CAN", "SPI_ASYNCH", "SPISLAVE", "SPI","SERIAL_FC", "PWMOUT", "ANALOGIN", "ANALOGOUT", "I2CSLAVE", "I2C_ASYNC", "OSPI", "TRNG", "DAC", "CRC", "WATCHDOG", "RTC", "LPTICKER", "SLEEP"], - "target.printf_lib": "minimal-printf", - "target.i2c_timing_value_algo": false, - "target.macros_add":["BOARD_HAS_VIDEO=0", "BOARD_HAS_ETHERNET=0"], - "platform.minimal-printf-enable-floating-point": false, - "platform.minimal-printf-enable-64-bit": false, - "platform.stdio-flush-at-exit": false, - "platform.stdio-baud-rate": 115200, - "fat_chan.ff_use_mkfs": 0, - "fat_chan.ff_use_lfn": 0, - "fat_chan.ff_fs_rpath": 0, - "mcuboot.primary-slot-address": "0x8020000", - "mcuboot.slot-size": "0x1E0000", - "mcuboot.scratch-address": "0x9000000", - "mcuboot.scratch-size": "0x20000", - "mcuboot.max-img-sectors": "0x3C0", - "mcuboot.max-align": 32, - "mcuboot.bootstrap": true, - "mcuboot.application-hooks": true, - "mcuboot.application-littlefs": true, - "mcuboot.application-sdcard": null, - "mcuboot.application-dfu": true, - "mcuboot.signature-algorithm": "SIGNATURE_TYPE_EC256", - "mcuboot.encrypt-ec256": true, - "mcuboot.include-keys": null, - "mcuboot.bootloader-build": false, - "mcuboot.encrypt-scratch": true, - "mcuboot.swap-buf-size": 131072 + "target.macros_add": [ + "USE_USB_HS", + "LOWSPEED=1" + ], + "target.components_remove" : [ + "WHD", + "4343W_FS", + "CYW43XXX", + "SE050" + ], + "target.macros_add":[ + "BOARD_HAS_VIDEO=0", + "BOARD_HAS_ETHERNET=0" + ], + "mcuboot.application-sdcard": null } } } From 3a2e16fd29c0c9ebf9b58adc4ae25ccda180eb7d Mon Sep 17 00:00:00 2001 From: pennam Date: Tue, 22 Nov 2022 17:47:23 +0100 Subject: [PATCH 02/11] Remove duplicate entries --- mbed_app.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mbed_app.json b/mbed_app.json index f204f28..c8010ab 100644 --- a/mbed_app.json +++ b/mbed_app.json @@ -100,7 +100,9 @@ "target.use-mpu": false, "target.macros_add": [ "USE_USB_HS", - "LOWSPEED=1" + "LOWSPEED=1", + "BOARD_HAS_VIDEO=0", + "BOARD_HAS_ETHERNET=0" ], "target.components_remove" : [ "WHD", @@ -108,10 +110,6 @@ "CYW43XXX", "SE050" ], - "target.macros_add":[ - "BOARD_HAS_VIDEO=0", - "BOARD_HAS_ETHERNET=0" - ], "mcuboot.application-sdcard": null } } From 133df887f54469f884954f8ef241cafe2aca02ed Mon Sep 17 00:00:00 2001 From: pennam Date: Tue, 22 Nov 2022 17:54:11 +0100 Subject: [PATCH 03/11] Add dedicated mbed_app file for each board --- mbed_app_nicla_vision.json | 100 ++++++++++++++++++++++++++ mbed_app_portenta.json | 97 +++++++++++++++++++++++++ mbed_app_portenta_lite.json | 99 +++++++++++++++++++++++++ mbed_app_portenta_lite_connected.json | 98 +++++++++++++++++++++++++ 4 files changed, 394 insertions(+) create mode 100644 mbed_app_nicla_vision.json create mode 100644 mbed_app_portenta.json create mode 100644 mbed_app_portenta_lite.json create mode 100644 mbed_app_portenta_lite_connected.json diff --git a/mbed_app_nicla_vision.json b/mbed_app_nicla_vision.json new file mode 100644 index 0000000..56b0c9d --- /dev/null +++ b/mbed_app_nicla_vision.json @@ -0,0 +1,100 @@ +{ + "requires": [ + "bare-metal", + "mbedtls", + "mcuboot", + "flashiap-block-device", + "spif-driver", + "qspif", + "mbed-trace", + "filesystem", + "fat_chan", + "littlefs", + "rtos", + "cmsis-cmsis5-rtos2", + "events" + ], + "macros": [ + "MBED_FAULT_HANDLER_DISABLED", + "MBEDTLS_USER_CONFIG_FILE=\"mbedtls_config.h\"" + ], + "config": { + "serial-bootloader-enable": { + "help": "Build bootloader with serial update support", + "value": 0 + } + }, + "target_overrides": { + "NICLA_VISION": { + "target.restrict_size": "0x20000", + "target.c_lib": "small", + "target.printf_lib": "minimal-printf", + "target.i2c_timing_value_algo": false, + "target.extra_labels_remove" : ["CORDIO"], + "target.features_remove" : ["BLE"], + "target.device_has_remove": [ + "USBDEVICE", + "EMAC", + "CAN", + "SPI_ASYNCH", + "SPISLAVE", + "SPI", + "SERIAL_FC", + "PWMOUT", + "ANALOGIN", + "ANALOGOUT", + "I2CSLAVE", + "I2C_ASYNC", + "OSPI", + "TRNG", + "DAC", + "CRC", + "WATCHDOG", + "RTC", + "LPTICKER", + "SLEEP" + ], + "target.clock_source": "USE_PLL_HSE_EXTC", + "target.use-mpu": false, + "target.macros_add": [ + "USE_USB_HS", + "LOWSPEED=1", + "BOARD_HAS_VIDEO=0", + "BOARD_HAS_ETHERNET=0" + ], + "target.components_remove" : [ + "WHD", + "4343W_FS", + "CYW43XXX", + "SE050" + ], + "platform.minimal-printf-enable-floating-point": false, + "platform.minimal-printf-enable-64-bit": false, + "platform.stdio-flush-at-exit": false, + "platform.stdio-baud-rate": 115200, + "fat_chan.ff_use_mkfs": 0, + "fat_chan.ff_use_lfn": 0, + "fat_chan.ff_fs_rpath": 0, + "mcuboot.log-level": "MCUBOOT_LOG_LEVEL_INFO", + "mcuboot.primary-slot-address": "0x8020000", + "mcuboot.slot-size": "0x1E0000", + "mcuboot.scratch-address": "0x9000000", + "mcuboot.scratch-size": "0x20000", + "mcuboot.max-img-sectors": "0x3C0", + "mcuboot.max-align": 32, + "mcuboot.bootstrap": true, + "mcuboot.application-hooks": true, + "mcuboot.application-littlefs": true, + "mcuboot.application-dfu": true, + "mcuboot.application-sdcard": null, + "mcuboot.signature-algorithm": "SIGNATURE_TYPE_EC256", + "mcuboot.encrypt-ec256": true, + "mcuboot.include-keys": null, + "mcuboot.bootloader-build": false, + "mcuboot.encrypt-scratch": true, + "mcuboot.swap-buf-size": 131072, + "mbed-trace.enable": false, + "mbed-trace.fea-ipv6": false + } + } +} diff --git a/mbed_app_portenta.json b/mbed_app_portenta.json new file mode 100644 index 0000000..9a1256f --- /dev/null +++ b/mbed_app_portenta.json @@ -0,0 +1,97 @@ +{ + "requires": [ + "bare-metal", + "mbedtls", + "mcuboot", + "flashiap-block-device", + "spif-driver", + "qspif", + "mbed-trace", + "filesystem", + "fat_chan", + "littlefs", + "rtos", + "cmsis-cmsis5-rtos2", + "events" + ], + "macros": [ + "MBED_FAULT_HANDLER_DISABLED", + "MBEDTLS_USER_CONFIG_FILE=\"mbedtls_config.h\"" + ], + "config": { + "serial-bootloader-enable": { + "help": "Build bootloader with serial update support", + "value": 0 + } + }, + "target_overrides": { + "PORTENTA_H7_M7": { + "target.restrict_size": "0x20000", + "target.c_lib": "small", + "target.printf_lib": "minimal-printf", + "target.i2c_timing_value_algo": false, + "target.extra_labels_remove" : ["CORDIO"], + "target.features_remove" : ["BLE"], + "target.device_has_remove": [ + "USBDEVICE", + "EMAC", + "CAN", + "SPI_ASYNCH", + "SPISLAVE", + "SPI", + "SERIAL_FC", + "PWMOUT", + "ANALOGIN", + "ANALOGOUT", + "I2CSLAVE", + "I2C_ASYNC", + "OSPI", + "TRNG", + "DAC", + "CRC", + "WATCHDOG", + "RTC", + "LPTICKER", + "SLEEP" + ], + "target.clock_source": "USE_PLL_HSE_EXTC", + "target.use-mpu": false, + "target.macros_add": [ + "USE_USB_HS", + "LOWSPEED=1" + ], + "target.components_remove" : [ + "WHD", + "4343W_FS", + "CYW43XXX" + ], + "platform.minimal-printf-enable-floating-point": false, + "platform.minimal-printf-enable-64-bit": false, + "platform.stdio-flush-at-exit": false, + "platform.stdio-baud-rate": 115200, + "fat_chan.ff_use_mkfs": 0, + "fat_chan.ff_use_lfn": 0, + "fat_chan.ff_fs_rpath": 0, + "mcuboot.log-level": "MCUBOOT_LOG_LEVEL_INFO", + "mcuboot.primary-slot-address": "0x8020000", + "mcuboot.slot-size": "0x1E0000", + "mcuboot.scratch-address": "0x9000000", + "mcuboot.scratch-size": "0x20000", + "mcuboot.max-img-sectors": "0x3C0", + "mcuboot.max-align": 32, + "mcuboot.bootstrap": true, + "mcuboot.application-hooks": true, + "mcuboot.application-littlefs": true, + "mcuboot.application-dfu": true, + "mcuboot.application-sdcard": true, + "mcuboot.signature-algorithm": "SIGNATURE_TYPE_EC256", + "mcuboot.encrypt-ec256": true, + "mcuboot.include-keys": null, + "mcuboot.bootloader-build": false, + "mcuboot.encrypt-scratch": true, + "mcuboot.swap-buf-size": 131072, + "mbed-trace.enable": false, + "mbed-trace.fea-ipv6": false + } + } +} diff --git a/mbed_app_portenta_lite.json b/mbed_app_portenta_lite.json new file mode 100644 index 0000000..dadbc8f --- /dev/null +++ b/mbed_app_portenta_lite.json @@ -0,0 +1,99 @@ +{ + "requires": [ + "bare-metal", + "mbedtls", + "mcuboot", + "flashiap-block-device", + "spif-driver", + "qspif", + "mbed-trace", + "filesystem", + "fat_chan", + "littlefs", + "rtos", + "cmsis-cmsis5-rtos2", + "events" + ], + "macros": [ + "MBED_FAULT_HANDLER_DISABLED", + "MBEDTLS_USER_CONFIG_FILE=\"mbedtls_config.h\"" + ], + "config": { + "serial-bootloader-enable": { + "help": "Build bootloader with serial update support", + "value": 0 + } + }, + "target_overrides": { + "PORTENTA_H7_M7": { + "target.restrict_size": "0x20000", + "target.c_lib": "small", + "target.printf_lib": "minimal-printf", + "target.i2c_timing_value_algo": false, + "target.extra_labels_remove" : ["CORDIO"], + "target.features_remove" : ["BLE"], + "target.device_has_remove": [ + "USBDEVICE", + "EMAC", + "CAN", + "SPI_ASYNCH", + "SPISLAVE", + "SPI", + "SERIAL_FC", + "PWMOUT", + "ANALOGIN", + "ANALOGOUT", + "I2CSLAVE", + "I2C_ASYNC", + "OSPI", + "TRNG", + "DAC", + "CRC", + "WATCHDOG", + "RTC", + "LPTICKER", + "SLEEP" + ], + "target.clock_source": "USE_PLL_HSE_EXTC", + "target.use-mpu": false, + "target.macros_add": [ + "USE_USB_HS", + "LOWSPEED=1", + "BOARD_HAS_VIDEO=0", + "BOARD_HAS_WIFI=0" + ], + "target.components_remove" : [ + "WHD", + "4343W_FS", + "CYW43XXX" + ], + "platform.minimal-printf-enable-floating-point": false, + "platform.minimal-printf-enable-64-bit": false, + "platform.stdio-flush-at-exit": false, + "platform.stdio-baud-rate": 115200, + "fat_chan.ff_use_mkfs": 0, + "fat_chan.ff_use_lfn": 0, + "fat_chan.ff_fs_rpath": 0, + "mcuboot.log-level": "MCUBOOT_LOG_LEVEL_INFO", + "mcuboot.primary-slot-address": "0x8020000", + "mcuboot.slot-size": "0x1E0000", + "mcuboot.scratch-address": "0x9000000", + "mcuboot.scratch-size": "0x20000", + "mcuboot.max-img-sectors": "0x3C0", + "mcuboot.max-align": 32, + "mcuboot.bootstrap": true, + "mcuboot.application-hooks": true, + "mcuboot.application-littlefs": true, + "mcuboot.application-dfu": true, + "mcuboot.application-sdcard": true, + "mcuboot.signature-algorithm": "SIGNATURE_TYPE_EC256", + "mcuboot.encrypt-ec256": true, + "mcuboot.include-keys": null, + "mcuboot.bootloader-build": false, + "mcuboot.encrypt-scratch": true, + "mcuboot.swap-buf-size": 131072, + "mbed-trace.enable": false, + "mbed-trace.fea-ipv6": false + } + } +} diff --git a/mbed_app_portenta_lite_connected.json b/mbed_app_portenta_lite_connected.json new file mode 100644 index 0000000..9936892 --- /dev/null +++ b/mbed_app_portenta_lite_connected.json @@ -0,0 +1,98 @@ +{ + "requires": [ + "bare-metal", + "mbedtls", + "mcuboot", + "flashiap-block-device", + "spif-driver", + "qspif", + "mbed-trace", + "filesystem", + "fat_chan", + "littlefs", + "rtos", + "cmsis-cmsis5-rtos2", + "events" + ], + "macros": [ + "MBED_FAULT_HANDLER_DISABLED", + "MBEDTLS_USER_CONFIG_FILE=\"mbedtls_config.h\"" + ], + "config": { + "serial-bootloader-enable": { + "help": "Build bootloader with serial update support", + "value": 0 + } + }, + "target_overrides": { + "PORTENTA_H7_M7": { + "target.restrict_size": "0x20000", + "target.c_lib": "small", + "target.printf_lib": "minimal-printf", + "target.i2c_timing_value_algo": false, + "target.extra_labels_remove" : ["CORDIO"], + "target.features_remove" : ["BLE"], + "target.device_has_remove": [ + "USBDEVICE", + "EMAC", + "CAN", + "SPI_ASYNCH", + "SPISLAVE", + "SPI", + "SERIAL_FC", + "PWMOUT", + "ANALOGIN", + "ANALOGOUT", + "I2CSLAVE", + "I2C_ASYNC", + "OSPI", + "TRNG", + "DAC", + "CRC", + "WATCHDOG", + "RTC", + "LPTICKER", + "SLEEP" + ], + "target.clock_source": "USE_PLL_HSE_EXTC", + "target.use-mpu": false, + "target.macros_add": [ + "USE_USB_HS", + "LOWSPEED=1", + "BOARD_HAS_VIDEO=0" + ], + "target.components_remove" : [ + "WHD", + "4343W_FS", + "CYW43XXX" + ], + "platform.minimal-printf-enable-floating-point": false, + "platform.minimal-printf-enable-64-bit": false, + "platform.stdio-flush-at-exit": false, + "platform.stdio-baud-rate": 115200, + "fat_chan.ff_use_mkfs": 0, + "fat_chan.ff_use_lfn": 0, + "fat_chan.ff_fs_rpath": 0, + "mcuboot.log-level": "MCUBOOT_LOG_LEVEL_INFO", + "mcuboot.primary-slot-address": "0x8020000", + "mcuboot.slot-size": "0x1E0000", + "mcuboot.scratch-address": "0x9000000", + "mcuboot.scratch-size": "0x20000", + "mcuboot.max-img-sectors": "0x3C0", + "mcuboot.max-align": 32, + "mcuboot.bootstrap": true, + "mcuboot.application-hooks": true, + "mcuboot.application-littlefs": true, + "mcuboot.application-dfu": true, + "mcuboot.application-sdcard": true, + "mcuboot.signature-algorithm": "SIGNATURE_TYPE_EC256", + "mcuboot.encrypt-ec256": true, + "mcuboot.include-keys": null, + "mcuboot.bootloader-build": false, + "mcuboot.encrypt-scratch": true, + "mcuboot.swap-buf-size": 131072, + "mbed-trace.enable": false, + "mbed-trace.fea-ipv6": false + } + } +} From f630f814d5dfa85c01df5e6d7ef430658db935cc Mon Sep 17 00:00:00 2001 From: pennam Date: Tue, 22 Nov 2022 18:00:47 +0100 Subject: [PATCH 04/11] Make mbed_app_bootutil.json more readable --- mbed_app_bootutil.json | 69 +++++++++++++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 14 deletions(-) diff --git a/mbed_app_bootutil.json b/mbed_app_bootutil.json index 6acff71..c2a1b6c 100644 --- a/mbed_app_bootutil.json +++ b/mbed_app_bootutil.json @@ -1,6 +1,24 @@ { - "requires": ["bare-metal", "mbedtls", "mcuboot", "flashiap-block-device", "spif-driver", "qspif", "mbed-trace", "filesystem", "fat_chan", "littlefs", "rtos", "cmsis-cmsis5-rtos2", "events"], - "macros": ["MBED_FAULT_HANDLER_DISABLED", "USE_USB_HS", "LOWSPEED=1", "MBEDTLS_USER_CONFIG_FILE=\"mbedtls_config.h\""], + "requires": [ + "bare-metal", + "mbedtls", + "mcuboot", + "flashiap-block-device", + "spif-driver", + "qspif", + "mbed-trace", + "filesystem", + "fat_chan", + "littlefs", + "rtos", + "cmsis-cmsis5-rtos2", + "events" + ], + "macros": [ + "MBED_FAULT_HANDLER_DISABLED", + "USE_USB_HS", + "LOWSPEED=1", + "MBEDTLS_USER_CONFIG_FILE=\"mbedtls_config.h\""], "config": { "serial-bootloader-enable": { "help": "Build bootloader with serial update support", @@ -11,19 +29,39 @@ "*": { "target.restrict_size": "0x40000", "target.c_lib": "small", - "mcuboot.log-level": "MCUBOOT_LOG_LEVEL_OFF", - "mbed-trace.enable": false, - "mbed-trace.fea-ipv6": false - }, - "PORTENTA_H7_M7": { - "target.clock_source": "USE_PLL_HSE_EXTC", - "target.use-mpu": false, - "target.components_remove" : ["WHD", "4343W_FS", "CYW43XXX"], - "target.extra_labels_remove" : ["CORDIO"], - "target.features_remove" : ["BLE"], - "target.device_has_remove": ["USBDEVICE", "EMAC", "CAN", "SPI_ASYNCH", "SPISLAVE", "SPI","SERIAL_FC", "PWMOUT", "ANALOGIN", "ANALOGOUT", "I2CSLAVE", "I2C_ASYNC", "OSPI", "TRNG", "DAC", "CRC", "WATCHDOG", "RTC", "LPTICKER", "SLEEP"], "target.printf_lib": "minimal-printf", "target.i2c_timing_value_algo": false, + "target.extra_labels_remove" : ["CORDIO"], + "target.features_remove" : ["BLE"], + "target.device_has_remove": [ + "USBDEVICE", + "EMAC", + "CAN", + "SPI_ASYNCH", + "SPISLAVE", + "SPI", + "SERIAL_FC", + "PWMOUT", + "ANALOGIN", + "ANALOGOUT", + "I2CSLAVE", + "I2C_ASYNC", + "OSPI", + "TRNG", + "DAC", + "CRC", + "WATCHDOG", + "RTC", + "LPTICKER", + "SLEEP" + ], + "target.clock_source": "USE_PLL_HSE_EXTC", + "target.use-mpu": false, + "target.components_remove" : [ + "WHD", + "4343W_FS", + "CYW43XXX" + ], "platform.minimal-printf-enable-floating-point": false, "platform.minimal-printf-enable-64-bit": false, "platform.stdio-flush-at-exit": false, @@ -31,6 +69,7 @@ "fat_chan.ff_use_mkfs": 0, "fat_chan.ff_use_lfn": 0, "fat_chan.ff_fs_rpath": 0, + "mcuboot.log-level": "MCUBOOT_LOG_LEVEL_OFF", "mcuboot.primary-slot-address": "0x8020000", "mcuboot.slot-size": "0x1E0000", "mcuboot.scratch-address": "0x9000000", @@ -45,7 +84,9 @@ "mcuboot.signature-algorithm": "SIGNATURE_TYPE_EC256", "mcuboot.encrypt-ec256": true, "mcuboot.include-keys": null, - "mcuboot.bootloader-build": false + "mcuboot.bootloader-build": false, + "mbed-trace.enable": false, + "mbed-trace.fea-ipv6": false } } } From 9e3f13059431626d814f12f4641183f6c7da6ae5 Mon Sep 17 00:00:00 2001 From: pennam Date: Tue, 22 Nov 2022 18:06:07 +0100 Subject: [PATCH 05/11] Add BOOTUTIL_LIBARY_BUILD macro inside json file --- mbed_app_bootutil.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mbed_app_bootutil.json b/mbed_app_bootutil.json index c2a1b6c..2e6dc20 100644 --- a/mbed_app_bootutil.json +++ b/mbed_app_bootutil.json @@ -18,7 +18,9 @@ "MBED_FAULT_HANDLER_DISABLED", "USE_USB_HS", "LOWSPEED=1", - "MBEDTLS_USER_CONFIG_FILE=\"mbedtls_config.h\""], + "MBEDTLS_USER_CONFIG_FILE=\"mbedtls_config.h\"", + "BOOTUTIL_LIBARY_BUILD=1" + ], "config": { "serial-bootloader-enable": { "help": "Build bootloader with serial update support", From a280a5164c97e62d85ecf7b0e36086fc93646798 Mon Sep 17 00:00:00 2001 From: pennam Date: Wed, 23 Nov 2022 10:37:07 +0100 Subject: [PATCH 06/11] Nicla Vision: add BOARD_RAM_SIZE=0 in json file --- mbed_app_nicla_vision.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mbed_app_nicla_vision.json b/mbed_app_nicla_vision.json index 56b0c9d..7de48c6 100644 --- a/mbed_app_nicla_vision.json +++ b/mbed_app_nicla_vision.json @@ -60,7 +60,8 @@ "USE_USB_HS", "LOWSPEED=1", "BOARD_HAS_VIDEO=0", - "BOARD_HAS_ETHERNET=0" + "BOARD_HAS_ETHERNET=0", + "BOARD_RAM_SIZE=0" ], "target.components_remove" : [ "WHD", From c55b688bff8d0c562a9df65ab408f962f57352ab Mon Sep 17 00:00:00 2001 From: pennam Date: Wed, 23 Nov 2022 10:49:57 +0100 Subject: [PATCH 07/11] Add tar.gz generation running generate_rel.sh --- generate_rel.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/generate_rel.sh b/generate_rel.sh index 2c96c95..b452414 100755 --- a/generate_rel.sh +++ b/generate_rel.sh @@ -22,6 +22,7 @@ cp ./BUILD/PORTENTA_H7_M7/GCC_ARM-RELEASE/mcuboot_portenta_h7_application.elf ./ xxd -i ./release/PORTENTA_H7/mcuboot_portenta_h7.bin > ./release/PORTENTA_H7/mcuboot_portenta_h7.h sed -i "s/unsigned char __release_PORTENTA_H7_mcuboot_portenta_h7_bin/const unsigned char mcuboot_portenta_h7_bin/" ./release/PORTENTA_H7/mcuboot_portenta_h7.h sed -i "s/__release_PORTENTA_H7_mcuboot_portenta_h7_bin_len/mcuboot_portenta_h7_bin_len/" ./release/PORTENTA_H7/mcuboot_portenta_h7.h +tar -czvf ./release/PORTENTA_H7.tar.gz -C ./release/ PORTENTA_H7 fi if [[ $1 == "lite" ]] || [[ $1 == "all" ]]; then @@ -35,6 +36,7 @@ cp ./BUILD/PORTENTA_H7_M7/GCC_ARM-RELEASE/mcuboot_portenta_h7_lite_application.e xxd -i ./release/PORTENTA_H7_Lite/mcuboot_portenta_h7_lite.bin > ./release/PORTENTA_H7_Lite/mcuboot_portenta_h7_lite.h sed -i "s/unsigned char __release_PORTENTA_H7_mcuboot_portenta_h7_lite_bin/const unsigned char mcuboot_portenta_h7_lite_bin/" ./release/PORTENTA_H7_Lite/mcuboot_portenta_h7_lite.h sed -i "s/__release_PORTENTA_H7_mcuboot_portenta_h7_lite_bin_len/mcuboot_portenta_h7_lite_bin_len/" ./release/PORTENTA_H7_Lite/mcuboot_portenta_h7_lite.h +tar -czvf ./release/PORTENTA_H7_Lite.tar.gz -C ./release/ PORTENTA_H7_Lite fi if [[ $1 == "connected" ]] || [[ $1 == "all" ]]; then @@ -48,6 +50,7 @@ cp ./BUILD/PORTENTA_H7_M7/GCC_ARM-RELEASE/mcuboot_portenta_h7_lite_connected_app xxd -i ./release/PORTENTA_H7_Lite_Connected/mcuboot_portenta_h7_lite_connected.bin > ./release/PORTENTA_H7_Lite_Connected/mcuboot_portenta_h7_lite_connected.h sed -i "s/unsigned char __release_PORTENTA_H7_mcuboot_portenta_h7_lite_connected_bin/const unsigned char mcuboot_portenta_h7_lite_connected_bin/" ./release/PORTENTA_H7_Lite_Connected/mcuboot_portenta_h7_lite_connected.h sed -i "s/__release_PORTENTA_H7_mcuboot_portenta_h7_lite_connected_bin_len/mcuboot_portenta_h7_lite_connected_bin_len/" ./release/PORTENTA_H7_Lite_Connected/mcuboot_portenta_h7_lite_connected.h +tar -czvf ./release/PORTENTA_H7_Lite_Connected.tar.gz -C ./release/ PORTENTA_H7_Lite_Connected fi if [[ $1 == "nicla" ]] || [[ $1 == "all" ]]; then @@ -61,4 +64,5 @@ cp ./BUILD/NICLA_VISION/GCC_ARM-RELEASE/mcuboot_nicla_vision_application.elf ./r xxd -i ./release/NICLA_VISION/mcuboot_nicla_vision.bin > ./release/NICLA_VISION/mcuboot_nicla_vision.h sed -i "s/unsigned char __release_NICLA_VISION_mcuboot_nicla_vision_bin/const unsigned char mcuboot_nicla_vision_bin/" ./release/NICLA_VISION/mcuboot_nicla_vision.h sed -i "s/__release_NICLA_VISION_mcuboot_nicla_vision_bin_len/mcuboot_nicla_vision_bin_len/" ./release/NICLA_VISION/mcuboot_nicla_vision.h +tar -czvf ./release/NICLA_VISION.tar.gz -C ./release/ NICLA_VISION fi From f352e6be6c7a6ccf10d2903553da9cadac1838c2 Mon Sep 17 00:00:00 2001 From: pennam Date: Wed, 23 Nov 2022 10:51:37 +0100 Subject: [PATCH 08/11] Use dedicated json file and custom profile to build bootloader --- generate_rel.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/generate_rel.sh b/generate_rel.sh index b452414..f8c2f06 100755 --- a/generate_rel.sh +++ b/generate_rel.sh @@ -3,7 +3,7 @@ rm -rf release rm -rf BUILD if [[ $1 == "library" ]] || [[ $1 == "all" ]]; then -mbed compile -c -m PORTENTA_H7_M7 -t GCC_ARM --app=mbed_app_bootutil.json -DBOOTUTIL_LIBARY_BUILD=1 +mbed compile -c -m PORTENTA_H7_M7 -t GCC_ARM --app=mbed_app_bootutil.json echo echo Generating bootutil library find ./BUILD/PORTENTA_H7_M7/GCC_ARM/ \( -name "FileBlockDevice.o" -o -name "BSP.o" -o -name "SDMMCBlockDevice.o" -o -name "rtc.o" -o -name "default_bd.o" -o -name "bootutil_extra.o" -o -name "flash_map_backend.o" -o -name "bootutil_public.o" \) | xargs arm-none-eabi-ar -csr libbootutil.a @@ -14,7 +14,7 @@ fi if [[ $1 == "portenta" ]] || [[ $1 == "all" ]]; then echo echo Generating binaries for PORTENTA H7 -mbed compile -c -m PORTENTA_H7_M7 -t GCC_ARM --profile=release --profile mbed-os/tools/profiles/extensions/lto.json -N mcuboot_portenta_h7 +mbed compile -c -m PORTENTA_H7_M7 -t GCC_ARM --app=mbed_app_portenta.json --profile=release --profile custom.json -N mcuboot_portenta_h7 mkdir -p release/PORTENTA_H7 cp ./libbootutil.a ./release/PORTENTA_H7 cp ./BUILD/PORTENTA_H7_M7/GCC_ARM-RELEASE/mcuboot_portenta_h7.bin ./release/PORTENTA_H7/mcuboot_portenta_h7.bin @@ -28,7 +28,7 @@ fi if [[ $1 == "lite" ]] || [[ $1 == "all" ]]; then echo echo Generating binaries for PORTENTA H7 Lite -mbed compile -c -m PORTENTA_H7_M7 -t GCC_ARM --profile=release --profile mbed-os/tools/profiles/extensions/lto.json -DBOARD_HAS_VIDEO=0 -DBOARD_HAS_WIFI=0 -N mcuboot_portenta_h7_lite +mbed compile -c -m PORTENTA_H7_M7 -t GCC_ARM --app=mbed_app_portenta_lite.json --profile=release --profile custom.json -N mcuboot_portenta_h7_lite mkdir -p release/PORTENTA_H7_Lite cp ./libbootutil.a ./release/PORTENTA_H7_Lite cp ./BUILD/PORTENTA_H7_M7/GCC_ARM-RELEASE/mcuboot_portenta_h7_lite.bin ./release/PORTENTA_H7_Lite/mcuboot_portenta_h7_lite.bin @@ -42,7 +42,7 @@ fi if [[ $1 == "connected" ]] || [[ $1 == "all" ]]; then echo echo Generating binaries for PORTENTA H7 Lite Connected -mbed compile -c -m PORTENTA_H7_M7 -t GCC_ARM --profile=release --profile mbed-os/tools/profiles/extensions/lto.json -DBOARD_HAS_VIDEO=0 -N mcuboot_portenta_h7_lite_connected +mbed compile -c -m PORTENTA_H7_M7 -t GCC_ARM --app=mbed_app_portenta_lite_connected.json --profile=release --profile custom.json -N mcuboot_portenta_h7_lite_connected mkdir -p release/PORTENTA_H7_Lite_Connected cp ./libbootutil.a ./release/PORTENTA_H7_Lite_Connected cp ./BUILD/PORTENTA_H7_M7/GCC_ARM-RELEASE/mcuboot_portenta_h7_lite_connected.bin ./release/PORTENTA_H7_Lite_Connected/mcuboot_portenta_h7_lite_connected.bin @@ -56,7 +56,7 @@ fi if [[ $1 == "nicla" ]] || [[ $1 == "all" ]]; then echo echo Generating binaries for NICLA VISION -mbed compile -c -m NICLA_VISION -t GCC_ARM --profile=release --profile mbed-os/tools/profiles/extensions/lto.json -DBOARD_RAM_SIZE=0 -N mcuboot_nicla_vision +mbed compile -c -m NICLA_VISION -t GCC_ARM --app=mbed_app_nicla_vision.json --profile=release --profile custom.json -N mcuboot_nicla_vision mkdir -p release/NICLA_VISION mv ./libbootutil.a ./release/NICLA_VISION cp ./BUILD/NICLA_VISION/GCC_ARM-RELEASE/mcuboot_nicla_vision.bin ./release/NICLA_VISION/mcuboot_nicla_vision.bin From bbdc9046eae0e258a6f33796b77405ba9f0d1d94 Mon Sep 17 00:00:00 2001 From: pennam Date: Wed, 23 Nov 2022 10:52:57 +0100 Subject: [PATCH 09/11] Stop script if a command fails --- generate_rel.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/generate_rel.sh b/generate_rel.sh index f8c2f06..674c8dd 100755 --- a/generate_rel.sh +++ b/generate_rel.sh @@ -11,6 +11,8 @@ echo -n "Library: " find ./ -name "libbootutil.a" fi +set -e + if [[ $1 == "portenta" ]] || [[ $1 == "all" ]]; then echo echo Generating binaries for PORTENTA H7 From 196daa9d14596a48c4c750d16ef090d7cc3bee5f Mon Sep 17 00:00:00 2001 From: pennam Date: Wed, 23 Nov 2022 10:53:29 +0100 Subject: [PATCH 10/11] Always build libbootutil --- generate_rel.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/generate_rel.sh b/generate_rel.sh index 674c8dd..054d2e4 100755 --- a/generate_rel.sh +++ b/generate_rel.sh @@ -2,14 +2,12 @@ rm -rf release rm -rf BUILD -if [[ $1 == "library" ]] || [[ $1 == "all" ]]; then mbed compile -c -m PORTENTA_H7_M7 -t GCC_ARM --app=mbed_app_bootutil.json echo echo Generating bootutil library find ./BUILD/PORTENTA_H7_M7/GCC_ARM/ \( -name "FileBlockDevice.o" -o -name "BSP.o" -o -name "SDMMCBlockDevice.o" -o -name "rtc.o" -o -name "default_bd.o" -o -name "bootutil_extra.o" -o -name "flash_map_backend.o" -o -name "bootutil_public.o" \) | xargs arm-none-eabi-ar -csr libbootutil.a echo -n "Library: " find ./ -name "libbootutil.a" -fi set -e From 397ff46ce2343d1fc72f3d81d7ce082c6a8a6a48 Mon Sep 17 00:00:00 2001 From: pennam Date: Wed, 23 Nov 2022 17:55:41 +0100 Subject: [PATCH 11/11] Use correctly --profile=custom.json --- generate_rel.sh | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/generate_rel.sh b/generate_rel.sh index 054d2e4..f724d20 100755 --- a/generate_rel.sh +++ b/generate_rel.sh @@ -3,22 +3,23 @@ rm -rf release rm -rf BUILD mbed compile -c -m PORTENTA_H7_M7 -t GCC_ARM --app=mbed_app_bootutil.json + +set -e + echo echo Generating bootutil library find ./BUILD/PORTENTA_H7_M7/GCC_ARM/ \( -name "FileBlockDevice.o" -o -name "BSP.o" -o -name "SDMMCBlockDevice.o" -o -name "rtc.o" -o -name "default_bd.o" -o -name "bootutil_extra.o" -o -name "flash_map_backend.o" -o -name "bootutil_public.o" \) | xargs arm-none-eabi-ar -csr libbootutil.a echo -n "Library: " find ./ -name "libbootutil.a" -set -e - if [[ $1 == "portenta" ]] || [[ $1 == "all" ]]; then echo echo Generating binaries for PORTENTA H7 -mbed compile -c -m PORTENTA_H7_M7 -t GCC_ARM --app=mbed_app_portenta.json --profile=release --profile custom.json -N mcuboot_portenta_h7 +mbed compile -c -m PORTENTA_H7_M7 -t GCC_ARM --app=mbed_app_portenta.json --profile=custom.json -N mcuboot_portenta_h7 mkdir -p release/PORTENTA_H7 cp ./libbootutil.a ./release/PORTENTA_H7 -cp ./BUILD/PORTENTA_H7_M7/GCC_ARM-RELEASE/mcuboot_portenta_h7.bin ./release/PORTENTA_H7/mcuboot_portenta_h7.bin -cp ./BUILD/PORTENTA_H7_M7/GCC_ARM-RELEASE/mcuboot_portenta_h7_application.elf ./release/PORTENTA_H7/mcuboot_portenta_h7.elf +cp ./BUILD/PORTENTA_H7_M7/GCC_ARM-CUSTOM/mcuboot_portenta_h7.bin ./release/PORTENTA_H7/mcuboot_portenta_h7.bin +cp ./BUILD/PORTENTA_H7_M7/GCC_ARM-CUSTOM/mcuboot_portenta_h7_application.elf ./release/PORTENTA_H7/mcuboot_portenta_h7.elf xxd -i ./release/PORTENTA_H7/mcuboot_portenta_h7.bin > ./release/PORTENTA_H7/mcuboot_portenta_h7.h sed -i "s/unsigned char __release_PORTENTA_H7_mcuboot_portenta_h7_bin/const unsigned char mcuboot_portenta_h7_bin/" ./release/PORTENTA_H7/mcuboot_portenta_h7.h sed -i "s/__release_PORTENTA_H7_mcuboot_portenta_h7_bin_len/mcuboot_portenta_h7_bin_len/" ./release/PORTENTA_H7/mcuboot_portenta_h7.h @@ -28,11 +29,11 @@ fi if [[ $1 == "lite" ]] || [[ $1 == "all" ]]; then echo echo Generating binaries for PORTENTA H7 Lite -mbed compile -c -m PORTENTA_H7_M7 -t GCC_ARM --app=mbed_app_portenta_lite.json --profile=release --profile custom.json -N mcuboot_portenta_h7_lite +mbed compile -c -m PORTENTA_H7_M7 -t GCC_ARM --app=mbed_app_portenta_lite.json --profile=custom.json -N mcuboot_portenta_h7_lite mkdir -p release/PORTENTA_H7_Lite cp ./libbootutil.a ./release/PORTENTA_H7_Lite -cp ./BUILD/PORTENTA_H7_M7/GCC_ARM-RELEASE/mcuboot_portenta_h7_lite.bin ./release/PORTENTA_H7_Lite/mcuboot_portenta_h7_lite.bin -cp ./BUILD/PORTENTA_H7_M7/GCC_ARM-RELEASE/mcuboot_portenta_h7_lite_application.elf ./release/PORTENTA_H7_Lite/mcuboot_portenta_h7_lite.elf +cp ./BUILD/PORTENTA_H7_M7/GCC_ARM-CUSTOM/mcuboot_portenta_h7_lite.bin ./release/PORTENTA_H7_Lite/mcuboot_portenta_h7_lite.bin +cp ./BUILD/PORTENTA_H7_M7/GCC_ARM-CUSTOM/mcuboot_portenta_h7_lite_application.elf ./release/PORTENTA_H7_Lite/mcuboot_portenta_h7_lite.elf xxd -i ./release/PORTENTA_H7_Lite/mcuboot_portenta_h7_lite.bin > ./release/PORTENTA_H7_Lite/mcuboot_portenta_h7_lite.h sed -i "s/unsigned char __release_PORTENTA_H7_mcuboot_portenta_h7_lite_bin/const unsigned char mcuboot_portenta_h7_lite_bin/" ./release/PORTENTA_H7_Lite/mcuboot_portenta_h7_lite.h sed -i "s/__release_PORTENTA_H7_mcuboot_portenta_h7_lite_bin_len/mcuboot_portenta_h7_lite_bin_len/" ./release/PORTENTA_H7_Lite/mcuboot_portenta_h7_lite.h @@ -42,11 +43,11 @@ fi if [[ $1 == "connected" ]] || [[ $1 == "all" ]]; then echo echo Generating binaries for PORTENTA H7 Lite Connected -mbed compile -c -m PORTENTA_H7_M7 -t GCC_ARM --app=mbed_app_portenta_lite_connected.json --profile=release --profile custom.json -N mcuboot_portenta_h7_lite_connected +mbed compile -c -m PORTENTA_H7_M7 -t GCC_ARM --app=mbed_app_portenta_lite_connected.json --profile=custom.json -N mcuboot_portenta_h7_lite_connected mkdir -p release/PORTENTA_H7_Lite_Connected cp ./libbootutil.a ./release/PORTENTA_H7_Lite_Connected -cp ./BUILD/PORTENTA_H7_M7/GCC_ARM-RELEASE/mcuboot_portenta_h7_lite_connected.bin ./release/PORTENTA_H7_Lite_Connected/mcuboot_portenta_h7_lite_connected.bin -cp ./BUILD/PORTENTA_H7_M7/GCC_ARM-RELEASE/mcuboot_portenta_h7_lite_connected_application.elf ./release/PORTENTA_H7_Lite_Connected/mcuboot_portenta_h7_lite_connected.elf +cp ./BUILD/PORTENTA_H7_M7/GCC_ARM-CUSTOM/mcuboot_portenta_h7_lite_connected.bin ./release/PORTENTA_H7_Lite_Connected/mcuboot_portenta_h7_lite_connected.bin +cp ./BUILD/PORTENTA_H7_M7/GCC_ARM-CUSTOM/mcuboot_portenta_h7_lite_connected_application.elf ./release/PORTENTA_H7_Lite_Connected/mcuboot_portenta_h7_lite_connected.elf xxd -i ./release/PORTENTA_H7_Lite_Connected/mcuboot_portenta_h7_lite_connected.bin > ./release/PORTENTA_H7_Lite_Connected/mcuboot_portenta_h7_lite_connected.h sed -i "s/unsigned char __release_PORTENTA_H7_mcuboot_portenta_h7_lite_connected_bin/const unsigned char mcuboot_portenta_h7_lite_connected_bin/" ./release/PORTENTA_H7_Lite_Connected/mcuboot_portenta_h7_lite_connected.h sed -i "s/__release_PORTENTA_H7_mcuboot_portenta_h7_lite_connected_bin_len/mcuboot_portenta_h7_lite_connected_bin_len/" ./release/PORTENTA_H7_Lite_Connected/mcuboot_portenta_h7_lite_connected.h @@ -56,11 +57,11 @@ fi if [[ $1 == "nicla" ]] || [[ $1 == "all" ]]; then echo echo Generating binaries for NICLA VISION -mbed compile -c -m NICLA_VISION -t GCC_ARM --app=mbed_app_nicla_vision.json --profile=release --profile custom.json -N mcuboot_nicla_vision +mbed compile -c -m NICLA_VISION -t GCC_ARM --app=mbed_app_nicla_vision.json --profile=custom.json -N mcuboot_nicla_vision mkdir -p release/NICLA_VISION mv ./libbootutil.a ./release/NICLA_VISION -cp ./BUILD/NICLA_VISION/GCC_ARM-RELEASE/mcuboot_nicla_vision.bin ./release/NICLA_VISION/mcuboot_nicla_vision.bin -cp ./BUILD/NICLA_VISION/GCC_ARM-RELEASE/mcuboot_nicla_vision_application.elf ./release/NICLA_VISION/mcuboot_nicla_vision.elf +cp ./BUILD/NICLA_VISION/GCC_ARM-CUSTOM/mcuboot_nicla_vision.bin ./release/NICLA_VISION/mcuboot_nicla_vision.bin +cp ./BUILD/NICLA_VISION/GCC_ARM-CUSTOM/mcuboot_nicla_vision_application.elf ./release/NICLA_VISION/mcuboot_nicla_vision.elf xxd -i ./release/NICLA_VISION/mcuboot_nicla_vision.bin > ./release/NICLA_VISION/mcuboot_nicla_vision.h sed -i "s/unsigned char __release_NICLA_VISION_mcuboot_nicla_vision_bin/const unsigned char mcuboot_nicla_vision_bin/" ./release/NICLA_VISION/mcuboot_nicla_vision.h sed -i "s/__release_NICLA_VISION_mcuboot_nicla_vision_bin_len/mcuboot_nicla_vision_bin_len/" ./release/NICLA_VISION/mcuboot_nicla_vision.h