Skip to content

Commit 2e9c1f4

Browse files
committed
Move wolfHAL integration into existing stm32h5 port
1 parent e53c6de commit 2e9c1f4

16 files changed

Lines changed: 270 additions & 412 deletions

File tree

.github/workflows/wolfhal-stm32h563zi-nucleo.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@ jobs:
2525
set -euo pipefail
2626
git clone --depth 1 https://github.com/wolfSSL/wolfHAL.git ../wolfHAL
2727
28-
- name: Build wolfHAL port
28+
- name: Build STM32H563 port with the wolfHAL driver backend
2929
run: |
3030
set -euo pipefail
31-
make -C src/port/wolfHAL BOARD=stm32h563zi_nucleo
31+
make -C src/port/stm32h563 ENABLE_WOLFHAL=1 BOARD=stm32h563zi_nucleo \
32+
CC=arm-none-eabi-gcc OBJCOPY=arm-none-eabi-objcopy
3233
3334
- name: Verify binary
3435
run: |
3536
set -euo pipefail
36-
test -f src/port/wolfHAL/build/stm32h563zi_nucleo/app.bin
37-
arm-none-eabi-size src/port/wolfHAL/build/stm32h563zi_nucleo/app.elf
37+
test -f src/port/stm32h563/app.bin
38+
arm-none-eabi-size src/port/stm32h563/app.elf

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ CPPCHECK_FLAGS=--enable=warning,performance,portability,missingInclude \
150150
--suppress=comparePointers:src/port/rp2350_cyw43439/syscalls.c \
151151
--suppress=unknownMacro:src/port/stm32h563/dot1x_client.c \
152152
--suppress=preprocessorErrorDirective:src/supplicant/supplicant_features.h \
153-
--suppress=comparePointers:src/port/wolfHAL/boards/stm32h563zi_nucleo/startup.c \
154-
--suppress=comparePointers:src/port/wolfHAL/boards/stm32h563zi_nucleo/syscalls.c \
153+
--suppress=comparePointers:src/port/stm32h563/boards/stm32h563zi_nucleo/startup.c \
154+
--suppress=comparePointers:src/port/stm32h563/boards/stm32h563zi_nucleo/syscalls.c \
155155
--disable=style \
156156
--std=c99 --language=c \
157157
--platform=unix64 \

src/port/stm32h563/Makefile

Lines changed: 64 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ ROOT := ../../..
77
# Default is TZEN=0 (TrustZone disabled)
88
TZEN ?= 0
99

10+
# wolfHAL driver backend: set ENABLE_WOLFHAL=1 to build the port on top of
11+
# the wolfHAL HAL (Ethernet MAC/PHY, RNG, UART, GPIO, clocks) instead of the
12+
# in-tree bare-metal drivers. Selects the self-contained board directory
13+
# boards/$(BOARD). First cut supports TZEN=0 and FREERTOS=0 only.
14+
ENABLE_WOLFHAL ?= 0
15+
BOARD ?= stm32h563zi_nucleo
16+
WOLFHAL_ROOT ?= $(ROOT)/../wolfHAL
17+
1018
# TLS support: set ENABLE_TLS=1 to include wolfSSL TLS server
1119
# Requires wolfSSL cloned alongside wolfip (or set WOLFSSL_ROOT)
1220
ENABLE_TLS ?= 0
@@ -122,6 +130,44 @@ CFLAGS_WOLFSSL := $(filter-out -Werror,$(CFLAGS_WOLFSSL))
122130
CFLAGS_WOLFSSL += -Wno-unused-variable -Wno-unused-function
123131
CFLAGS_WOLFSSL += $(EXTRA_CFLAGS_WOLFSSL)
124132

133+
ifeq ($(ENABLE_WOLFHAL),1)
134+
# -----------------------------------------------------------------------------
135+
# wolfHAL driver backend
136+
# -----------------------------------------------------------------------------
137+
# board_init() programs the PLL directly and the wolfHAL SysTick driver owns
138+
# the SysTick handler, so the wolfBoot-launched (TZEN=1) clock flow and the
139+
# FreeRTOS SysTick are not supported in this first cut.
140+
ifeq ($(TZEN),1)
141+
$(error ENABLE_WOLFHAL=1 does not support TZEN=1 yet (board_init owns the PLL, which conflicts with the wolfBoot-launched NS clock flow))
142+
endif
143+
ifeq ($(FREERTOS),1)
144+
$(error ENABLE_WOLFHAL=1 does not support FREERTOS=1 yet (wolfHAL SysTick conflicts with the FreeRTOS SysTick handler))
145+
endif
146+
147+
ifeq ($(wildcard $(WOLFHAL_ROOT)/wolfHAL/wolfHAL.h),)
148+
$(error wolfHAL not found at $(WOLFHAL_ROOT). Clone it alongside wolfip: git clone https://github.com/wolfSSL/wolfHAL.git (or set WOLFHAL_ROOT))
149+
endif
150+
151+
BOARD_DIR := boards/$(BOARD)
152+
153+
CFLAGS += -DENABLE_WOLFHAL -DTZEN_ENABLED=0
154+
CFLAGS += -I$(WOLFHAL_ROOT) -I$(BOARD_DIR) -I$(ROOT)/src/port/wolfHAL
155+
156+
LDSCRIPT := $(BOARD_DIR)/linker.ld
157+
158+
# The board dir carries its own wolfHAL-specific startup/ivt/syscalls; the
159+
# bare-metal stm32_eth.c driver is replaced by board.c (BSP bringup) plus the
160+
# generic wolfhal_eth.c bridge.
161+
SRCS := $(BOARD_DIR)/startup.c $(BOARD_DIR)/ivt.c $(BOARD_DIR)/syscalls.c
162+
SRCS += main.c $(BOARD_DIR)/board.c $(ROOT)/src/port/wolfHAL/wolfhal_eth.c
163+
SRCS += $(ROOT)/src/wolfip.c
164+
165+
# wolfHAL driver selection (WHAL_CFG_* defines) + wolfHAL driver TUs.
166+
include $(BOARD_DIR)/board.mk
167+
else
168+
# -----------------------------------------------------------------------------
169+
# In-tree bare-metal drivers (default)
170+
# -----------------------------------------------------------------------------
125171
# Select linker script based on TZEN setting
126172
ifeq ($(TZEN),1)
127173
LDSCRIPT := target_tzen.ld
@@ -131,11 +177,12 @@ else
131177
CFLAGS += -DTZEN_ENABLED=0
132178
endif
133179

134-
LDFLAGS := -nostdlib -T $(LDSCRIPT) -Wl,-gc-sections
135-
136180
# Base source files
137181
SRCS := startup.c ivt.c syscalls.c
138182
SRCS += main.c $(ROOT)/src/port/stm32/stm32_eth.c $(ROOT)/src/wolfip.c
183+
endif
184+
185+
LDFLAGS := -nostdlib -T $(LDSCRIPT) -Wl,-gc-sections
139186

140187
ifeq ($(FREERTOS),1)
141188
ifeq ($(wildcard $(FREERTOS_PATH)/include/FreeRTOS.h),)
@@ -515,7 +562,7 @@ endif
515562
OBJS := $(patsubst %.c,%.o,$(SRCS))
516563

517564
all: app.bin
518-
@echo "Built with TZEN=$(TZEN) ENABLE_TLS=$(ENABLE_TLS) ENABLE_TLS_CLIENT=$(ENABLE_TLS_CLIENT) ENABLE_HTTPS=$(ENABLE_HTTPS) ENABLE_SSH=$(ENABLE_SSH) ENABLE_MQTT=$(ENABLE_MQTT) ENABLE_MQTT_BROKER=$(ENABLE_MQTT_BROKER) FREERTOS=$(FREERTOS)"
565+
@echo "Built with TZEN=$(TZEN) ENABLE_WOLFHAL=$(ENABLE_WOLFHAL) ENABLE_TLS=$(ENABLE_TLS) ENABLE_TLS_CLIENT=$(ENABLE_TLS_CLIENT) ENABLE_HTTPS=$(ENABLE_HTTPS) ENABLE_SSH=$(ENABLE_SSH) ENABLE_MQTT=$(ENABLE_MQTT) ENABLE_MQTT_BROKER=$(ENABLE_MQTT_BROKER) FREERTOS=$(FREERTOS)"
519566
ifeq ($(ENABLE_TLS),1)
520567
@echo " wolfSSL: $(WOLFSSL_ROOT)"
521568
endif
@@ -576,6 +623,11 @@ factory: factory.bin
576623
$(WOLFSSL_ROOT)/%.o: $(WOLFSSL_ROOT)/%.c
577624
$(CC) $(CFLAGS_WOLFSSL) -DWOLFSSL_USER_SETTINGS $(if $(filter 1,$(ENABLE_SSH)),-DENABLE_SSH -DWOLFSSL_WOLFSSH) $(if $(filter 1,$(ENABLE_MQTT_BROKER)),-DENABLE_MQTT_BROKER) $(if $(filter 1,$(ENABLE_DOT1X)),-DHAVE_PBKDF2 -DHAVE_AES_KEYWRAP) -I$(WOLFSSL_ROOT) -c $< -o $@
578625

626+
# wolfHAL driver objects: first-party HAL, but built with -Werror relaxed
627+
# since the port's -Wextra is stricter than wolfHAL's own build.
628+
$(WOLFHAL_ROOT)/%.o: $(WOLFHAL_ROOT)/%.c
629+
$(CC) $(filter-out -Werror,$(CFLAGS)) -c $< -o $@
630+
579631
clean:
580632
rm -f *.o app.elf app.bin
581633
rm -f app_v1_signed.bin factory.bin wolfboot_padded.bin
@@ -584,6 +636,10 @@ clean:
584636
rm -f $(ROOT)/src/port/stm32/*.o
585637
rm -f $(ROOT)/src/port/freeRTOS/*.o
586638
rm -f $(ROOT)/src/supplicant/*.o
639+
ifeq ($(ENABLE_WOLFHAL),1)
640+
rm -f boards/$(BOARD)/*.o
641+
rm -f $(WOLFHAL_ROOT)/src/*.o $(WOLFHAL_ROOT)/src/*/*.o
642+
endif
587643
ifeq ($(FREERTOS),1)
588644
rm -f $(FREERTOS_PATH)/*.o
589645
rm -f $(FREERTOS_PATH)/portable/MemMang/*.o
@@ -614,7 +670,7 @@ verify: app.bin
614670
@strings app.bin | grep -q "MQTT Broker: Initializing" && echo " ✓ MQTT broker enabled" || echo " ✗ MQTT broker disabled"
615671
@echo ""
616672
@echo "Binary size: $$(ls -lh app.bin | awk '{print $$5}')"
617-
@echo "Build flags: TZEN=$(TZEN) ENABLE_TLS=$(ENABLE_TLS) ENABLE_HTTPS=$(ENABLE_HTTPS) ENABLE_SSH=$(ENABLE_SSH) ENABLE_MQTT=$(ENABLE_MQTT) ENABLE_MQTT_BROKER=$(ENABLE_MQTT_BROKER) FREERTOS=$(FREERTOS)"
673+
@echo "Build flags: TZEN=$(TZEN) ENABLE_WOLFHAL=$(ENABLE_WOLFHAL) ENABLE_TLS=$(ENABLE_TLS) ENABLE_HTTPS=$(ENABLE_HTTPS) ENABLE_SSH=$(ENABLE_SSH) ENABLE_MQTT=$(ENABLE_MQTT) ENABLE_MQTT_BROKER=$(ENABLE_MQTT_BROKER) FREERTOS=$(FREERTOS)"
618674

619675
# Show memory usage
620676
size: app.elf
@@ -643,6 +699,8 @@ help:
643699
@echo ""
644700
@echo "Options:"
645701
@echo " TZEN=1 Enable TrustZone support"
702+
@echo " ENABLE_WOLFHAL=1 Use the wolfHAL driver backend (requires wolfHAL; TZEN=0, FREERTOS=0)"
703+
@echo " BOARD=<name> Board under boards/ (default: stm32h563zi_nucleo)"
646704
@echo " ENABLE_TLS=1 Enable TLS server (requires wolfSSL)"
647705
@echo " ENABLE_TLS_CLIENT=1 Enable TLS client test (Google)"
648706
@echo " ENABLE_HTTPS=1 Enable HTTPS web server (requires TLS)"
@@ -655,11 +713,13 @@ help:
655713
@echo " WOLFSSL_ROOT= Path to wolfSSL (default: ../wolfssl)"
656714
@echo " WOLFSSH_ROOT= Path to wolfSSH (default: ../wolfssh)"
657715
@echo " WOLFMQTT_ROOT= Path to wolfMQTT (default: ../wolfmqtt)"
716+
@echo " WOLFHAL_ROOT= Path to wolfHAL (default: ../wolfHAL)"
658717
@echo " CC= C compiler (default: arm-none-eabi-gcc)"
659718
@echo " OBJCOPY= Objcopy tool (default: arm-none-eabi-objcopy)"
660719
@echo ""
661720
@echo "Examples:"
662721
@echo " make # Basic TCP echo (port 7)"
722+
@echo " make ENABLE_WOLFHAL=1 # Basic TCP echo via the wolfHAL driver backend"
663723
@echo " make ENABLE_TLS=1 # TLS echo server (port 8443)"
664724
@echo " make ENABLE_TLS=1 ENABLE_HTTPS=1 # TLS + HTTPS web (port 443)"
665725
@echo " make ENABLE_TLS=1 ENABLE_SSH=1 # TLS + SSH shell (port 22)"

src/port/wolfHAL/boards/stm32h563zi_nucleo/board.c renamed to src/port/stm32h563/boards/stm32h563zi_nucleo/board.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,6 @@ uint8_t ethTxBufs[BOARD_ETH_TX_DESC_COUNT * BOARD_ETH_TX_BUF_SIZE]
7878
uint8_t ethRxBufs[BOARD_ETH_RX_DESC_COUNT * BOARD_ETH_RX_BUF_SIZE]
7979
__attribute__((aligned(4)));
8080

81-
/* UART: USART3 on the ST-Link VCP (caller-allocated, multi-instance driver) */
82-
whal_Uart g_whalUart = {
83-
.base = WHAL_STM32H563_USART3_BASE,
84-
/* .driver: direct API mapping */
85-
.cfg = &(whal_Stm32h5_Uart_Cfg) {
86-
.brr = WHAL_STM32H5_UART_BRR(168000000, 115200),
87-
.timeout = &g_whalTimeout,
88-
},
89-
};
90-
9181
/*
9282
* FLASH_ACR (0x40022000): LATENCY[3:0] = 5 wait states for 168 MHz,
9383
* WRHIGHFREQ[5:4] = 2. Must be set before raising the clock.
@@ -159,7 +149,7 @@ whal_Error board_init(void)
159149
if (err)
160150
return err;
161151

162-
err = whal_Uart_Init(&g_whalUart);
152+
err = whal_Uart_Init(WHAL_INTERNAL_DEV);
163153
if (err)
164154
return err;
165155

@@ -211,7 +201,7 @@ whal_Error board_deinit(void)
211201
if (err)
212202
return err;
213203

214-
err = whal_Uart_Deinit(&g_whalUart);
204+
err = whal_Uart_Deinit(WHAL_INTERNAL_DEV);
215205
if (err)
216206
return err;
217207

src/port/wolfHAL/boards/stm32h563zi_nucleo/board.h renamed to src/port/stm32h563/boards/stm32h563zi_nucleo/board.h

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,19 @@
3030
#include <wolfHAL/platform/st/stm32h563xx.h>
3131
#include <wolfHAL/eth_phy/lan8742a_eth_phy.h>
3232

33-
/* Caller-allocated devices (multi-instance drivers). */
34-
extern whal_Uart g_whalUart;
35-
3633
extern whal_Timeout g_whalTimeout;
3734
extern volatile uint32_t g_tick;
3835

39-
/* The generic wolfIP port (main.c, wolfhal_eth.c) references the board's
40-
* Ethernet, PHY, and RNG devices through these names. Under the current
41-
* wolfHAL API these are single-instance drivers whose device structs live
42-
* in the driver translation units (built from the WHAL_CFG_*_DEV
36+
/* The generic wolfIP port (main.c, wolfhal_eth.c, syscalls.c) references the
37+
* board's Ethernet, PHY, RNG, and UART devices through these names. Under the
38+
* current wolfHAL API these are single-instance drivers whose device structs
39+
* live in the driver translation units (built from the WHAL_CFG_*_DEV
4340
* initializers below), so we alias the documented g_whal* names onto those
44-
* driver singletons. */
41+
* driver-owned device structs. */
4542
#define g_whalEth (*(whal_Eth *)&whal_Stm32h5_Eth_Dev)
4643
#define g_whalEthPhy (*(whal_EthPhy *)&whal_Lan8742a_Dev)
4744
#define g_whalRng (*(whal_Rng *)&whal_Stm32h5_Rng_Dev)
45+
#define g_whalUart (*(whal_Uart *)&whal_Stm32h5_Uart_Dev)
4846

4947
/* Ethernet PHY: LAN8742A on MDIO address 0 */
5048
#define BOARD_ETH_PHY_ADDR 0
@@ -64,7 +62,7 @@ enum {
6462
PIN_COUNT,
6563
};
6664

67-
/* GPIO dev initializer — singleton defined in the gpio driver TU.
65+
/* GPIO dev initializer — device struct defined in the gpio driver code.
6866
* Only the USART3 (ST-Link VCP) and Ethernet RMII pins are configured. */
6967
#define WHAL_CFG_STM32H5_GPIO_DEV { \
7068
.base = WHAL_STM32H563_GPIO_BASE, \
@@ -121,17 +119,29 @@ enum {
121119
}, \
122120
}
123121

124-
/* RNG dev initializer — singleton defined in the rng driver TU. */
122+
/* RNG dev initializer — device struct defined in the rng driver code. */
125123
#define WHAL_CFG_STM32H5_RNG_DEV { \
126124
.base = WHAL_STM32H563_RNG_BASE, \
127125
.cfg = (void *)&(const whal_Stm32h5_Rng_Cfg){ \
128126
.timeout = &g_whalTimeout, \
129127
}, \
130128
}
131129

130+
/* UART dev initializer — device struct defined in the UART driver code. Named
131+
* WHAL_CFG_STM32WB_UART_DEV (not _STM32H5_) because the STM32H5 USART reuses
132+
* the shared STM32WB UART driver, which instantiates the device from that
133+
* exact name. USART3 on the ST-Link VCP; BRR for PCLK 168 MHz @ 115200. */
134+
#define WHAL_CFG_STM32WB_UART_DEV { \
135+
.base = WHAL_STM32H563_USART3_BASE, \
136+
.cfg = (void *)&(const whal_Stm32h5_Uart_Cfg){ \
137+
.brr = WHAL_STM32H5_UART_BRR(168000000, 115200), \
138+
.timeout = &g_whalTimeout, \
139+
}, \
140+
}
141+
132142
/* ETH descriptor rings + buffer pool — defined in board.c, captured by the
133-
* ETH singleton's cfg below (expanded in the eth driver TU). */
134-
#define BOARD_ETH_TX_DESC_COUNT 4
143+
* ETH device's cfg below (expanded in the eth driver code). */
144+
#define BOARD_ETH_TX_DESC_COUNT 3
135145
#define BOARD_ETH_RX_DESC_COUNT 4
136146
#define BOARD_ETH_TX_BUF_SIZE 1536
137147
#define BOARD_ETH_RX_BUF_SIZE 1536
@@ -145,7 +155,7 @@ extern uint8_t ethRxBufs[BOARD_ETH_RX_DESC_COUNT * BOARD_ETH_RX_BUF_SIZE];
145155
#define BOARD_MAC_ADDR {0x00, 0x80, 0xE1, 0x00, 0x00, 0x01}
146156
#endif
147157

148-
/* ETH dev initializer — singleton defined in the eth driver TU. */
158+
/* ETH dev initializer — device struct defined in the eth driver code. */
149159
#define WHAL_CFG_STM32H5_ETH_DEV { \
150160
.base = WHAL_STM32H563_ETH_BASE, \
151161
.macAddr = BOARD_MAC_ADDR, \
@@ -163,7 +173,7 @@ extern uint8_t ethRxBufs[BOARD_ETH_RX_DESC_COUNT * BOARD_ETH_RX_BUF_SIZE];
163173
}, \
164174
}
165175

166-
/* LAN8742A PHY dev initializer — singleton defined in the phy driver TU. */
176+
/* LAN8742A PHY dev initializer — device struct defined in the phy driver code. */
167177
#define WHAL_CFG_LAN8742A_DEV { \
168178
.eth = NULL, \
169179
.addr = BOARD_ETH_PHY_ADDR, \
@@ -172,7 +182,7 @@ extern uint8_t ethRxBufs[BOARD_ETH_RX_DESC_COUNT * BOARD_ETH_RX_BUF_SIZE];
172182
}, \
173183
}
174184

175-
/* SysTick dev initializer — singleton defined in the systick driver TU. */
185+
/* SysTick dev initializer — device struct defined in the systick driver code. */
176186
#define WHAL_CFG_SYSTICK_DEV { \
177187
.base = WHAL_CORTEX_M33_SYSTICK_BASE, \
178188
.cfg = (void *)&(const whal_SysTick_Cfg){ \
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# wolfHAL-specific build settings for the STM32H563ZI Nucleo board.
2+
#
3+
# Included by the port Makefile only when ENABLE_WOLFHAL=1. The port
4+
# Makefile owns the toolchain, base CFLAGS, include paths, and linker
5+
# script; this fragment contributes only the wolfHAL driver selection
6+
# and the wolfHAL driver translation units. WOLFHAL_ROOT is set by the
7+
# port Makefile.
8+
9+
# Direct-API-mapping driver selection: one concrete driver TU per domain,
10+
# no generic dispatch layer (which would redefine the top-level symbols).
11+
CFLAGS += -DPLATFORM_STM32H5
12+
CFLAGS += -DWHAL_CFG_STM32H5_GPIO_DIRECT_API_MAPPING
13+
CFLAGS += -DWHAL_CFG_STM32H5_RCC_PLL_DRIVER
14+
CFLAGS += -DWHAL_CFG_STM32H5_RCC_DIRECT_API_MAPPING
15+
CFLAGS += -DWHAL_CFG_STM32H5_UART_DIRECT_API_MAPPING
16+
CFLAGS += -DWHAL_CFG_STM32H5_UART_SINGLE_INSTANCE
17+
CFLAGS += -DWHAL_CFG_STM32H5_RNG_DIRECT_API_MAPPING
18+
CFLAGS += -DWHAL_CFG_STM32H5_ETH_DIRECT_API_MAPPING
19+
CFLAGS += -DWHAL_CFG_LAN8742A_ETH_PHY_DIRECT_API_MAPPING
20+
CFLAGS += -DWHAL_CFG_STM32H5_FLASH_DIRECT_API_MAPPING
21+
CFLAGS += -DWHAL_CFG_SYSTICK_TIMER_DIRECT_API_MAPPING
22+
23+
# wolfHAL driver translation units. Built with relaxed warnings via the
24+
# port Makefile's $(WOLFHAL_ROOT)/%.o rule.
25+
SRCS += $(WOLFHAL_ROOT)/src/reg.c
26+
SRCS += $(WOLFHAL_ROOT)/src/eth/stm32h5_eth.c
27+
SRCS += $(WOLFHAL_ROOT)/src/eth_phy/lan8742a_eth_phy.c
28+
SRCS += $(WOLFHAL_ROOT)/src/gpio/stm32h5_gpio.c
29+
SRCS += $(WOLFHAL_ROOT)/src/uart/stm32h5_uart.c
30+
SRCS += $(WOLFHAL_ROOT)/src/rng/stm32h5_rng.c
31+
SRCS += $(WOLFHAL_ROOT)/src/timer/systick.c
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/port/wolfHAL/boards/stm32h563zi_nucleo/syscalls.c renamed to src/port/stm32h563/boards/stm32h563zi_nucleo/syscalls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
#include <stdint.h>
2626
#include <stddef.h>
2727
#include <wolfHAL/uart/uart.h>
28+
#include "board.h" /* g_whalUart singleton alias (single-instance UART) */
2829
extern uint32_t _ebss;
2930
extern uint32_t _heap_limit;
30-
extern whal_Uart g_whalUart;
3131

3232
static char *heap_end;
3333

0 commit comments

Comments
 (0)