Skip to main content
Every VESC firmware build is tied to a specific hardware target. The hardware configuration system uses two preprocessor macros — HW_SOURCE and HW_HEADER — to inject the correct pin assignments, peripheral configuration, and electrical limits for a given board at compile time.

How hardware config files work

The build system passes HW_SOURCE and HW_HEADER as compiler -D defines. conf_general.h enforces that both are set before any other headers are included:
hw.h then includes the board header through the macro:
This means HW_HEADER must expand to a quoted string containing the path to a .h file, for example "hwconf/trampa/vesc6/hw_vesc6.h". The HW_SOURCE macro works the same way for the corresponding .c file. After including the board header, hw.h conditionally pulls in the appropriate gate driver header based on which driver the board declares:
The board header defines HW_NAME, which is required. If it is missing, the build fails immediately:
hw.h also provides safe defaults for any optional macros a board does not define — for example gate control, phase filters, temperature sensors, and current measurement. A board only needs to override the macros that differ from the defaults.

Hardware types

Every board belongs to one of three hardware types defined in datatypes.h:
Most motor controller boards use HW_TYPE_VESC. BMS boards that run VESC firmware use HW_TYPE_VESC_BMS. Custom peripheral modules use HW_TYPE_CUSTOM_MODULE.

Supported boards by manufacturer

All hardware configuration files live under hwconf/. Each manufacturer has its own subdirectory.
The primary VESC hardware designer. Configurations are in hwconf/trampa/.
Official VESC boards. Configurations are in hwconf/vesc/.
Configurations are in hwconf/flipsky/.
Additional official FlipSky boards in hwconf/flipsky_official/.
Configurations are in hwconf/makerx/.
Configurations are in hwconf/makerbase/.
Configurations are in hwconf/stormcore/.
Configurations are in hwconf/Ubox/.
E-bike motor controllers. Configurations are in hwconf/luna/.
Configurations are in hwconf/ENNOID/.
Additional boards in hwconf/other/:Community boards from hwconf/fungineers/, hwconf/ipm/, hwconf/itr/, hwconf/JetFleet/, hwconf/repas/, hwconf/shaman/, hwconf/teamtriforceuk/, and hwconf/tronic/ are also included.

Selecting hardware at build time

The top-level Makefile automatically discovers all hw_*.h files under hwconf/ and generates a build target for each one. To see all available targets, run:
The output lists every board name under [Firmware]. To build for a specific board, use the fw_<board> pattern:
You can also pass PROJECT directly:
Under the hood, the Makefile resolves the board name to its header and source files and passes them to the compiler:
Flash a built image directly to the target over SWD:
Some boards have a _no_limits variant (for example hw_75_100_no_limits.h). These disable the hardware safety limits on configuration parameters. They are intended for advanced use cases such as testing. The DISABLE_HW_LIMITS define sets FW_NAME to "no_hw_limits" to make it visible in VESC Tool.