| Crates.io | svd-vector-gen |
| lib.rs | svd-vector-gen |
| version | 0.1.5 |
| created_at | 2024-12-19 07:49:03.042343+00 |
| updated_at | 2024-12-23 14:21:06.440398+00 |
| description | A tool to process Microcontroller SVD files(e.g. STM32) and generate vector tables and linker scripts. |
| homepage | |
| repository | https://github.com/niekiran/svd-vector-gen.git |
| max_upload_size | |
| id | 1488882 |
| size | 3,653,553 |
This tool scans the current directory for ARM Cortex-M compatible SVD files and automatically generates:
Vector Table File (vector_<mcu>.txt):
static VECTOR_TABLE Rust array with Option<unsafe fn()> entries for each vector, including system handlers and IRQs.Device-Specific Linker Script (device_<mcu>.x):
PROVIDE entries for all interrupts as:
PROVIDE(<IRQ_NAME> = default_handler);
This facilitates linking during firmware development.cargo install svd-vector-gen
Run the tool:
svd-vector-gen
For STM32F303X.svd:
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);
...