From: nola94 on
hi all,
i am using spartan 3e starter kit and i want to save the data captured from
onboard adc(14 bit word) to a text file...at the moment i use edk and write
my results on the screen through rs232 using microblaze...how i can save
the data in a text file?
i tried by using fprintf but i get the following errors:

TestApp_Memory_microblaze_0/src/TestApp_Memory.c:53: warning: assignment
makes pointer from integer without a cast
/opt/Xilinx/11.1/EDK/gnu/microblaze/lin64/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld:
region ilmb_cntlr_dlmb_cntlr is full
(TestApp_Memory_microblaze_0/executable.elf section .text)
/opt/Xilinx/11.1/EDK/gnu/microblaze/lin64/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld:
section .init [00000050 -> 00000077] overlaps section .text [00000050 ->
00010627]
/opt/Xilinx/11.1/EDK/gnu/microblaze/lin64/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld:
section .fini [00000078 -> 00000097] overlaps section .text [00000050 ->
00010627]
/opt/Xilinx/11.1/EDK/gnu/microblaze/lin64/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld:
section .rodata [00000098 -> 00000a23] overlaps section .text [00000050 ->
00010627]
/opt/Xilinx/11.1/EDK/gnu/microblaze/lin64/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld:
section .sdata2 [00000a24 -> 00000a27] overlaps section .text [00000050 ->
00010627]
/opt/Xilinx/11.1/EDK/gnu/microblaze/lin64/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld:
section .data [00000a28 -> 00000f5b] overlaps section .text [00000050 ->
00010627]
/opt/Xilinx/11.1/EDK/gnu/microblaze/lin64/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld:
section .ctors [00000f5c -> 00000f63] overlaps section .text [00000050 ->
00010627]
/opt/Xilinx/11.1/EDK/gnu/microblaze/lin64/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld:
section .dtors [00000f64 -> 00000f6b] overlaps section .text [00000050 ->
00010627]
/opt/Xilinx/11.1/EDK/gnu/microblaze/lin64/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld:
section .eh_frame [00000f6c -> 00000f6f] overlaps section .text [00000050
-> 00010627]
/opt/Xilinx/11.1/EDK/gnu/microblaze/lin64/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld:
section .jcr [00000f70 -> 00000f73] overlaps section .text [00000050 ->
00010627]
/opt/Xilinx/11.1/EDK/gnu/microblaze/lin64/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld:
section .bss [00000f78 -> 00000feb] overlaps section .text [00000050 ->
00010627]
/opt/Xilinx/11.1/EDK/gnu/microblaze/lin64/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld:
section .heap [00000fec -> 000011ef] overlaps section .text [00000050 ->
00010627]
/opt/Xilinx/11.1/EDK/gnu/microblaze/lin64/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld:
section .stack [000011f0 -> 000015ef] overlaps section .text [00000050 ->
00010627]
/opt/Xilinx/11.1/EDK/gnu/microblaze/lin64/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld:
TestApp_Memory_microblaze_0/executable.elf: section .text lma 0x50 overlaps
previous sections
/opt/Xilinx/11.1/EDK/gnu/microblaze/lin64/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld:
TestApp_Memory_microblaze_0/executable.elf: section .fini lma 0x78 overlaps
previous sections
/opt/Xilinx/11.1/EDK/gnu/microblaze/lin64/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/bin/ld:
TestApp_Memory_microblaze_0/executable.elf: section .rodata lma 0x98
overlaps previous sections
/opt/Xilinx/11.1/EDK/gnu/microblaze/lin64/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/crtend.o:(.init+0x0):
relocation truncated to fit: R_MICROBLAZE_32_PCREL_LO against `.text'
collect2: ld returned 1 exit status
make: *** [TestApp_Memory_microblaze_0/executable.elf] Error 1
Done!

Any suggestions?
Is it possible to do it using vhdl?


From: TSMGrizzly on
I'm a little bit confused-- Why are you using the microblaze-xilinx-
elf targeted gcc to compile what should be the PC-side application
where you want to do fprintf?
What does your source code look like?

I've never used microblaze, but my assumption is that you'd want to
use the microblaze gcc only to compile that code that goes onto your
microblaze on the FPGA.
Then you could compile a regular C (or other language) program on the
computer to send commands to your FPGA board and listen for data
coming back, which can then be easily written to a text file for later
analysis.

Personally I like to use Python to do this, though, because once you
have pyserial installed, the serial port routines are a breeze to work
with.. and matplotlib is nice for graphing results, too.

Writing to a text file with VHDL is useful to log results from a
simulation, not from an actual running chip.
From: glen herrmannsfeldt on
TSMGrizzly <sbattazz(a)yahoo.co.jp> wrote:
> I'm a little bit confused-- Why are you using the microblaze-xilinx-
> elf targeted gcc to compile what should be the PC-side application
> where you want to do fprintf?
> What does your source code look like?

Well, one could connect up some device to an FPGA mircoblaze
that one could fprintf to. A serial printer might not be so
hard, a little harder for a disk drive and file system.
Maybe NFS through ethernet wouldn't be so bad, either.

> I've never used microblaze, but my assumption is that you'd want to
> use the microblaze gcc only to compile that code that goes onto your
> microblaze on the FPGA.
> Then you could compile a regular C (or other language) program on the
> computer to send commands to your FPGA board and listen for data
> coming back, which can then be easily written to a text file for later
> analysis.

Yes, it doesn't seem that the OP has such attached to the microblaze.

-- glen
From: austin on
Why not,

Just use Hyperterminal in the capture mode to record everything coming
in on the RS232 port from the uart?

Then use a text editor, perl script, or whatever to extract the
information you want (if it needs filtering).

I am presuming the text file resides on the same computer the RS232 is
connected to, so this just makes more sense that what you seem to be
doing.

Austin
From: nola94 on
hi all,
thanx for your reply...
i finally figure out how to save the data in txt files..I used sjinn linux
application and xil_print to my c program in microblaze..
however,i am not able to save all samples that adc outputs..my fsm make the
onboard adc to give 1 sample every 700ns...
Is microblaze fast enough to capture these data?
Do i need some external ram to save first data and transfer them
afterwards?
thanx in advance,
i really appreciate it..


---------------------------------------
This message was sent using the comp.arch.fpga web interface on
http://www.FPGARelated.com