Yet another board config generator

This forum is about you. Feel free to discuss anything is related to embedded and electronics, your awesome projects, your ideas, your announcements, not necessarily related to ChibiOS but to embedded in general.
User avatar
kimmoli
Posts: 23
Joined: Sat Oct 01, 2016 8:02 pm
Has thanked: 9 times
Been thanked: 8 times
Contact:

Yet another board config generator

Postby kimmoli » Wed Aug 09, 2017 4:10 pm

..or actually iomap.h generator, as i have split board.h to two files, board.h and iomap.h

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
Image

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
Image

And edit the pins, one by one, or set multiple pins at once.
Image

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)

Return to “User Projects”

Who is online

Users browsing this forum: No registered users and 1 guest