Page 1 of 1

stm32 mcuconf templates have multiple processor definitions  Topic is solved

Posted: Wed Nov 07, 2018 6:10 pm
by faisal
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.

Re: stm32 mcuconf templates have multiple processor definitions

Posted: Wed Nov 07, 2018 7:42 pm
by Giovanni
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

Re: stm32 mcuconf templates have multiple processor definitions

Posted: Wed Nov 07, 2018 8:31 pm
by faisal
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 ?

Re: stm32 mcuconf templates have multiple processor definitions

Posted: Wed Nov 07, 2018 8:52 pm
by Giovanni
Correct, the definition in board.h is unique, it is what you need to use to identify the device.

Giovanni