diff --git a/generate_rel.sh b/generate_rel.sh index 2c96c95..f724d20 100755 --- a/generate_rel.sh +++ b/generate_rel.sh @@ -2,63 +2,68 @@ 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 + +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" -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=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 +tar -czvf ./release/PORTENTA_H7.tar.gz -C ./release/ PORTENTA_H7 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=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 +tar -czvf ./release/PORTENTA_H7_Lite.tar.gz -C ./release/ PORTENTA_H7_Lite 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=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 +tar -czvf ./release/PORTENTA_H7_Lite_Connected.tar.gz -C ./release/ PORTENTA_H7_Lite_Connected 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=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 +tar -czvf ./release/NICLA_VISION.tar.gz -C ./release/ NICLA_VISION fi diff --git a/mbed_app.json b/mbed_app.json index 01d3766..c8010ab 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,46 @@ "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", + "BOARD_HAS_VIDEO=0", + "BOARD_HAS_ETHERNET=0" + ], + "target.components_remove" : [ + "WHD", + "4343W_FS", + "CYW43XXX", + "SE050" + ], + "mcuboot.application-sdcard": null } } } diff --git a/mbed_app_bootutil.json b/mbed_app_bootutil.json index 6acff71..2e6dc20 100644 --- a/mbed_app_bootutil.json +++ b/mbed_app_bootutil.json @@ -1,6 +1,26 @@ { - "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\"", + "BOOTUTIL_LIBARY_BUILD=1" + ], "config": { "serial-bootloader-enable": { "help": "Build bootloader with serial update support", @@ -11,19 +31,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 +71,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 +86,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 } } } diff --git a/mbed_app_nicla_vision.json b/mbed_app_nicla_vision.json new file mode 100644 index 0000000..7de48c6 --- /dev/null +++ b/mbed_app_nicla_vision.json @@ -0,0 +1,101 @@ +{ + "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", + "BOARD_RAM_SIZE=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 + } + } +}