Skip to content

Commit 06a07b5

Browse files
Fix some build issues
1 parent 3900c30 commit 06a07b5

18 files changed

+48
-133
lines changed

Diff for: .idea/runConfigurations/GDB KernelDebug-example-KernelDebug ARDUINO_NANO33BLE_SWD Develop.xml

-11
This file was deleted.

Diff for: .idea/runConfigurations/GDB PDM-example-PDMSerialPlotter ARDUINO_NANO33BLE_SWD Develop.xml

-11
This file was deleted.

Diff for: .idea/runConfigurations/GDB Scheduler-example-MultipleBlinks ARDUINO_NANO33BLE_SWD Develop.xml

-11
This file was deleted.

Diff for: .idea/runConfigurations/GDB ThreadDebug-example-ThreadDebug ARDUINO_NANO33BLE_SWD Develop.xml

-11
This file was deleted.

Diff for: .idea/runConfigurations/GDB USBHID-example-Keyboard ARDUINO_NANO33BLE_SWD Develop.xml

-11
This file was deleted.

Diff for: .idea/runConfigurations/GDB USBHID-example-KeyboardModifiers ARDUINO_NANO33BLE_SWD Develop.xml

-11
This file was deleted.

Diff for: .idea/runConfigurations/GDB USBHID-example-KeyboardRaw ARDUINO_NANO33BLE_SWD Develop.xml

-11
This file was deleted.

Diff for: .idea/runConfigurations/GDB USBHID-example-Mouse ARDUINO_NANO33BLE_SWD Develop.xml

-11
This file was deleted.

Diff for: .idea/runConfigurations/GDB USBMIDI-example-Basic ARDUINO_NANO33BLE_SWD Develop.xml

-11
This file was deleted.

Diff for: .idea/runConfigurations/GDB USBMSD-example-AccessFlashAsUSBDisk ARDUINO_NANO33BLE_SWD Develop.xml

-11
This file was deleted.

Diff for: .idea/runConfigurations/GDB USBMSD-example-Nano33BLE_FlashMassStorage ARDUINO_NANO33BLE_SWD Develop.xml

-11
This file was deleted.

Diff for: GenerateArduinoIDEFlagTxtFiles.cmake

+7
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ foreach(INCLUDE_DIR ${SCANNED_INCLUDE_DIRS})
3939
# (so it starts with the first path component after mbed-os/)
4040
cmake_path(RELATIVE_PATH INCLUDE_DIR BASE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/mbed-os OUTPUT_VARIABLE REL_INCLUDE_DIR)
4141

42+
# There is a conflict between Mbed and Arduino both providing SPI.h
43+
# Remove this specific include path so that you must #include <drivers/SPI.h> to get the Mbed version
44+
# from the Arduino IDE.
45+
if(REL_INCLUDE_DIR STREQUAL "drivers/./include/drivers")
46+
continue()
47+
endif()
48+
4249
string(APPEND INCLUDES_TXT_CONTENTS "-iwithprefixbefore/mbed/${REL_INCLUDE_DIR}\n")
4350
endforeach()
4451
file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/includes.txt CONTENT ${INCLUDES_TXT_CONTENTS})

Diff for: libraries/CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,15 @@ if("ARDUINO_NICLA_SENSE_ME" IN_LIST MBED_TARGET_LABELS)
4343
endif()
4444

4545
if("STM32H747_ARDUINO" IN_LIST MBED_TARGET_LABELS)
46-
add_subdirectory(Portenta_SDRAM)
4746
add_subdirectory(STM32H747_System)
4847
endif()
4948

5049
if("ARDUINO_GIGA" IN_LIST MBED_TARGET_LABELS)
5150
add_subdirectory(MRI)
5251
add_subdirectory(ea_malloc)
5352
add_subdirectory(PDM)
53+
add_subdirectory(WiFi)
54+
add_subdirectory(Portenta_SDRAM)
5455
endif()
5556

5657
# Libraries for all targets

Diff for: libraries/STM32H747_System/CMakeLists.txt

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
set(STM32H747_SYSTEM_SOURCES
2-
src/STM32H747_System.cpp
3-
src/wiced_filesystem.cpp)
2+
src/STM32H747_System.cpp)
43

54
if(TARGET_ARDUINO_PORTENTA IN_LIST MBED_TARGET_LABELS)
65
list(APPEND STM32H747_SYSTEM_SOURCES
@@ -20,6 +19,15 @@ target_link_libraries(arduino-STM32H747_System PUBLIC
2019
mbed-wifi)
2120
target_include_directories(arduino-STM32H747_System PUBLIC src)
2221

23-
build_arduino_examples(STM32H747_System examples)
22+
# STM32H747_manageBootloader does not support Arduino Giga
23+
set(EXAMPLES_TO_SKIP "")
24+
if("ARDUINO_GIGA" IN_LIST MBED_TARGET_LABELS)
25+
list(APPEND EXAMPLES_TO_SKIP STM32H747_manageBootloader)
26+
endif()
27+
28+
build_arduino_examples(STM32H747_System examples ${EXAMPLES_TO_SKIP})
29+
if(TARGET STM32H747_System-example-STM32H747_manageBootloader)
30+
target_link_libraries(STM32H747_System-example-STM32H747_manageBootloader mbed-storage-littlefs)
31+
endif()
2432

2533
install(DIRECTORY . DESTINATION libraries/STM32H747_System)

Diff for: libraries/STM32H747_System/examples/QSPIFReadPartitions/QSPIFReadPartitions.ino

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include <Arduino.h>
12
#include <BlockDevice.h>
23

34
struct __attribute__((packed)) mbrEntry {

Diff for: libraries/STM32H747_System/examples/STM32H747_getBootloaderInfo/STM32H747_getBootloaderInfo.ino

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include <Arduino.h>
2+
13
uint8_t* bootloader_data = (uint8_t*)(0x801F000);
24
uint8_t* bootloader_identification = (uint8_t*)(0x80002F0);
35

@@ -15,6 +17,12 @@ OptaBoardInfo *info;
1517
OptaBoardInfo* boardInfo();
1618
#endif
1719

20+
// Forward declarations
21+
void printBootloaderInfo();
22+
String getUSBSpeed(uint8_t flag);
23+
String getClockSource(uint8_t flag);
24+
String getRAMSize(uint8_t flag);
25+
1826
void setup() {
1927
Serial.begin(115200);
2028
while (!Serial) {}

Diff for: libraries/STM32H747_System/examples/STM32H747_getResetReason/STM32H747_getResetReason.ino

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
#include "STM32H747_System.h"
22

3-
void setup() {
4-
Serial.begin(115200);
5-
while (!Serial) {}
6-
7-
reset_reason_t resetReason = STM32H747::getResetReason();
8-
Serial.println(getString(resetReason));
9-
}
10-
113
String getString(reset_reason_t val) {
124
switch (val){
135
case RESET_REASON_POWER_ON:
@@ -39,6 +31,15 @@ String getString(reset_reason_t val) {
3931
}
4032
}
4133

34+
void setup() {
35+
Serial.begin(115200);
36+
while (!Serial) {}
37+
38+
reset_reason_t resetReason = STM32H747::getResetReason();
39+
Serial.println(getString(resetReason));
40+
}
41+
42+
4243
void loop() {
4344
delay(1000);
4445
}

Diff for: libraries/STM32H747_System/examples/STM32H747_manageBootloader/STM32H747_manageBootloader.ino

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include <Arduino.h>
2+
13
#include "FlashIAP.h"
24
#include "QSPIFBlockDevice.h"
35
#include "MBRBlockDevice.h"
@@ -38,6 +40,14 @@ uint8_t* bootloader_data = (uint8_t*)(BOOTLOADER_ADDR + bootloader_data_offset);
3840
const unsigned char* bootloader_ptr = &bootloader_bin[0];
3941
long bootloader_len = bootloader_bin_len;
4042

43+
// Forward declarations
44+
void printBootloaderInfo();
45+
String getUSBSpeed(uint8_t flag);
46+
String getClockSource(uint8_t flag);
47+
String getRAMSize(uint8_t flag);
48+
bool waitResponse();
49+
void applyUpdate(uint32_t address);
50+
4151
uint8_t* boardInfo();
4252

4353
void setup() {

0 commit comments

Comments
 (0)