The board definitions in this directory are examples for use with wolfHAL's tests and sample applications. They are configured for specific development boards and are not intended for production use. Users should create their own board support packages tailored to their hardware.
Each subdirectory contains a board support package (BSP) for a specific development board. A BSP provides everything needed to build wolfHAL for a given target: startup code, peripheral initialization, linker script, and build configuration.
| Board | Platform | CPU | Directory |
|---|---|---|---|
| Microchip PIC32CZ CA Curiosity Ultra | PIC32CZ | Cortex-M7 | pic32cz_curiosity_ultra/ |
| ST NUCLEO-C031C6 | STM32C0 | Cortex-M0+ | stm32c031_nucleo/ |
| ST NUCLEO-F091RC | STM32F0 | Cortex-M0 | stm32f091rc_nucleo/ |
| ST NUCLEO-F302R8 | STM32F3 | Cortex-M4 | stm32f302r8_nucleo/ |
| WeAct BlackPill STM32F411 | STM32F4 | Cortex-M4 | stm32f411_blackpill/ |
| ST NUCLEO-H563ZI | STM32H5 | Cortex-M33 | stm32h563zi_nucleo/ |
| ST NUCLEO-WB55RG | STM32WB | Cortex-M4 | stm32wb55xx_nucleo/ |
| ST NUCLEO-L152RE | STM32L1 | Cortex-M3 | stm32l152re_nucleo/ |
| ST NUCLEO-WBA55CG | STM32WBA | Cortex-M33 | stm32wba55cg_nucleo/ |
Each board directory contains:
Makefile.inc- Build configuration: toolchain, CPU flags, platform drivers, and linker script. Included by application Makefiles viainclude $(BOARD_DIR)/Makefile.inc.board.h- Board-level declarations: global peripheral instances, pin definitions, andBoard_Init()/Board_Deinit()prototypes.board.c- Peripheral instantiation andBoard_Init()implementation (supply, clock, GPIO, UART, flash, timer).linker.ld- Linker script defining memory regions (flash, RAM).- Any additional board-specific source files (e.g. interrupt vector table, architecture-specific startup code).
Board Makefile.inc files use a self-referencing pattern so that they can be
included from any directory:
_BOARD_DIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))_BOARD_DIR points to the board's own directory, while the application
Makefile sets BOARD_DIR which may point elsewhere (e.g. a private board
overlay). This enables private repositories to extend a board by including
the base Makefile.inc and adding additional sources.
Board Makefile.inc populates BOARD_SOURCE with all of the sources
required to build the wolfHAL tests and sample applications for that board:
- Board files:
board.cand any additional board-specific source files - Platform / SoC drivers: e.g.
pic32cz_*.c,stm32wb_*.c - Architecture support:
systick.cand any related startup / vector code - Core wolfHAL modules and common sources: generic drivers such as
gpio.c,clock.c,uart.c, and other files undersrc/*.c
In your own projects you may either reuse these defaults by including the
board Makefile.inc as-is, or define your own BOARD_SOURCE in your
application Makefile to select a different set of modules.
- Create a new directory:
boards/<vendor>_<board>/ - Add
Makefile.incfollowing the_BOARD_DIRpattern above - Implement
board.h,board.c, andlinker.ld - Set
PLATFORM,TESTS, toolchain variables,CFLAGS, andBOARD_SOURCE - Build with
make BOARD=<your_board>