Skip to content

Commit

Permalink
Enable M4 on all STM32H747 boards as menu
Browse files Browse the repository at this point in the history
  • Loading branch information
facchinm authored and pennam committed Mar 1, 2023
1 parent 1866209 commit 29184e9
Show file tree
Hide file tree
Showing 13 changed files with 202 additions and 119 deletions.
279 changes: 169 additions & 110 deletions boards.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion giga.variables
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export FLAVOUR="giga"
export VARIANTS=("GIGA PORTENTA_H7_M4")
export FQBNS=("giga envie_m4")
export FQBNS=("giga")

This comment has been minimized.

Copy link
@aentinger

aentinger Mar 3, 2023

Contributor

Isn't this missing a PORTENTA_H7_M4? @facchinm @pennam

This comment has been minimized.

Copy link
@pennam

pennam Mar 3, 2023

Contributor

maybe i don't get the point 🤔 , but it looks correct to me:

GIGA variant is for the H7
PORTENTA_H7_M4 variant is for the M4

all in a single FQBN

This comment has been minimized.

Copy link
@aentinger

aentinger Mar 3, 2023

Contributor

I was actually starting to wonder about FQBN in contex of how to use arduino-cli to build a target application for the Giga/M4 core. How would I feed the variant name to arduino-cli?

This comment has been minimized.

Copy link
@pennam

pennam Mar 3, 2023

Contributor

never tried but i think you should use something like this:

arduino:mbed_giga:giga:target_core=cm4,split=100_0

This comment has been minimized.

Copy link
@pennam

pennam Mar 3, 2023

Contributor

⬆️ it works

This comment has been minimized.

Copy link
@aentinger

aentinger Mar 6, 2023

Contributor

I'm going to put this on a bumper sticker on my monitor 😁

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")
2 changes: 1 addition & 1 deletion nicla.variables
Original file line number Diff line number Diff line change
@@ -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")
2 changes: 1 addition & 1 deletion opta.variables
Original file line number Diff line number Diff line change
@@ -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")
2 changes: 1 addition & 1 deletion portenta.variables
Original file line number Diff line number Diff line change
@@ -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")
2 changes: 1 addition & 1 deletion variants/GIGA/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
8 changes: 8 additions & 0 deletions variants/GIGA/variant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion variants/NICLA_VISION/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
8 changes: 8 additions & 0 deletions variants/NICLA_VISION/variant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions variants/OPTA/variant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion variants/PORTENTA_H7_M4/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion variants/PORTENTA_H7_M4/variant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion variants/PORTENTA_X8/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extern "C" bool isBetaBoard();

// Booting
// ----
void bootM4();
// void bootM4();

extern PinName digitalPinToPinName(pin_size_t P);

Expand Down

0 comments on commit 29184e9

Please sign in to comment.