Skip to content

Commit b61582c

Browse files
authored
Merge pull request #223 from pillo79/pr-giga-wifi
giga_r1: enable wifi
2 parents a338a5e + 881a71b commit b61582c

File tree

7 files changed

+26054
-2
lines changed

7 files changed

+26054
-2
lines changed

.github/workflows/format_check.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434
files_ignore: |
3535
cores/arduino/api/**
3636
loader/llext_exports.c
37+
loader/blobs/4343WA1_*.c
38+
loader/blobs/wifi_nvram_image.h
3739
libraries/examples/**
3840
libraries/extras/**
3941
libraries/ea_malloc/**

loader/blobs/4343WA1_bin.c

Lines changed: 25493 additions & 0 deletions
Large diffs are not rendered by default.

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/4343WA1_clm_blob.c

Lines changed: 400 additions & 0 deletions
Large diffs are not rendered by default.

loader/blobs/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,10 @@ if (CONFIG_BOARD_ARDUINO_PORTENTA_C33)
99
${CMAKE_CURRENT_SOURCE_DIR}/c33_bl.bin
1010
${gen_dir}/c33_bl.bin.inc
1111
)
12-
endif()
12+
endif()
13+
14+
if(CONFIG_AIROC_WIFI_CUSTOM)
15+
zephyr_include_directories(${CMAKE_CURRENT_LIST_DIR}) # for wifi_nvram_image.h
16+
zephyr_library_sources(4343WA1_clm_blob.c)
17+
zephyr_library_sources(4343WA1_bin_qspi.c) # use _bin.c for a static build
18+
endif()

loader/blobs/wifi_nvram_image.h

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
* Copyright (c) 2019, Cypress Semiconductor Corporation, All Rights Reserved
3+
* SPDX-License-Identifier: LicenseRef-PBL
4+
*
5+
* This file and the related binary are licensed under the
6+
* Permissive Binary License, Version 1.0 (the "License");
7+
* you may not use these files except in compliance with the License.
8+
*
9+
* You may obtain a copy of the License here:
10+
* LICENSE-permissive-binary-license-1.0.txt and at
11+
* https://www.mbed.com/licenses/PBL-1.0
12+
*
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/** @file
18+
* NVRAM file for CY8CKIT-062-WiFi-BT (PSoC6 WiFi-BT Pioneer Kit) using
19+
* Murata's Type 1DX module - Copied from bcm94343wwcd1.txt on 08/04/2019
20+
* # 2.4 GHz, 20 MHz BW mode; No Antenna Diversity
21+
*/
22+
23+
#ifndef INCLUDED_NVRAM_IMAGE_H_
24+
#define INCLUDED_NVRAM_IMAGE_H_
25+
26+
#include <string.h>
27+
#include <stdint.h>
28+
#include "generated_mac_address.txt"
29+
30+
31+
#ifdef __cplusplus
32+
extern "C" {
33+
#endif
34+
35+
/**
36+
* Character array of NVRAM image
37+
*
38+
* Generated from cyw94343cy8ckit-062-wifi-bt.txt
39+
*/
40+
41+
static const char wifi_nvram_image[] =
42+
"manfid=0x2d0" "\x00"
43+
"prodid=0x0726" "\x00"
44+
"vendid=0x14e4" "\x00"
45+
"devid=0x43e2" "\x00"
46+
"boardtype=0x0726" "\x00"
47+
"boardrev=0x1202" "\x00"
48+
"boardnum=22" "\x00"
49+
NVRAM_GENERATED_MAC_ADDRESS "\x00"
50+
"sromrev=11" "\x00"
51+
"boardflags=0x00404201" "\x00"
52+
"boardflags3=0x04000000" "\x00"
53+
"xtalfreq=37400" "\x00"
54+
"nocrc=1" "\x00"
55+
"ag0=0" "\x00"
56+
"aa2g=1" "\x00"
57+
"ccode=ALL" "\x00"
58+
"extpagain2g=0" "\x00"
59+
"pa2ga0=-145,6667,-751" "\x00"
60+
"AvVmid_c0=0x0,0xc8" "\x00"
61+
"cckpwroffset0=2" "\x00"
62+
"maxp2ga0=74" "\x00"
63+
"cckbw202gpo=0" "\x00"
64+
"legofdmbw202gpo=0x88888888" "\x00"
65+
"mcsbw202gpo=0xaaaaaaaa" "\x00"
66+
"propbw202gpo=0xdd" "\x00"
67+
"ofdmdigfilttype=18" "\x00"
68+
"ofdmdigfilttypebe=18" "\x00"
69+
"papdmode=1" "\x00"
70+
"papdvalidtest=1" "\x00"
71+
"pacalidx2g=48" "\x00"
72+
"papdepsoffset=-22" "\x00"
73+
"papdendidx=58" "\x00"
74+
"il0"NVRAM_GENERATED_MAC_ADDRESS "\x00"
75+
"wl0id=0x431b" "\x00"
76+
"muxenab=0x10" "\x00"
77+
"\x00\x00";
78+
79+
#ifdef __cplusplus
80+
} /* extern "C" */
81+
#endif
82+
83+
#else /* ifndef INCLUDED_NVRAM_IMAGE_H_ */
84+
85+
#error Wi-Fi NVRAM image included twice
86+
87+
#endif /* ifndef INCLUDED_NVRAM_IMAGE_H_ */

variants/arduino_giga_r1_stm32h747xx_m7/arduino_giga_r1_stm32h747xx_m7.conf

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ CONFIG_CDC_ACM_DTE_RATE_CALLBACK_SUPPORT=y
1111

1212
CONFIG_LLEXT_STORAGE_WRITABLE=n
1313
CONFIG_SHARED_MULTI_HEAP=y
14-
CONFIG_HEAP_MEM_POOL_SIZE=2048
14+
CONFIG_HEAP_MEM_POOL_SIZE=24576
1515
CONFIG_SHELL_STACK_SIZE=32768
1616
CONFIG_MAIN_STACK_SIZE=32768
1717
CONFIG_LLEXT_HEAP_SIZE=128
@@ -85,3 +85,47 @@ CONFIG_FS_FATFS_MAX_SS=4096
8585
CONFIG_FS_FATFS_MAX_LFN=255
8686
CONFIG_FS_FATFS_FSTAB_AUTOMOUNT=y
8787
CONFIG_FS_FATFS_CUSTOM_MOUNT_POINTS="wlan,ota"
88+
89+
CONFIG_SDHC=y
90+
CONFIG_SDIO_STACK=y
91+
CONFIG_SDHC_INIT_PRIORITY=75
92+
93+
CONFIG_AIROC_WIFI_CUSTOM=y
94+
CONFIG_STM32_MEMMAP=y
95+
96+
CONFIG_NETWORKING=y
97+
CONFIG_WIFI=y
98+
99+
CONFIG_NET_MGMT=y
100+
CONFIG_NET_MGMT_EVENT=y
101+
CONFIG_NET_MGMT_EVENT_STACK_SIZE=8192
102+
CONFIG_NET_MAX_CONTEXTS=10
103+
CONFIG_NET_MGMT_EVENT_QUEUE_TIMEOUT=5000
104+
CONFIG_NET_MGMT_EVENT_QUEUE_SIZE=32
105+
CONFIG_NET_MAX_CONN=10
106+
CONFIG_NET_MGMT_EVENT_STACK_SIZE=4608
107+
108+
CONFIG_POSIX_API=y
109+
110+
CONFIG_NET_TCP=y
111+
CONFIG_NET_SOCKETS=y
112+
CONFIG_NET_IPV6=n
113+
CONFIG_NET_IPV4=y
114+
CONFIG_NET_ARP=y
115+
CONFIG_NET_UDP=y
116+
CONFIG_NET_DHCPV4=y
117+
CONFIG_NET_DHCPV4_OPTION_CALLBACKS=y
118+
CONFIG_NET_SOCKETS_NET_MGMT=y
119+
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y
120+
121+
CONFIG_DNS_RESOLVER=y
122+
CONFIG_DNS_SERVER_IP_ADDRESSES=y
123+
CONFIG_DNS_SERVER1="8.8.8.8"
124+
125+
CONFIG_NET_CONFIG_AUTO_INIT=n
126+
CONFIG_NET_CONNECTION_MANAGER=y
127+
#CONFIG_WIFI_NM_MAX_MANAGED_INTERFACES=2
128+
129+
CONFIG_NET_SHELL=y
130+
CONFIG_NET_L2_ETHERNET_MGMT=y
131+
CONFIG_NET_L2_WIFI_SHELL=y

0 commit comments

Comments
 (0)