This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Read text file contain float values !

Hello;
I'm working on STM32F446 Nucleo64, i just start use this types of hardware on Keil, so, i have a text file that contain float values, i want to read this text file and and save values in one vector and after i will apply my work on this vector, i have some questions:
1- Can i read the text file from my PC !
2- Can i read the text file from usb !
3- Can i upload (copy) the text file in the memory of the memory of hardware board !

What is the best way to this !! any ideas, any links !

Thanks in advance.

  • The Nucleo provides for a Virtual COM Port (VCP), you'd likely want to utilize this in a Terminal application to send and receive data to/from the board.

    The mbed firmware in the ST-LINK provides for an MSC, but I'm not sure how you would use that to write a file to the board. The board isn't going to be able to initiate a file read on the PC.

    You could perhaps use a script file to process your text file containing floats to generate a .C or .H file containing an array of floats which you could compile into your program.