HI
I am a newbie to 'C' and embedded application . I have a code in which the input parameter is being assigned in two ways

(i) Runtime through user
(ii) parameter tile

the problem is, i can't give the runtime input as am a in need of creating a standalone product without user interaction.

the parameters in the parameter file is assigned as the input by "FILE" pointer concepts which is stored in some "D:\input \parameter.par" .
But, i could not store the parameter file in my kit memory and use "FILE" pointer concepts.
Is it possible for me to use "FILE" pointer concepts in my programming. If it is so how can i store the parameter.par file in the kit's memory.
I tried with some unsigned char * instead of "FILE" pointer but it works somewhat .


Help me in this regard,

aswini

Recommended Answers

All 3 Replies

what compiler and operating system ? There are lots (if not hundreds) of different embedded operating systems.

>>parameter.par
no idea what that file contains.

In C and C++ languages, a FILE is a structure that is defined in stdio.h and pointers to it are passed to the functions that are also identified in stdio.h. If that is what you are talking about and you don't know how to use FILE then you are not ready to tackle your program. You first need to study some good tutorials or books, or take a college class in C or C++.

>Is it possible for me to use "FILE" pointer concepts in my programming.
It really depends on what kind of embedded program you're writing. If this is a freestanding implementation (not hosted by an OS), you're not guaranteed to have the stdio library at all. In that case if you want to use FILE pointers, you have to write the abstraction yourself. If your compiler supports stdio, I can't imagine what your problem could be unless you have absolutely zero experience with C (in which case I would wonder why you're even writing embedded code in the first place).

Hi,
Thank you for replying me. Yes my board has the OS with stdio library,but as am new to embedded applications and trying to implement the code which sets right when i connect the kit with system.My end application needs without the system(only kit),inwhich i have to retrive the data from the parameter file which is in some "D:\para\exam.par". How can i store the exam.par file in my kit's raw SDRAM memory and retrive as i retrive in system using the FILE pointers.

Help me in this regard
aswini

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.