Skip to main content
LPode.1
Associate II
Jan 21, 2021 6:31 PM UTC
Question

Hi, I need to force compiler option to signed char type as I porting a big project to stm32. Sorry but I not see how to do. :) Thanks

..

This topic has been closed for replies.

10 replies

LPode.1
LPode.1Author
Associate II
Jan 21, 2021 6:39 PM UTC

option to force UNSIGNED CHAR

KnarfB
Super User
Jan 21, 2021 7:01 PM UTC

depends on the compiler you are using

LPode.1
LPode.1Author
Associate II
Jan 21, 2021 7:13 PM UTC

Thanks for your reply!

I using STM32CubeIDE for stm32F446, in the properties settings I see toolchain set to GNU tools for STM32

KnarfB
Super User
Jan 21, 2021 7:20 PM UTC

-funsigned-char

LPode.1
LPode.1Author
Associate II
Jan 21, 2021 7:31 PM UTC

:) BIG THANKS

Where should be added?

I trying in Properties->C/C++ Build->Settings->Tool Settings->MCU GCC Compiter->Miscellaneous->Other flags

but not works

KnarfB
Super User
Jan 21, 2021 7:33 PM UTC

can you give a source code line example what didn't work and what is the compiler message

KnarfB
Super User
Jan 21, 2021 8:03 PM UTC

That's another warning. char remains a separate type and so that warning remains regardless of signed/unsigned.

LPode.1
LPode.1Author
Associate II
Jan 21, 2021 8:11 PM UTC

:thumbs_up: Thanks