svd-vector-gen-0.1.1 is not a library.
SVD Vector and Linker Script Generator
This tool scans the current directory for ARM Cortex-M compatible SVD files and automatically generates:
-
Vector Table File (
vector_<mcu>.txt):- Contains the vector table for the specified microcontroller with system exceptions and interrupt handlers.
- Format: A
static VECTOR_TABLERust array withOption<unsafe fn()>entries for each vector, including system handlers and IRQs.
-
Device-Specific Linker Script (
device_<mcu>.x):- Defines
PROVIDEentries for all interrupts as:
This facilitates linking during firmware development.PROVIDE(<IRQ_NAME> = default_handler);
- Defines
Usage
- Place your SVD files in the project directory.
- Run the program using:
- The tool generates:
vector_<mcu>.txt: Contains the vector table for each SVD file, including system exceptions and interrupt handlers.device_<mcu>.x: Linker script withPROVIDEentries for IRQs, such as:PROVIDE(WWDG = default_handler); PROVIDE(PVD = default_handler); PROVIDE(TAMPER = default_handler);
Example
For STM32F303X.svd:
- Generated Files:
vector_STM32F303X.txt: Contains the vector table.device_STM32F303X.x: Contains the linker script:PROVIDE(WWDG = default_handler); PROVIDE(PVD = default_handler); PROVIDE(TAMPER = default_handler); ...