Skip to main content
Associate II
December 29, 2025
Solved

Import (Read) a windows data file

  • December 29, 2025
  • 1 reply
  • 339 views

HI all

I'd like to know how to be able to read a data file from windows.

I have to convert those data (binary) from windows system, to another format, and then write them to a flash W25Q.

The only part I'm missing is how to open then read those bin files in windows. I have around 100 of those windows files to work on, and they are on the same windows folder.

So what are my options to do that.

Thanks all.

For now I'm using a Nucleo-L432KC, on STMcube 1.19.0.

Best answer by Andrew Neil

If you already have a PC program to do the conversion, why not just use it?

 

Yes, ST has examples of using SD-Cards; eg, with FatFs - check in CubeMX...

1 reply

Andrew Neil
Super User
December 29, 2025

@Dany0 wrote:

I have to convert those data (binary) from windows system,


What files?

Why does the conversion need to be done on the STM32?

Wouldn't it make more sense to do the conversion on the Host, and then simple transmit the data to the STM32?

 

You could look at Semihosting - a way for an embedded Target to access the Host file system; eg,

How to use semihosting with STM32CubeIDE and STM32.

 

Or ways to transfer the data to the host; eg,

  • UART
  • USB
  • SD-Card
  • Network (wired or wireless)
  • Bluetooth
  • etc, etc, ...
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Dany0Author
Associate II
December 29, 2025

The idea is that I've made a VB6 program to convert pictures ".BMP" to 5-6-5 format,  name ".TFT", using WIN7 a

long time ago and then save those files in a W25Q flash device to be inserted in a homemade board having Microchip processor.

 

Since I have to upgrade to STM32 for faster and bigger flash memory board using WIN10, I don.t want to use the "VB6 Converter" anymore, but be able to do all this from inside the STM L432KC.

Using UART and USB I think that I still will need a Windows program to send those 100 files, anyway.

But SD-card could be useful, I'll look for that option.

Any idea for a simple SD-card reader function ?

 

Thanks

 

 

Andrew Neil
Andrew NeilBest answer
Super User
December 29, 2025

If you already have a PC program to do the conversion, why not just use it?

 

Yes, ST has examples of using SD-Cards; eg, with FatFs - check in CubeMX...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.