Skip to main content
HARI krishna
Associate III
June 1, 2017
Question

Float value print using printf using stcubeMx generated code

  • June 1, 2017
  • 1 reply
  • 707 views
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.

    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    June 1, 2017
    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 VenmoUp vote any posts that you find helpful, it shows what's working..