Skip to content

Commit bced9bd

Browse files
Add Arduino Giga and Portenta support (#316)
* Start on Arduino Giga * Fix QSPI flash, add option to use DMA in circular mode * Fix wifi driver build, add an option to just include the wifi firmware in the image * Add memory bank config * Update targets JSON to new format for dual core devices * Memory bank config for bootloader * Fix memory bank config * Make Giga application start addr be where bootloader expects it. This wastes 256k of flash but oh well... * DFU support: add STM32CUBE DFU * Also add Portenta H7 upload method * Fix some small Portenta issues * Fix gemalto build * Oops no MBED upload support! * Fix Arduino Giga bootloader VID & PID * Add DFU note * Note about udev rules
1 parent adfa239 commit bced9bd

File tree

24 files changed

+718
-57
lines changed

24 files changed

+718
-57
lines changed

connectivity/drivers/cellular/GEMALTO/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
if("COMPONENT_GEMALTO_CINTERION=1" IN_LIST MBED_TARGET_DEFINITIONS)
5-
add_subdirectory(CINTERION)
5+
add_subdirectory(COMPONENT_GEMALTO_CINTERION)
66
endif()

connectivity/drivers/emac/TARGET_STM/TARGET_STM32H7/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
if("DISCO_H747I" IN_LIST MBED_TARGET_LABELS)
55
add_subdirectory(TARGET_DISCO_H747I)
6-
elseif("PORTENTA_H7" IN_LIST MBED_TARGET_LABELS)
6+
elseif("ARDUINO_PORTENTA_H7" IN_LIST MBED_TARGET_LABELS)
77
add_subdirectory(TARGET_PORTENTA_H7)
88
elseif("NUCLEO_H743ZI2" IN_LIST MBED_TARGET_LABELS)
99
add_subdirectory(TARGET_NUCLEO_H743ZI2)

connectivity/drivers/wifi/COMPONENT_WHD/minimal-cyhal/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ add_library(mbed-minimal-cyhal STATIC
1616
target_include_directories(mbed-minimal-cyhal PUBLIC .)
1717
target_link_libraries(mbed-minimal-cyhal PUBLIC
1818
mbed-core-flags
19-
mbed-cy-rtos-abstraction)
19+
mbed-rtos-flags)
2020

2121
# This is needed in order to make cybsp_wifi.h include cycfg.h
2222
target_compile_definitions(mbed-minimal-cyhal PUBLIC COMPONENT_CUSTOM_DESIGN_MODUS)

connectivity/drivers/wifi/COMPONENT_WHD/minimal-cyhal/TARGET_STM32H7/TARGET_STM32H747_ARDUINO/minimal_cyhal_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
#define BSP_LED1 PI_12
6060
#define BSP_LED2 PE_3
6161
#define BSP_LED3 PJ_13
62-
#elif TARGET_ARDUINO_PORTENTA
62+
#elif TARGET_ARDUINO_PORTENTA_H7
6363
#define WIFI_SDIO_OOB_IRQ PJ_5
6464
#define WIFI_WL_REG_ON PJ_1
6565
#define BSP_LED1 PK_5

connectivity/drivers/wifi/COMPONENT_WHD/minimal-cyhal/TARGET_STM32H7/TARGET_STM32H747_ARDUINO/wiced_filesystem_setup.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ MBED_WEAK wiced_result_t whd_firmware_check_hook(const char *mounted_name, int m
5858
return WICED_ERROR;
5959
}
6060

61+
wiced_filesystem_t resource_fs_handle = 0;
62+
6163
wiced_result_t wiced_filesystem_setup()
6264
{
6365
static QSPIFBlockDevice *qspi_bd = nullptr;
@@ -82,6 +84,7 @@ wiced_result_t wiced_filesystem_setup()
8284
mbr_bd = new mbed::MBRBlockDevice(qspi_bd, WIFI_DEFAULT_PARTITION);
8385
if(mbr_bd->init() != mbed::BD_ERROR_OK)
8486
{
87+
whd_firmware_check_hook(WIFI_DEFAULT_MOUNT_NAME, true);
8588
delete mbr_bd;
8689
mbr_bd = nullptr;
8790
return WICED_ERROR;

connectivity/drivers/wifi/COMPONENT_WHD/minimal-cyhal/cyhal_gpio.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <stdio.h>
2323
#include "cyhal.h"
2424
#include "cybsp.h"
25-
#include "drivers/DigitalIn.h"
25+
#include "drivers/DigitalOut.h"
2626
#include "drivers/InterruptIn.h"
2727

2828
#include <minimal_cyhal_config.h>

connectivity/drivers/wifi/COMPONENT_WHD/minimal-cyhal/wiced_filesystem.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ typedef int wiced_file_t;
7676
*/
7777
typedef int wiced_filesystem_handle_type_t;
7878

79-
// Global "FS handle" object. Just here to match the WHD driver's expectations, we have one global
79+
// Global "FS handle" object. Just here to match the WHD driver's expectations, we in fact have one global
8080
// filesystem object.
81-
static wiced_filesystem_t resource_fs_handle = 0;
81+
extern wiced_filesystem_t resource_fs_handle;
8282

8383
/**
8484
* @brief Sets up the file system where the wifi module resources will be loaded from.

connectivity/drivers/wifi/COMPONENT_WHD/whd_mac/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
target_include_directories(mbed-wifi
5-
INTERFACE
5+
PUBLIC
66
.
77
./interface
88
./network
99
./utils
1010
)
1111

1212
target_sources(mbed-wifi
13-
INTERFACE
13+
PRIVATE
1414
interface/CyDhcpServer.cpp
1515
interface/WhdAccessPoint.cpp
1616
interface/WhdSTAInterface.cpp

connectivity/drivers/wifi/COMPONENT_WHD/wifi-host-driver/resources/firmware/COMPONENT_4343W_FS/4343WA1_bin.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* limitations under the License.
1515
*/
1616
#include "wiced_resource.h"
17+
#include "mbed-target-config.h"
1718

1819
#if defined(CY_STORAGE_WIFI_DATA)
1920
CY_SECTION_WHD(CY_STORAGE_WIFI_DATA) __attribute__((used))
@@ -25489,5 +25490,9 @@ const unsigned char wifi_firmware_image_data[421098] = {
2548925490
49, 45, 53, 97, 102, 99, 56, 99, 49, 101, 0, 254, 0, 68, 86, 73, 68,
2549025491
32, 48, 49, 45, 101, 100, 48, 100, 55, 97, 53, 54
2549125492
};
25492-
resource_hnd_t wifi_firmware_image = { RESOURCE_IN_EXTERNAL_STORAGE, 421098, {.fs = { 0, "/wlan/4343WA1.BIN" }}};
2549325493

25494+
#if MBED_CONF_TARGET_WIFI_DRIVER_IN_QSPI_FLASH
25495+
resource_hnd_t wifi_firmware_image = { RESOURCE_IN_EXTERNAL_STORAGE, 421098, {.fs = { 0, "/wlan/4343WA1.BIN" }}};
25496+
#else
25497+
const resource_hnd_t wifi_firmware_image = { RESOURCE_IN_MEMORY, 421098, {.mem = { (const char *) wifi_firmware_image_data }}};
25498+
#endif

connectivity/lwipstack/mbed_lib.json5

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,18 +196,14 @@
196196
"MIMXRT105X": {
197197
"mem-size": 36560
198198
},
199-
"PORTENTA_H7": {
199+
"STM32H747_ARDUINO": {
200200
"mem-size": 16000
201201
},
202202
"FVP_MPS2_M3": {
203203
"mem-size": 36560
204204
},
205205
"MTS_DRAGONFLY_F411RE": {
206206
"tcpip-thread-stacksize": 1600
207-
},
208-
"STM32H7": {
209-
// On STM32H7, we have lots of RAM, so we can make the pool size relatively large
210-
"pbuf-pool-size": 16,
211207
}
212208
}
213209
}

0 commit comments

Comments
 (0)