Skip to content

Commit 29184e9

Browse files
facchinmpennam
authored andcommitted
Enable M4 on all STM32H747 boards as menu
1 parent 1866209 commit 29184e9

13 files changed

+202
-119
lines changed

boards.txt

+169-110
Large diffs are not rendered by default.

giga.variables

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export FLAVOUR="giga"
22
export VARIANTS=("GIGA PORTENTA_H7_M4")
3-
export FQBNS=("giga envie_m4")
3+
export FQBNS=("giga")
44
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")
55
export BOOTLOADERS=("GIGA")

nicla.variables

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export FLAVOUR="nicla"
2-
export VARIANTS=("NICLA NICLA_VISION")
2+
export VARIANTS=("NICLA NICLA_VISION PORTENTA_H7_M4")
33
export FQBNS=("nicla_sense nicla_voice nicla_vision")
44
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")
55
export BOOTLOADERS=("NICLA NICLA_VISION NICLA_VOICE")

opta.variables

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export FLAVOUR="opta"
2-
export VARIANTS=("OPTA")
2+
export VARIANTS=("OPTA PORTENTA_H7_M4")
33
export FQBNS=("opta")
44
export LIBRARIES=("Ethernet SPI WiFi openamp_arduino ThreadDebug KernelDebug RPC USBHID Wire rpclib USBHOST mbed-memory-status Scheduler USBMSD SocketWrapper STM32H747_System MRI")
55
export BOOTLOADERS=("OPTA")

portenta.variables

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export FLAVOUR="portenta"
22
export VARIANTS=("PORTENTA_H7_M7 PORTENTA_H7_M4 PORTENTA_X8")
3-
export FQBNS=("envie_m7 envie_m4 portenta_x8")
3+
export FQBNS=("envie_m7 portenta_x8")
44
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")
55
export BOOTLOADERS=("PORTENTA_H7")

variants/GIGA/pins_arduino.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ extern "C" bool isBetaBoard();
1212

1313
// Booting
1414
// ----
15-
#define bootM4() LL_RCC_ForceCM4Boot() // Provide a memorable alias
15+
void bootM4();
1616

1717
extern PinName digitalPinToPinName(pin_size_t P);
1818

variants/GIGA/variant.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -206,4 +206,12 @@ void _ontouch1200bps_() {
206206
NVIC_SystemReset();
207207
}
208208

209+
#include "stm32h7xx_ll_system.h"
210+
211+
void bootM4() {
212+
// Classic boot, just set the address and we are ready to go
213+
LL_SYSCFG_SetCM4BootAddress0(CM4_BINARY_START >> 16);
214+
LL_RCC_ForceCM4Boot();
215+
}
216+
209217
#endif

variants/NICLA_VISION/pins_arduino.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ extern "C" bool isBetaBoard();
1212

1313
// Booting
1414
// ----
15-
#define bootM4() LL_RCC_ForceCM4Boot() // Provide a memorable alias
15+
void bootM4();
1616

1717
extern PinName digitalPinToPinName(pin_size_t P);
1818

variants/NICLA_VISION/variant.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -264,4 +264,12 @@ void _ontouch1200bps_() {
264264
NVIC_SystemReset();
265265
}
266266

267+
#include "stm32h7xx_ll_system.h"
268+
269+
void bootM4() {
270+
// Classic boot, just set the address and we are ready to go
271+
LL_SYSCFG_SetCM4BootAddress0(CM4_BINARY_START >> 16);
272+
LL_RCC_ForceCM4Boot();
273+
}
274+
267275
#endif

variants/OPTA/variant.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -375,4 +375,12 @@ void _ontouch1200bps_() {
375375
NVIC_SystemReset();
376376
}
377377

378+
#include "stm32h7xx_ll_system.h"
379+
380+
void bootM4() {
381+
// Classic boot, just set the address and we are ready to go
382+
LL_SYSCFG_SetCM4BootAddress0(CM4_BINARY_START >> 16);
383+
LL_RCC_ForceCM4Boot();
384+
}
385+
378386
#endif

variants/PORTENTA_H7_M4/pins_arduino.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#elif defined(OPTA_PINS)
44
#include "../OPTA/pins_arduino.h"
55
#elif defined(NVISION_PINS)
6-
#include "../NICLA_VSION/pins_arduino.h"
6+
#include "../NICLA_VISION/pins_arduino.h"
77
#elif defined(GIGA_PINS)
88
#include "../GIGA/pins_arduino.h"
99
#endif

variants/PORTENTA_H7_M4/variant.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#elif defined(OPTA_PINS)
66
#include "../OPTA/variant.cpp"
77
#elif defined(NVISION_PINS)
8-
#include "../NICLA_VSION/variant.cpp"
8+
#include "../NICLA_VISION/variant.cpp"
99
#elif defined(GIGA_PINS)
1010
#include "../GIGA/variant.cpp"
1111
#endif

variants/PORTENTA_X8/pins_arduino.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ extern "C" bool isBetaBoard();
1212

1313
// Booting
1414
// ----
15-
void bootM4();
15+
// void bootM4();
1616

1717
extern PinName digitalPinToPinName(pin_size_t P);
1818

0 commit comments

Comments
 (0)