Skip to content

Commit 881a71b

Browse files
committed
giga_r1: load firmware image from QSPI flash
Reduces flash image size by 400kB.
1 parent 0aedf39 commit 881a71b

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

loader/blobs/4343WA1_bin_qspi.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright 2025 Arduino SA
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#include <zephyr/devicetree.h>
7+
#include "wiced_resource.h"
8+
9+
#define QUADSPI_MMAP_BASE DT_REG_ADDR_BY_IDX(DT_NODELABEL(quadspi), 1)
10+
#define FLASH_CHIP_OFFSET DT_REG_ADDR(DT_NODELABEL(qspi_flash))
11+
#define AIROC_PART_OFS DT_REG_ADDR(DT_NODELABEL(airoc_firmware))
12+
13+
#define FW_ADDR (QUADSPI_MMAP_BASE + FLASH_CHIP_OFFSET + AIROC_PART_OFS)
14+
#define FW_SIZE 421098 /* same as the _bin.c file */
15+
16+
const resource_hnd_t wifi_firmware_image = {
17+
RESOURCE_IN_MEMORY,
18+
FW_SIZE,
19+
{ .mem = { (const char *) FW_ADDR } }
20+
};

loader/blobs/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ endif()
1414
if(CONFIG_AIROC_WIFI_CUSTOM)
1515
zephyr_include_directories(${CMAKE_CURRENT_LIST_DIR}) # for wifi_nvram_image.h
1616
zephyr_library_sources(4343WA1_clm_blob.c)
17-
zephyr_library_sources(4343WA1_bin.c)
17+
zephyr_library_sources(4343WA1_bin_qspi.c) # use _bin.c for a static build
1818
endif()

variants/arduino_giga_r1_stm32h747xx_m7/arduino_giga_r1_stm32h747xx_m7.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ CONFIG_SDIO_STACK=y
9191
CONFIG_SDHC_INIT_PRIORITY=75
9292

9393
CONFIG_AIROC_WIFI_CUSTOM=y
94+
CONFIG_STM32_MEMMAP=y
9495

9596
CONFIG_NETWORKING=y
9697
CONFIG_WIFI=y

0 commit comments

Comments
 (0)