stm32 mcuconf templates have multiple processor definitions Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
faisal
Posts: 189
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 27 times
Been thanked: 21 times

stm32 mcuconf templates have multiple processor definitions  Topic is solved

Postby faisal » Wed Nov 07, 2018 6:10 pm

Looking at the mcuconf.h.ftl files in trunk, there are multiple processor definitions symbols defined for specific processors. For example, in the stm32L476, is defines STM32L4xx_MCUCONF, STM32L476_MCUCONF, and STM32L486_MCUCONF. I could imagine the L4xx having a place there - but not the STM32L486.

There is a similar problem with the L496, f413, f746, and L432. There are other ones like the F72xxx templates that define all the various processors under there like F722, 732, 723, 733. Is the idea for the user to go back in the delete the ones that are not applicable? That is understandable, but if the template is explicitly for a specific processor (as described in the first paragraph), then the other processor defines shouldn't be there.

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

Re: stm32 mcuconf templates have multiple processor definitions

Postby Giovanni » Wed Nov 07, 2018 7:42 pm

It is intentional, is done when a mcuconf.h file is compatible with multiple devices, there is no need to remove anything.

If you remove definitions then the updater will no more able to update the file.

Giovanni

faisal
Posts: 189
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 27 times
Been thanked: 21 times

Re: stm32 mcuconf templates have multiple processor definitions

Postby faisal » Wed Nov 07, 2018 8:31 pm

Giovanni wrote:It is intentional, is done when a mcuconf.h file is compatible with multiple devices, there is no need to remove anything.

If you remove definitions then the updater will no more able to update the file.

Giovanni


I see. I've been using the XXXXX_MCUCONF symbols to configure non-portable portions of my code for different processors. I guess I shouldn't rely on that and instead use the #define generated by board/subtype in board.chcfg ?

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

Re: stm32 mcuconf templates have multiple processor definitions

Postby Giovanni » Wed Nov 07, 2018 8:52 pm

Correct, the definition in board.h is unique, it is what you need to use to identify the device.

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 8 guests