cancel
Showing results for 
Search instead for 
Did you mean: 

Rant: Why do G4 headers still use uint32_t in #define?

Uwe Bonnes
Principal III

Hello,

I have reported several time about the miss-use of uint32_t in #define. With G4, STM coders had the chance to get things right from the start. However they did not use the chance. Must every device group at STM make its own errors and does not learn from other groups?

Please remove uint32_t from #define.

And have a look at trailing whitespace. All headers are sprankled with trailing whitespace...

6 REPLIES 6
Imen.D
ST Employee

Hello @Uwe Bonnes​ ,

>> And have a look at trailing whitespace. All headers are sprankled with trailing whitespace...

Can you please provide more details, or example regarding this feedback.

Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Uwe Bonnes
Principal III

There are lot of definitions like

> stm32g484xx.h:#define SYSCFG_SWPR_PAGE31_Msk        (uint32_t)(0x1UL << SYSCFG_SWPR_PAGE31_Pos)

The (uint32_t) cast is superfluous. A defintion like

/stm32g484xx.h:#define SYSCFG_SWPR_PAGE31_Msk        (0x1UL << SYSCFG_SWPR_PAGE31_Pos)

is enough. The superfluous cast also inhibits some constructs like

#If (bla) < SYSCFG_SWPR_PAGE31_Msk

Uwe Bonnes
Principal III

Probably I miss-interpreted the DOS Line-endings (CR + LF) that triggered git log --check warnings. I do not see any real trailing whitesspace any more.

Imen.D
ST Employee

Thanks @Uwe Bonnes​  for this clarification.

Your feedback is reported internally to fix in the coming release.

Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Uwe Bonnes
Principal III

STMicroelectronics ST-LINK GDB server. Version 5.3.2 now understands the -a option

Uwe Bonnes
Principal III

Sorry, please disregard, wrong thread.