From 29184e93ae0ef4d03b3e0bcca74caaa52b4182eb Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Thu, 23 Feb 2023 12:31:45 +0100 Subject: [PATCH] Enable M4 on all STM32H747 boards as menu --- boards.txt | 279 +++++++++++++++---------- giga.variables | 2 +- nicla.variables | 2 +- opta.variables | 2 +- portenta.variables | 2 +- variants/GIGA/pins_arduino.h | 2 +- variants/GIGA/variant.cpp | 8 + variants/NICLA_VISION/pins_arduino.h | 2 +- variants/NICLA_VISION/variant.cpp | 8 + variants/OPTA/variant.cpp | 8 + variants/PORTENTA_H7_M4/pins_arduino.h | 2 +- variants/PORTENTA_H7_M4/variant.cpp | 2 +- variants/PORTENTA_X8/pins_arduino.h | 2 +- 13 files changed, 202 insertions(+), 119 deletions(-) diff --git a/boards.txt b/boards.txt index d77631d3b..112e3f502 100644 --- a/boards.txt +++ b/boards.txt @@ -50,14 +50,17 @@ edge_control.bootloader.file=EDGE_CONTROL/bootloader.hex ############################################################## menu.split=Flash split -menu.target_board=Target board +menu.target_core=Target core menu.security=Security setting -envie_m7.name=Arduino Portenta H7 (M7 core) +envie_m7.name=Arduino Portenta H7 envie_m7.build.core=arduino envie_m7.build.crossprefix=arm-none-eabi- envie_m7.build.compiler_path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ +envie_m7.menu.target_core.cm7=Main Core +envie_m7.menu.target_core.cm4=M4 Co-processor + envie_m7.menu.split.50_50=1MB M7 + 1MB M4 envie_m7.menu.split.75_25=1.5MB M7 + 0.5MB M4 envie_m7.menu.split.100_0=2MB M7 + M4 in SDRAM @@ -65,16 +68,24 @@ envie_m7.menu.split.100_0=2MB M7 + M4 in SDRAM envie_m7.menu.security.none=None envie_m7.menu.security.sien=Signature + Encryption -envie_m7.build.variant=PORTENTA_H7_M7 -envie_m7.build.mcu=cortex-m7 -envie_m7.build.fpu=-mfpu=fpv5-d16 +envie_m7.menu.target_core.cm7.build.variant=PORTENTA_H7_M7 +envie_m7.menu.target_core.cm7.build.mcu=cortex-m7 +envie_m7.menu.target_core.cm7.build.fpu=-mfpu=fpv5-d16 +envie_m7.menu.target_core.cm7.build.architecture=cortex-m7 +envie_m7.menu.target_core.cm7.compiler.mbed.arch.define= + +envie_m7.menu.target_core.cm4.build.variant=PORTENTA_H7_M4 +envie_m7.menu.target_core.cm4.build.mcu=cortex-m4 +envie_m7.menu.target_core.cm4.build.fpu=-mfpu=fpv4-sp-d16 +envie_m7.menu.target_core.cm4.build.architecture=cortex-m4 +envie_m7.menu.target_core.cm4.compiler.mbed.arch.define=-DPORTENTA_H7_PINS + envie_m7.build.float-abi=-mfloat-abi=softfp envie_m7.build.extra_flags= -envie_m7.menu.split.50_50.build.extra_ldflags=-DCM4_BINARY_START=0x08100000 -envie_m7.menu.split.75_25.build.extra_ldflags=-DCM4_BINARY_START=0x08180000 -envie_m7.menu.split.100_0.build.extra_ldflags=-DCM4_BINARY_START=0x60000000 -envie_m7.build.architecture=cortex-m7 -envie_m7.build.board=PORTENTA_H7_M7 +envie_m7.menu.split.50_50.build.extra_ldflags=-DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000 +envie_m7.menu.split.75_25.build.extra_ldflags=-DCM4_BINARY_START=0x08180000 -DCM4_BINARY_END=0x08200000 +envie_m7.menu.split.100_0.build.extra_ldflags=-DCM4_BINARY_START=0x60000000 -DCM4_BINARY_END=0x60040000 -DCM4_RAM_END=0x60080000 +envie_m7.build.board={build.variant} envie_m7.build.ldscript=linker_script.ld envie_m7.build.slot_size=0x1E0000 envie_m7.build.header_size=0x20000 @@ -84,7 +95,6 @@ envie_m7.menu.security.sien.recipe.hooks.objcopy.postobjcopy.1.pattern="{tools.i envie_m7.menu.security.sien.build.keys.keychain={runtime.platform.path}/libraries/MCUboot/default_keys envie_m7.menu.security.sien.build.keys.sign_key=ecdsa-p256-signing-priv-key.pem envie_m7.menu.security.sien.build.keys.encrypt_key=ecdsa-p256-encrypt-pub-key.pem -envie_m7.compiler.mbed.arch.define= envie_m7.compiler.mbed.defines={build.variant.path}/defines.txt envie_m7.compiler.mbed.ldflags={build.variant.path}/ldflags.txt envie_m7.compiler.mbed.cflags={build.variant.path}/cflags.txt @@ -115,17 +125,32 @@ envie_m7.upload.protocol= envie_m7.upload.transport= envie_m7.upload.vid=0x2341 envie_m7.upload.pid=0x035b -envie_m7.menu.security.none.upload.interface=0 -envie_m7.menu.security.sien.upload.interface=2 -envie_m7.menu.security.none.upload.address=0x08040000 -envie_m7.menu.security.sien.upload.address=0xA0000000 + envie_m7.upload.use_1200bps_touch=true envie_m7.upload.wait_for_upload_port=true envie_m7.upload.native_usb=true -envie_m7.menu.split.50_50.upload.maximum_size=786432 -envie_m7.menu.split.75_25.upload.maximum_size=1441792 -envie_m7.menu.split.100_0.upload.maximum_size=1966080 -envie_m7.upload.maximum_data_size=523624 + +envie_m7.menu.security.none.upload.interface=0 +envie_m7.menu.security.sien.upload.interface=2 + +envie_m7.menu.security.none.upload.address_m7=0x08040000 +envie_m7.menu.security.sien.upload.address_m7=0xA0000000 +envie_m7.menu.target_core.cm7.upload.address={upload.address_m7} + +envie_m7.menu.target_core.cm7.menu.split.50_50.upload.maximum_size=786432 +envie_m7.menu.target_core.cm7.menu.split.75_25.upload.maximum_size=1441792 +envie_m7.menu.target_core.cm7.menu.split.100_0.upload.maximum_size=1966080 +envie_m7.menu.target_core.cm7.upload.maximum_data_size=523624 + +envie_m7.menu.split.50_50.upload.address_m4=0x08100000 +envie_m7.menu.split.75_25.upload.address_m4=0x08180000 +#make loading the M4 in this way fail - the user needs to provide a file via mass storage or similar interfaces +envie_m7.menu.split.100_0.upload.address_m4= +envie_m7.menu.target_core.cm4.upload.address={upload.address_m4} +envie_m7.menu.target_core.cm4.menu.split.50_50.upload.maximum_size=1048576 +envie_m7.menu.target_core.cm4.menu.split.75_25.upload.maximum_size=524288 +envie_m7.menu.target_core.cm4.menu.split.100_0.upload.maximum_size=524288 +envie_m7.menu.target_core.cm4.upload.maximum_data_size=294248 envie_m7.debug.tool=gdb envie_m7.bootloader.tool=openocd @@ -146,79 +171,6 @@ envie_m7_thread_debug.build.board=PORTENTA_H7_M7 ############################################################## -envie_m4.name=STM32H747 M4 coprocessor -envie_m4.build.core=arduino -envie_m4.build.crossprefix=arm-none-eabi- -envie_m4.build.compiler_path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ - -envie_m4.menu.split.50_50=1MB M7 + 1MB M4 -envie_m4.menu.split.75_25=1.5MB M7 + 0.5MB M4 -envie_m4.menu.split.100_0=2MB M7 + M4 in SDRAM - -envie_m4.menu.target_board.portenta=Portenta H7 -envie_m4.menu.target_board.portenta.compiler.mbed.arch.define=-DPORTENTA_H7_PINS -envie_m4.menu.target_board.opta=Opta -envie_m4.menu.target_board.opta.compiler.mbed.arch.define=-DOPTA_PINS -envie_m4.menu.target_board.nvision=Nicla Vision -envie_m4.menu.target_board.nvision.compiler.mbed.arch.define=-DNVISION_PINS -envie_m4.menu.target_board.giga=Giga -envie_m4.menu.target_board.giga.compiler.mbed.arch.define=-DGIGA_PINS - -envie_m4.build.variant=PORTENTA_H7_M4 -envie_m4.build.mcu=cortex-m4 -envie_m4.build.fpu=-mfpu=fpv4-sp-d16 -envie_m4.build.float-abi=-mfloat-abi=softfp -envie_m4.build.extra_flags= -envie_m4.menu.split.50_50.build.extra_ldflags=-DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000 -envie_m4.menu.split.75_25.build.extra_ldflags=-DCM4_BINARY_START=0x08180000 -DCM4_BINARY_END=0x08200000 -envie_m4.menu.split.100_0.build.extra_ldflags=-DCM4_BINARY_START=0x60000000 -DCM4_BINARY_END=0x60040000 -DCM4_RAM_END=0x60080000 -envie_m4.build.architecture=cortex-m4 -envie_m4.build.board=PORTENTA_H7_M4 -envie_m4.build.ldscript=linker_script.ld -#envie_m4.compiler.mbed.arch.define= -envie_m4.compiler.mbed.defines={build.variant.path}/defines.txt -envie_m4.compiler.mbed.ldflags={build.variant.path}/ldflags.txt -envie_m4.compiler.mbed.cflags={build.variant.path}/cflags.txt -envie_m4.compiler.mbed.cxxflags={build.variant.path}/cxxflags.txt -envie_m4.compiler.mbed.includes={build.variant.path}/includes.txt -envie_m4.compiler.mbed.extra_ldflags=-lstdc++ -lsupc++ -lm -lc -lgcc -lnosys -envie_m4.compiler.mbed="{build.variant.path}/libs/libmbed.a" -envie_m4.vid.0=0x2341 -envie_m4.pid.0=0x005b -envie_m4.build.vid=0x2341 -envie_m4.build.pid=0x005b -envie_m4.upload_port.0.vid=0x2341 -envie_m4.upload_port.0.pid=0x005b - -envie_m4.upload.tool=dfu-util -envie_m4.upload.tool.default=dfu-util -envie_m4.upload.vid=0x2341 -envie_m4.upload.pid=0x035b -envie_m4.upload.protocol= -envie_m4.upload.transport= -envie_m4.upload.interface=0 -envie_m4.upload.use_1200bps_touch=true -envie_m4.upload.wait_for_upload_port=true -envie_m4.upload.native_usb=true -envie_m4.menu.split.50_50.upload.address=0x08100000 -envie_m4.menu.split.75_25.upload.address=0x08180000 -#make loading the M4 in this way fail - the user needs to provide a file via mass storage or similar interfaces -envie_m4.menu.split.100_0.upload.address= -envie_m4.menu.split.50_50.upload.maximum_size=1048576 -envie_m4.menu.split.75_25.upload.maximum_size=524288 -envie_m4.menu.split.100_0.upload.maximum_size=524288 -envie_m4.upload.maximum_data_size=294248 - -envie_m4.debug.tool=gdb -envie_m4.bootloader.tool=openocd -envie_m4.bootloader.tool.default=openocd -envie_m4.bootloader.config=-f target/stm32h7x_dual_bank.cfg -envie_m4.bootloader.programmer=-f interface/stlink.cfg -envie_m4.bootloader.extra_action.preflash=stm32h7x option_write 0 0x01c 0xb86aaf0 -envie_m4.bootloader.file= - -############################################################## - portenta_x8.name=Arduino Portenta X8 portenta_x8.build.core=arduino portenta_x8.build.crossprefix=arm-none-eabi- @@ -527,15 +479,33 @@ nicla_vision.build.core=arduino nicla_vision.build.crossprefix=arm-none-eabi- nicla_vision.build.compiler_path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ -nicla_vision.build.variant=NICLA_VISION -nicla_vision.build.mcu=cortex-m7 -nicla_vision.build.fpu=-mfpu=fpv5-d16 +nicla_vision.menu.target_core.cm7=Main Core +nicla_vision.menu.target_core.cm4=M4 Co-processor + +nicla_vision.menu.split.100_0=2MB M7 +nicla_vision.menu.split.75_25=1.5MB M7 + 0.5MB M4 +nicla_vision.menu.split.50_50=1MB M7 + 1MB M4 + +nicla_vision.menu.target_core.cm7.build.variant=NICLA_VISION +nicla_vision.menu.target_core.cm7.build.mcu=cortex-m7 +nicla_vision.menu.target_core.cm7.build.fpu=-mfpu=fpv5-d16 +nicla_vision.menu.target_core.cm7.build.architecture=cortex-m7 +nicla_vision.menu.target_core.cm7.compiler.mbed.arch.define= + +nicla_vision.menu.target_core.cm4.build.variant=PORTENTA_H7_M4 +nicla_vision.menu.target_core.cm4.build.mcu=cortex-m4 +nicla_vision.menu.target_core.cm4.build.fpu=-mfpu=fpv4-sp-d16 +nicla_vision.menu.target_core.cm4.build.architecture=cortex-m4 +nicla_vision.menu.target_core.cm4.compiler.mbed.arch.define=-DNVISION_PINS + +nicla_vision.menu.split.50_50.build.extra_ldflags=-DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000 +nicla_vision.menu.split.75_25.build.extra_ldflags=-DCM4_BINARY_START=0x08180000 -DCM4_BINARY_END=0x08200000 +nicla_vision.menu.split.100_0.build.extra_ldflags=-DCM4_BINARY_START=0x60000000 -DCM4_BINARY_END=0x60040000 -DCM4_RAM_END=0x60080000 +nicla_vision.build.board={build.variant} + nicla_vision.build.float-abi=-mfloat-abi=softfp nicla_vision.build.extra_flags= -nicla_vision.build.architecture=cortex-m7 -nicla_vision.build.board=NICLA_VISION nicla_vision.build.ldscript=linker_script.ld -nicla_vision.compiler.mbed.arch.define= nicla_vision.compiler.mbed.defines={build.variant.path}/defines.txt nicla_vision.compiler.mbed.ldflags={build.variant.path}/ldflags.txt nicla_vision.compiler.mbed.cflags={build.variant.path}/cflags.txt @@ -566,7 +536,6 @@ nicla_vision.upload.protocol= nicla_vision.upload.transport= nicla_vision.upload.vid=0x2341 nicla_vision.upload.pid=0x035f -nicla_vision.upload.address=0x08040000 nicla_vision.upload.interface=0 nicla_vision.upload.use_1200bps_touch=true nicla_vision.upload.wait_for_upload_port=true @@ -574,6 +543,23 @@ nicla_vision.upload.native_usb=true nicla_vision.upload.maximum_size=1966080 nicla_vision.upload.maximum_data_size=523624 +nicla_vision.menu.target_core.cm7.upload.address=0x08040000 + +nicla_vision.menu.target_core.cm7.menu.split.50_50.upload.maximum_size=786432 +nicla_vision.menu.target_core.cm7.menu.split.75_25.upload.maximum_size=1441792 +nicla_vision.menu.target_core.cm7.menu.split.100_0.upload.maximum_size=1966080 +nicla_vision.menu.target_core.cm7.upload.maximum_data_size=523624 + +nicla_vision.menu.split.50_50.upload.address_m4=0x08100000 +nicla_vision.menu.split.75_25.upload.address_m4=0x08180000 +#make loading the M4 in this way fail - the user needs to provide a file via mass storage or similar interfaces +nicla_vision.menu.split.100_0.upload.address_m4= +nicla_vision.menu.target_core.cm4.upload.address={upload.address_m4} +nicla_vision.menu.target_core.cm4.menu.split.50_50.upload.maximum_size=1048576 +nicla_vision.menu.target_core.cm4.menu.split.75_25.upload.maximum_size=524288 +nicla_vision.menu.target_core.cm4.menu.split.100_0.upload.maximum_size=524288 +nicla_vision.menu.target_core.cm4.upload.maximum_data_size=294248 + nicla_vision.debug.tool=gdb nicla_vision.bootloader.tool=openocd nicla_vision.bootloader.config=-f target/stm32h7x_dual_bank.cfg @@ -588,13 +574,32 @@ opta.build.core=arduino opta.build.crossprefix=arm-none-eabi- opta.build.compiler_path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ -opta.build.variant=OPTA -opta.build.mcu=cortex-m7 -opta.build.fpu=-mfpu=fpv5-d16 -opta.build.float-abi=-mfloat-abi=softfp +opta.menu.target_core.cm7=Main Core +opta.menu.target_core.cm4=M4 Co-processor + +opta.menu.split.100_0=2MB M7 +opta.menu.split.75_25=1.5MB M7 + 0.5MB M4 +opta.menu.split.50_50=1MB M7 + 1MB M4 + +opta.menu.target_core.cm7.build.variant=OPTA +opta.menu.target_core.cm7.build.mcu=cortex-m7 +opta.menu.target_core.cm7.build.fpu=-mfpu=fpv5-d16 +opta.menu.target_core.cm7.build.architecture=cortex-m7 +opta.menu.target_core.cm7.compiler.mbed.arch.define= + +opta.menu.target_core.cm4.build.variant=PORTENTA_H7_M4 +opta.menu.target_core.cm4.build.mcu=cortex-m4 +opta.menu.target_core.cm4.build.fpu=-mfpu=fpv4-sp-d16 +opta.menu.target_core.cm4.build.architecture=cortex-m4 +opta.menu.target_core.cm4.compiler.mbed.arch.define=-DOPTA_PINS + +opta.menu.split.50_50.build.extra_ldflags=-DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000 +opta.menu.split.75_25.build.extra_ldflags=-DCM4_BINARY_START=0x08180000 -DCM4_BINARY_END=0x08200000 +opta.menu.split.100_0.build.extra_ldflags=-DCM4_BINARY_START=0x60000000 -DCM4_BINARY_END=0x60040000 -DCM4_RAM_END=0x60080000 +opta.build.board={build.variant} + opta.build.extra_flags= -opta.build.architecture=cortex-m7 -opta.build.board=OPTA +opta.build.float-abi=-mfloat-abi=softfp opta.build.ldscript=linker_script.ld opta.compiler.mbed.arch.define= opta.compiler.mbed.defines={build.variant.path}/defines.txt @@ -651,6 +656,23 @@ opta.upload.native_usb=true opta.upload.maximum_size=786432 opta.upload.maximum_data_size=523624 +opta.menu.target_core.cm7.upload.address=0x08040000 + +opta.menu.target_core.cm7.menu.split.50_50.upload.maximum_size=786432 +opta.menu.target_core.cm7.menu.split.75_25.upload.maximum_size=1441792 +opta.menu.target_core.cm7.menu.split.100_0.upload.maximum_size=1966080 +opta.menu.target_core.cm7.upload.maximum_data_size=523624 + +opta.menu.split.50_50.upload.address_m4=0x08100000 +opta.menu.split.75_25.upload.address_m4=0x08180000 +#make loading the M4 in this way fail - the user needs to provide a file via mass storage or similar interfaces +opta.menu.split.100_0.upload.address_m4= +opta.menu.target_core.cm4.upload.address={upload.address_m4} +opta.menu.target_core.cm4.menu.split.50_50.upload.maximum_size=1048576 +opta.menu.target_core.cm4.menu.split.75_25.upload.maximum_size=524288 +opta.menu.target_core.cm4.menu.split.100_0.upload.maximum_size=524288 +opta.menu.target_core.cm4.upload.maximum_data_size=294248 + opta.debug.tool=gdb opta.bootloader.tool=openocd opta.bootloader.config=-f target/stm32h7x_dual_bank.cfg @@ -660,14 +682,35 @@ opta.bootloader.file=OPTA/bootloader.elf ############################################################## -giga.name=Arduino Giga +giga.name=Arduino Giga R1 giga.build.core=arduino giga.build.crossprefix=arm-none-eabi- giga.build.compiler_path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/ -giga.build.variant=GIGA -giga.build.mcu=cortex-m7 -giga.build.fpu=-mfpu=fpv5-d16 +giga.menu.target_core.cm7=Main Core +giga.menu.target_core.cm4=M4 Co-processor + +giga.menu.split.100_0=2MB M7 + M4 in SDRAM +giga.menu.split.75_25=1.5MB M7 + 0.5MB M4 +giga.menu.split.50_50=1MB M7 + 1MB M4 + +giga.menu.target_core.cm7.build.variant=GIGA +giga.menu.target_core.cm7.build.mcu=cortex-m7 +giga.menu.target_core.cm7.build.fpu=-mfpu=fpv5-d16 +giga.menu.target_core.cm7.build.architecture=cortex-m7 +giga.menu.target_core.cm7.compiler.mbed.arch.define= + +giga.menu.target_core.cm4.build.variant=PORTENTA_H7_M4 +giga.menu.target_core.cm4.build.mcu=cortex-m4 +giga.menu.target_core.cm4.build.fpu=-mfpu=fpv4-sp-d16 +giga.menu.target_core.cm4.build.architecture=cortex-m4 +giga.menu.target_core.cm4.compiler.mbed.arch.define=-DGIGA_PINS + +giga.menu.split.50_50.build.extra_ldflags=-DCM4_BINARY_START=0x08100000 -DCM4_BINARY_END=0x08200000 +giga.menu.split.75_25.build.extra_ldflags=-DCM4_BINARY_START=0x08180000 -DCM4_BINARY_END=0x08200000 +giga.menu.split.100_0.build.extra_ldflags=-DCM4_BINARY_START=0x60000000 -DCM4_BINARY_END=0x60040000 -DCM4_RAM_END=0x60080000 +giga.build.board={build.variant} + giga.build.float-abi=-mfloat-abi=softfp giga.build.extra_flags= giga.build.postbuild.cmd="{tools.imgtool.path}/{tools.imgtool.cmd}" exit @@ -702,7 +745,6 @@ giga.upload.protocol= giga.upload.transport= giga.upload.vid=0x2341 giga.upload.pid=0x0366 -giga.upload.address=0x08040000 giga.upload.interface=0 giga.upload.use_1200bps_touch=true giga.upload.wait_for_upload_port=true @@ -710,6 +752,23 @@ giga.upload.native_usb=true giga.upload.maximum_size=1966080 giga.upload.maximum_data_size=523624 +giga.menu.target_core.cm7.upload.address=0x08040000 + +giga.menu.target_core.cm7.menu.split.50_50.upload.maximum_size=786432 +giga.menu.target_core.cm7.menu.split.75_25.upload.maximum_size=1441792 +giga.menu.target_core.cm7.menu.split.100_0.upload.maximum_size=1966080 +giga.menu.target_core.cm7.upload.maximum_data_size=523624 + +giga.menu.split.50_50.upload.address_m4=0x08100000 +giga.menu.split.75_25.upload.address_m4=0x08180000 +#make loading the M4 in this way fail - the user needs to provide a file via mass storage or similar interfaces +giga.menu.split.100_0.upload.address_m4= +giga.menu.target_core.cm4.upload.address={upload.address_m4} +giga.menu.target_core.cm4.menu.split.50_50.upload.maximum_size=1048576 +giga.menu.target_core.cm4.menu.split.75_25.upload.maximum_size=524288 +giga.menu.target_core.cm4.menu.split.100_0.upload.maximum_size=524288 +giga.menu.target_core.cm4.upload.maximum_data_size=294248 + giga.debug.tool=gdb giga.bootloader.tool=openocd giga.bootloader.config=-f target/stm32h7x_dual_bank.cfg diff --git a/giga.variables b/giga.variables index b6d2c1a6e..c3d7ea373 100644 --- a/giga.variables +++ b/giga.variables @@ -1,5 +1,5 @@ export FLAVOUR="giga" export VARIANTS=("GIGA PORTENTA_H7_M4") -export FQBNS=("giga envie_m4") +export FQBNS=("giga") export LIBRARIES=("MRI Portenta_SDRAM SPI WiFi ea_malloc openamp_arduino STM32H747_System ThreadDebug Himax_HM01B0 PDM Portenta_Video USBAudio KernelDebug Portenta_Audio RPC USBHID Wire Portenta_lvgl Camera rpclib OV7670 mbed-memory-status Scheduler USBMSD SocketWrapper MCUboot") export BOOTLOADERS=("GIGA") diff --git a/nicla.variables b/nicla.variables index 740f48f47..3952028a8 100644 --- a/nicla.variables +++ b/nicla.variables @@ -1,5 +1,5 @@ export FLAVOUR="nicla" -export VARIANTS=("NICLA NICLA_VISION") +export VARIANTS=("NICLA NICLA_VISION PORTENTA_H7_M4") export FQBNS=("nicla_sense nicla_voice nicla_vision") export LIBRARIES=("SPI Wire Scheduler Nicla_System WiFi ea_malloc openamp_arduino STM32H747_System ThreadDebug GC2145 Himax_HM01B0 PDM KernelDebug RPC USBHID Camera rpclib USBHOST mbed-memory-status USBMSD SocketWrapper MRI SE05X MLC NDP syntiant_ilib") export BOOTLOADERS=("NICLA NICLA_VISION NICLA_VOICE") diff --git a/opta.variables b/opta.variables index 9f5229413..593a7dd3b 100755 --- a/opta.variables +++ b/opta.variables @@ -1,5 +1,5 @@ export FLAVOUR="opta" -export VARIANTS=("OPTA") +export VARIANTS=("OPTA PORTENTA_H7_M4") export FQBNS=("opta") export LIBRARIES=("Ethernet SPI WiFi openamp_arduino ThreadDebug KernelDebug RPC USBHID Wire rpclib USBHOST mbed-memory-status Scheduler USBMSD SocketWrapper STM32H747_System MRI") export BOOTLOADERS=("OPTA") diff --git a/portenta.variables b/portenta.variables index a8c3df4ba..ed2e0973f 100644 --- a/portenta.variables +++ b/portenta.variables @@ -1,5 +1,5 @@ export FLAVOUR="portenta" export VARIANTS=("PORTENTA_H7_M7 PORTENTA_H7_M4 PORTENTA_X8") -export FQBNS=("envie_m7 envie_m4 portenta_x8") +export FQBNS=("envie_m7 portenta_x8") export LIBRARIES=("doom Ethernet MRI Portenta_SDRAM SPI WiFi ea_malloc openamp_arduino STM32H747_System ThreadDebug Himax_HM01B0 Himax_HM0360 PDM Portenta_Video USBAudio KernelDebug Portenta_Audio RPC USBHID Wire Portenta_lvgl Camera rpclib USBHOST mbed-memory-status Portenta_SDCARD Scheduler USBMSD SocketWrapper GSM GPS MCUboot") export BOOTLOADERS=("PORTENTA_H7") diff --git a/variants/GIGA/pins_arduino.h b/variants/GIGA/pins_arduino.h index 96b75e277..e17d1190a 100644 --- a/variants/GIGA/pins_arduino.h +++ b/variants/GIGA/pins_arduino.h @@ -12,7 +12,7 @@ extern "C" bool isBetaBoard(); // Booting // ---- -#define bootM4() LL_RCC_ForceCM4Boot() // Provide a memorable alias +void bootM4(); extern PinName digitalPinToPinName(pin_size_t P); diff --git a/variants/GIGA/variant.cpp b/variants/GIGA/variant.cpp index 9bbcef6be..f2c9836d5 100644 --- a/variants/GIGA/variant.cpp +++ b/variants/GIGA/variant.cpp @@ -206,4 +206,12 @@ void _ontouch1200bps_() { NVIC_SystemReset(); } +#include "stm32h7xx_ll_system.h" + +void bootM4() { + // Classic boot, just set the address and we are ready to go + LL_SYSCFG_SetCM4BootAddress0(CM4_BINARY_START >> 16); + LL_RCC_ForceCM4Boot(); +} + #endif diff --git a/variants/NICLA_VISION/pins_arduino.h b/variants/NICLA_VISION/pins_arduino.h index d5684bbf1..8046d39a1 100644 --- a/variants/NICLA_VISION/pins_arduino.h +++ b/variants/NICLA_VISION/pins_arduino.h @@ -12,7 +12,7 @@ extern "C" bool isBetaBoard(); // Booting // ---- -#define bootM4() LL_RCC_ForceCM4Boot() // Provide a memorable alias +void bootM4(); extern PinName digitalPinToPinName(pin_size_t P); diff --git a/variants/NICLA_VISION/variant.cpp b/variants/NICLA_VISION/variant.cpp index a63351afc..130ff5564 100644 --- a/variants/NICLA_VISION/variant.cpp +++ b/variants/NICLA_VISION/variant.cpp @@ -264,4 +264,12 @@ void _ontouch1200bps_() { NVIC_SystemReset(); } +#include "stm32h7xx_ll_system.h" + +void bootM4() { + // Classic boot, just set the address and we are ready to go + LL_SYSCFG_SetCM4BootAddress0(CM4_BINARY_START >> 16); + LL_RCC_ForceCM4Boot(); +} + #endif diff --git a/variants/OPTA/variant.cpp b/variants/OPTA/variant.cpp index 73e75951c..3b68f64ec 100644 --- a/variants/OPTA/variant.cpp +++ b/variants/OPTA/variant.cpp @@ -375,4 +375,12 @@ void _ontouch1200bps_() { NVIC_SystemReset(); } +#include "stm32h7xx_ll_system.h" + +void bootM4() { + // Classic boot, just set the address and we are ready to go + LL_SYSCFG_SetCM4BootAddress0(CM4_BINARY_START >> 16); + LL_RCC_ForceCM4Boot(); +} + #endif diff --git a/variants/PORTENTA_H7_M4/pins_arduino.h b/variants/PORTENTA_H7_M4/pins_arduino.h index 77f7a87dc..e54178535 100644 --- a/variants/PORTENTA_H7_M4/pins_arduino.h +++ b/variants/PORTENTA_H7_M4/pins_arduino.h @@ -3,7 +3,7 @@ #elif defined(OPTA_PINS) #include "../OPTA/pins_arduino.h" #elif defined(NVISION_PINS) -#include "../NICLA_VSION/pins_arduino.h" +#include "../NICLA_VISION/pins_arduino.h" #elif defined(GIGA_PINS) #include "../GIGA/pins_arduino.h" #endif diff --git a/variants/PORTENTA_H7_M4/variant.cpp b/variants/PORTENTA_H7_M4/variant.cpp index 7aaa14fd7..c949632aa 100644 --- a/variants/PORTENTA_H7_M4/variant.cpp +++ b/variants/PORTENTA_H7_M4/variant.cpp @@ -5,7 +5,7 @@ #elif defined(OPTA_PINS) #include "../OPTA/variant.cpp" #elif defined(NVISION_PINS) -#include "../NICLA_VSION/variant.cpp" +#include "../NICLA_VISION/variant.cpp" #elif defined(GIGA_PINS) #include "../GIGA/variant.cpp" #endif diff --git a/variants/PORTENTA_X8/pins_arduino.h b/variants/PORTENTA_X8/pins_arduino.h index 864aaa4ab..8a38f6190 100644 --- a/variants/PORTENTA_X8/pins_arduino.h +++ b/variants/PORTENTA_X8/pins_arduino.h @@ -12,7 +12,7 @@ extern "C" bool isBetaBoard(); // Booting // ---- -void bootM4(); +// void bootM4(); extern PinName digitalPinToPinName(pin_size_t P);