cancel
Showing results for 
Search instead for 
Did you mean: 

Float value print using printf using stcubeMx generated code

HARI krishna
Associate II
Posted on June 01, 2017 at 07:51

Hi all,

I am using stm32f030RC controller,for my application need to print the float values on the hyperterminal.Printf is working fine for text,charters & interger values.i am using stm32cubemx generated code & atollic true studio .

Here is code what i done for printf:

int _write(int32_t file, uint8_t *ptr, int32_t len)

{

int n;

for(n=0;n<len;n++)

HAL_UART_Transmit(&huart2,(uint8_t*)(ptr++),1,1000);

/* Implement your write code here, this is used by puts and printf for example */

return len;

}

after googling tried to change the build settings but it was not worked for me.

1 REPLY 1
Posted on June 01, 2017 at 13:49

So it sounds like a check box item to load the right library, add floating point support, or use a full printf support package rather than a feature limited one.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..