Presenting this here, as if there is enough interest, i might publish/open source it.
(only Windows, sorry)
It is made primary for DxDesigner (PADS) tool, but easily adapted to anything as the interface is via text in clipboard.
Brief explanation:
From DxDesigner schematics, you select STM32 symbol(s) and list connected nets
Then you copy the output to clipboard, like
Nets connected to component : $2I168
PIN 'PD12' is connected to NET 'GPIO3_EXTI_G1'
PIN 'PD11' is connected to NET 'LED_DEBUG'
PIN 'PD9' is connected to NET 'USART_RX'
PIN 'PD8' is connected to NET 'USART_TX'
PIN 'PD6' is connected to NET 'USART2_RX'
...
and paste it to generator
And edit the pins, one by one, or set multiple pins at once.
And saves iomap.h (which is included from board.h). Now your pin names are same'ish as your net names in schematic.
Code: Select all
#ifndef IOMAP_H
#define IOMAP_H
/*
* IO pins assignments.
*/
#define GPIOA_PA0_WDKICK 0U
#define GPIOA_PA1_P5_REF_CLK 1U
#define GPIOA_PA2_MDIO 2U
#define GPIOA_PA3_PHYRESET_N 3U
#define GPIOA_PA4_WDOGDIS_ST_N 4U
#define GPIOA_PA5_NC 5U
#define GPIOA_PA6_NC 6U
#define GPIOA_PA7_P5_CRX_DV 7U
It can't parse iomap.h back, but it can save io configuration as tab separated file (.tsv)