Forums

Regarding file management

Started by swaroop October 1, 2002
hi

I want to print all my outputs in a file, by opening a file in my C
application. But this codewarrior is compiling successfully but
unable to link . Iam getting linking errors like

Link Error : Undefined : "Ffopen"
Referenced from "Fmain" in main.c

Link Error : Undefined : "Ffprintf"
Referenced from "Fmain" in main.c

Link failed.

what i must do to open a file through my C application and print my
outputs in that file. Actually where is the problem? Is this
codewarrior wont support file management. Suggest me a way .

Thanking you all in advance,

Yours Sincerely,
Siva Swaroop Marrapu




swaroop wrote:

> I want to print all my outputs in a file, by opening a file in my C
> application. But this codewarrior is compiling successfully but
> unable to link . Iam getting linking errors like
>
> Link Error : Undefined : "Ffopen"
> Referenced from "Fmain" in main.c
>
> Link Error : Undefined : "Ffprintf"
> Referenced from "Fmain" in main.c
>
> Link failed.
>
> what i must do to open a file through my C application and print my
> outputs in that file. Actually where is the problem? Is this
> codewarrior wont support file management. Suggest me a way .

The reason you are getting these link errors is because you are not using
the stationery that includes host i/o. I'm not sure what version of
CodeWarrior for DSP you are using, but in CodeWarrior for DSP R5.0, the
hardware targeted stationery comes with the following targets pre-defined:

external RAM (mode 3)
ext RAM (mode 3) w/hostio
flash pxROM w/int xRAM
flash pxROM w/ext xRAM
flash pROM xROM-to-RAM
build all

The target ext RAM (mode 3) w/hostio is the only target that includes
support for the majority of stdio calls. The other targets include a
minimal "thin" printf, but other stdio is stripped out to maximize
performance.

This is discussed in the Targeting_DSP56800.pdf on page DSP-256, I've
included the text below:

MSL C 56800.lib
This library provides standard C library support without standard
I/O. A minimal "thin" printf is provided but other stdio is
stripped out in order to maximize performance. The printf sends
characters to the CodeWarrior console window via the debugger.
Use this library for when you need minimal printf support for
debugging and to save space.

MSL C 56800 host I/O.lib
This library adds ANSI/ISO standard I/O support through the
debugger. The standard C library I/O is supported, including
stdio.h, sdderr.h, and stdin.h. Use this library when you
want to perform stdio calls, including CodeWarrior console
stdout/stdin, and host machine file I/O, for debugging.

The Targeting_DSP56800 goes on to discuss file i/o in a little more detail
on page DSP-257.

Hope this info helps!

John via Ron
--
Do what you do best and let Metrowerks do the rest !!
http://www.metrowerks.com/MW/Services/SSG/default.htm

Metrowerks, maker of CodeWarrior - "Software Starts Here"
Ron Liechty - - http://www.metrowerks.com




If you use older version of the CodeWarrior, or would like to have I/O
functionality with other CW stationeries, you can use SDK FileIO
utilities, which will add some additional code to your application, and
will perform File I/O functionality over serial port (you can read
associated SDK documentation).

CodeWarrior I/O, on the other hand, uses JTAG to perform this task, so
it will not bring additional code into your application, but it will run
much slower vs. SDK FileIO's serial communication.

Sincerely,

Leonard N. Elevich
Motorola DSPO

-----Original Message-----
From: MW Ron [mailto:]
Sent: Tuesday, October 01, 2002 10:49 AM
To:
Subject: [motoroladsp] Re: Regarding file management

swaroop wrote:

> I want to print all my outputs in a file, by opening a file in my C
> application. But this codewarrior is compiling successfully but
> unable to link . Iam getting linking errors like
>
> Link Error : Undefined : "Ffopen"
> Referenced from "Fmain" in main.c
>
> Link Error : Undefined : "Ffprintf"
> Referenced from "Fmain" in main.c
>
> Link failed.
>
> what i must do to open a file through my C application and print my
> outputs in that file. Actually where is the problem? Is this
> codewarrior wont support file management. Suggest me a way .

The reason you are getting these link errors is because you are not
using
the stationery that includes host i/o. I'm not sure what version of
CodeWarrior for DSP you are using, but in CodeWarrior for DSP R5.0, the
hardware targeted stationery comes with the following targets
pre-defined:

external RAM (mode 3)
ext RAM (mode 3) w/hostio
flash pxROM w/int xRAM
flash pxROM w/ext xRAM
flash pROM xROM-to-RAM
build all

The target ext RAM (mode 3) w/hostio is the only target that includes
support for the majority of stdio calls. The other targets include a
minimal "thin" printf, but other stdio is stripped out to maximize
performance.

This is discussed in the Targeting_DSP56800.pdf on page DSP-256, I've
included the text below:

MSL C 56800.lib
This library provides standard C library support without standard
I/O. A minimal "thin" printf is provided but other stdio is
stripped out in order to maximize performance. The printf sends
characters to the CodeWarrior console window via the debugger.
Use this library for when you need minimal printf support for
debugging and to save space.

MSL C 56800 host I/O.lib
This library adds ANSI/ISO standard I/O support through the
debugger. The standard C library I/O is supported, including
stdio.h, sdderr.h, and stdin.h. Use this library when you
want to perform stdio calls, including CodeWarrior console
stdout/stdin, and host machine file I/O, for debugging.

The Targeting_DSP56800 goes on to discuss file i/o in a little more
detail
on page DSP-257.

Hope this info helps!

John via Ron
--
Do what you do best and let Metrowerks do the rest !!
http://www.metrowerks.com/MW/Services/SSG/default.htm

Metrowerks, maker of CodeWarrior - "Software Starts Here"
Ron Liechty - - http://www.metrowerks.com _____________________________________
Note: If you do a simple "reply" with your email client, only the author
of this message will receive your answer. You need to do a "reply all"
if you want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:

To Post:

To Leave:

Archives: http://www.yahoogroups.com/group/motoroladsp

More Groups: http://www.dsprelated.com/groups.php3 ">http://docs.yahoo.com/info/terms/