ADC configuration tool

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: utzig, lbednarz, tfAteba, barthess, RoccoMarco

User avatar
Giovanni
Site Admin
Posts: 13074
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 758 times
Been thanked: 637 times
Contact:

Re: ADC configuration tool

Postby Giovanni » Mon Aug 24, 2020 3:16 pm

Could you specify exactly what you need?

Giovanni

ceremcem
Posts: 66
Joined: Mon Aug 10, 2015 6:57 am
Has thanked: 6 times
Been thanked: 6 times

Re: ADC configuration tool

Postby ceremcem » Mon Aug 24, 2020 4:17 pm

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:

Code: Select all

STM32F030x4
Last edited by ceremcem on Mon Aug 24, 2020 5:19 pm, edited 1 time in total.

User avatar
Giovanni
Site Admin
Posts: 13074
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 758 times
Been thanked: 637 times
Contact:

Re: ADC configuration tool

Postby Giovanni » Mon Aug 24, 2020 5:18 pm

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

ceremcem
Posts: 66
Joined: Mon Aug 10, 2015 6:57 am
Has thanked: 6 times
Been thanked: 6 times

Re: ADC configuration tool

Postby ceremcem » Mon Aug 24, 2020 9:54 pm

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.


Return to “General Support”

Who is online

Users browsing this forum: No registered users and 4 guests