2024-01-03 02:18 AM
Hi everyone,
I'm trying to open an image as a .csv or .bmp file in STM32CubeIDE. I've already tried different ways of reading the file but none of them would actually work. When I build the project the output gives no errors but when debugging, the file seems to be NULL. Should I add the .csv or .bmp file to the Src folder?
How should I import a .csv format file?
B.t.w, this is the code I wrote to open the file:
Thank you all in advance.
2024-01-03 03:02 AM - edited 2024-01-03 03:05 AM
Use semihosting. Please see: https://community.st.com/t5/stm32-mcus/how-to-use-semihosting-with-stm32cubeide-and-stm32/ta-p/49742
Use absolute file paths because relative filenames with the semihosting are relative to the debugger directory, not to the project.
2024-01-03 05:18 AM
Thanks @Pavel A. I will definitely try this out. Is there any other way to read a .csv file?
2024-01-03 01:18 PM
@iker_arrizabalaga Yes definitely. I know one guy who writes parsers for csv and other text files in VHDL and programs this in FPGA. Your imagination is the limit.
2024-01-03 01:40 PM
The alternative is to have the file on the Target by way of a Micro SD Card, or USB Flash Drive, and driven by FATFS File System or Microsoft's equivalent.