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

store data in a file

hi sir, I am using stm32f103 for real time application .I want to store the output values in a file in PC that i am having in array .how to approach for this??

Parents
  • How exactly do you think this is going to happen? Are you planning on writing an application that runs on the PC, are you transmitting the data via a serial port or something?

    If you have a SD Card attached to your embedded board, you could writes some drivers for that and layer that with something like FatFs or the Keil equivalent.

    I think you should get a better grasp of what embedded systems can and can't do, and what software development work you will be responsible for. This might require you write some applications and drivers on both the host and target systems.

Reply
  • How exactly do you think this is going to happen? Are you planning on writing an application that runs on the PC, are you transmitting the data via a serial port or something?

    If you have a SD Card attached to your embedded board, you could writes some drivers for that and layer that with something like FatFs or the Keil equivalent.

    I think you should get a better grasp of what embedded systems can and can't do, and what software development work you will be responsible for. This might require you write some applications and drivers on both the host and target systems.

Children
  • thanks a lot for reply. that means what i have to do now is to transfer data of array to host PC by serial port programming ? is it so?

  • That's certainly one approach.

    You could use printf() on the target to format the data in a manner you want, and then use a terminal app to pipe that data for a file on the host pc.

    You could also transmit blocks of data using X/Y-Modem.

    You could also format your data into a structure/packet and transmit that.

    What kind of programming or computer science foundation do you have?

  • thanks, i am using c coding in keil microvision4.sir,
    problem:-while using printf the program counter is not entering to the main() function . what is the purpose of retarget.c in blinky project of keil? Is it for file handling ?
    can't we do file handling here ?

  • I thought we went over that before. The primary purpose is to bind STDIO file streams to specific resources on board your using. The serial example binds to the USART hardware of the STM32. If your board permitted the connection of a keyboard, you could perhaps interface to that. Thus you now get the scanf(), printf() functionality you expect, and Keil C runtime libraries don't need to know anything about of oddities of your hardware, and are thus generic.

    It might permit other FILE based IO, but at that level you're basically adding another level of abstraction to the file system and mass storage drivers you are going to have to supply.

    There might be other semihosting features, but I can't sell systems that are tied to a debugger, and so haven't focused on them. The primary goal with this kind of embedded development is to build free standing systems, which have just enough OS and other resources to get the job done.