Skip to main content
Uwe Bonnes
Chief
April 25, 2019
Question

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

  • April 25, 2019
  • 6 replies
  • 938 views

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...

This topic has been closed for replies.

6 replies

ST Technical Moderator
October 3, 2019

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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Uwe Bonnes
Chief
October 3, 2019

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
Chief
October 3, 2019

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.

ST Technical Moderator
October 4, 2019

Thanks @Uwe Bonnes​  for this clarification.

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

Regards,

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Uwe Bonnes
Chief
November 4, 2019

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

Uwe Bonnes
Chief
November 4, 2019

Sorry, please disregard, wrong thread.