Page 2 of 2
Re: ADC configuration tool
Posted: Mon Aug 24, 2020 3:16 pm
by Giovanni
Could you specify exactly what you need?
Giovanni
Re: ADC configuration tool
Posted: Mon Aug 24, 2020 4:17 pm
by ceremcem
There are 1162 MCU definitions in STM database and around 144 MCU family definitions (or less?) in ChibiOS. In order to generate board.h dynamically, I need to map the exact MCU type (eg. "STM32F030F4Px") to the corresponding ChibiOS family definition (eg. "STM32F030x4"), or display an error if that MCU is not supported by ChibiOS.
To achieve this, I need to have the ChibiOS "MCU type" list. Every line should contain exactly what we should write one of them into the board.h, like:
Re: ADC configuration tool
Posted: Mon Aug 24, 2020 5:18 pm
by Giovanni
Hi,
Then the best thing is to parse the stm32_registry.h files, search for "defined(STM32xxxxx)" and you get exactly the list of devices who are supported in HAL as to be written in board.h.
Giovanni
Re: ADC configuration tool
Posted: Mon Aug 24, 2020 9:54 pm
by ceremcem
For those who might be interested in, here is the code I use to extract the supported types (Linux, Bash):
Code: Select all
find -name stm32_registry.h -exec cat {} \; \
| tr ' ' '\n' \
| grep -oP '(?<=defined\()STM32.+(?=\))' \
| sort \
| uniq
Currently 135 entries generated.
Re: ADC configuration tool
Posted: Sat Nov 21, 2020 12:18 pm
by mobyfab
Seems like your tool does the same thing as the one I made except I use the STM32CubeMX file instead of specifying everything by hand
https://github.com/ChibiOS/ChibiOS-Cont ... x2board.py
Re: ADC configuration tool
Posted: Sat Nov 21, 2020 12:34 pm
by ceremcem
Wow, you have defined a bunch of other peripherals too. I can port your logic to Chibi Configurator and that will be a huge convenience. Thank you.