Could you specify exactly what you need?
Giovanni
ADC configuration tool
Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: ADC configuration tool
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:
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:
Code: Select all
STM32F030x4
Last edited by ceremcem on Mon Aug 24, 2020 5:19 pm, edited 1 time in total.
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: ADC configuration tool
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
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
For those who might be interested in, here is the code I use to extract the supported types (Linux, Bash):
Currently 135 entries generated.
Code: Select all
find -name stm32_registry.h -exec cat {} \; \
| tr ' ' '\n' \
| grep -oP '(?<=defined\()STM32.+(?=\))' \
| sort \
| uniq
Currently 135 entries generated.
-
- Posts: 483
- Joined: Sat Nov 19, 2011 6:47 pm
- Location: Le Mans, France
- Has thanked: 21 times
- Been thanked: 30 times
Re: ADC configuration tool
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
https://github.com/ChibiOS/ChibiOS-Cont ... x2board.py
Who is online
Users browsing this forum: No registered users and 40 guests