2016-03-10 07:14 AM
STM32 device headers use e.g.
#define FLASH_BASE ((uint32_t)0x08000000U) /*!< FLASH(up to 1 MB) base address in the alias region */ while e.g. Freescale uses in a similar situation #define ADC0_BASE (0x4003B000u) The usage of the (uint32_t) cast by ST denied to use FLASH_BASE in preprocessor expressions. Please consider dropping the sometimes harmfull (uint32_t) cast where not explicit needed!2016-03-11 02:09 AM
Hi bonnes.uwe,
Thanks for your feedback, I will report this to the team. -Hannibal-2016-03-31 04:20 AM
Hi bonnes.uwe,
Your feedback will be implimented in the new release. Thanks for the contribution.-Hannibal-2016-03-31 05:05 AM
Using macro sufix and cast to uint32 is double solution.
First st add cast in last revision add ''U'' for misra compilance. This is chaotic.2016-04-13 03:31 AM
I can confirm the confusion.
2016-11-30 04:45 AM
A construct like ((uint32_t)0x08000000U is still used in some places in the most recent Cube library update, e.g. in the L4 library in all xxx_BASE definitions and
for F4 in the F423 AES definitions.2016-11-30 04:56 AM
> A construct like ((uint32_t)0x08000000U is still used in some places in the most recent Cube library update, ...
I'd guess as a kowtow towards (potential) MISRA-obsessed automotive customers ...