Expand description
HAL code generation.
Turns a validated Config into two C files:
nucleus_config.h— a typed config struct per peripheral plusexternHAL handle declarations and theNucleus_Init()prototype.nucleus_init.c— the resolved config struct instances, the handle definitions, and a singleNucleus_Init()that enables GPIO clocks, configures the alternate-function muxing (using AF numbers resolved fromnucleus_db), and calls the stock ST HALHAL_*_Initfunctions.
Architectural rule (README): the generated code never reimplements the
HAL. It only calls Init functions with resolved parameters, so a HAL
point-release that changes internals does not break Nucleus output. The
tested HAL family is STM32F4 (stm32f4xx_hal.h).
Codegen assumes the config already passed crate::solver::solve; it skips
unmodelled peripheral kinds and pins it cannot resolve rather than failing.
Structs§
- Generated
- The generated C sources for a project.
Functions§
- generate
- Generate
nucleus_config.handnucleus_init.cforconfig.