Topic: compiling example.c in BSP 06.02.2015  (Read 10852 times)

ec March 13, 2015, 02:59 PM

  • Member
  • *
  • Posts: 18
When trying to compile 4fm.bsp.06.02.2015/lib4FM-1.56.1/example/example.c on Redhat 5, I type 'make', and get the following result:

cc -g -o example example.c -lm -l4FM
In file included from /usr/include/sys/time.h:29,
                 from example.c:23:
/usr/include/bits/time.h:70: error: redefinition of 'struct timeval'
In file included from /usr/include/sys/select.h:44,
                 from /usr/include/sys/time.h:31,
                 from example.c:23:
/usr/include/time.h:122: error: redefinition of 'struct timespec'
In file included from example.c:23:
/usr/include/sys/time.h:96: error: expected identifier before numeric constant
/usr/include/sys/time.h:110: error: redefinition of 'struct itimerval'
make: *** [example] Error 1

How can I fix this issue?

Thanks

arnaudNL March 16, 2015, 05:14 AM (#1)

  • 4DSP Staff (EU)
  • Administrator
  • Member
  • *****
  • Posts: 7110
Dear Sir,


The software is deprecated (it is for FM482 with QDR memory) so I would not spend too much time on that one. Your best reference is the FMC170App, this is the application prepared for you. There is also the sipmemtest for memory tests.


I hope that helps!


Best Regards,
Arnaud

ec March 16, 2015, 09:30 AM (#2)

  • Member
  • *
  • Posts: 18
Isn't the fmc170app a Windows application? We're running Linux, so I'm looking for an example I can run on Linux.
 
Thanks!

ec March 16, 2015, 10:15 AM (#3)

  • Member
  • *
  • Posts: 18
Sorry, I got the Fmc170App for Linux, but when I try to run it, it says Constellation ID not supported by this software, exiting...
 
The constellation ID is 507 (as reported after 'Start of program')
number of Stars: 8
Software Build: 0x54E44247
Firmware Build: 0x0000000
Firmware version: 0.256
 
Thanks

ec March 16, 2015, 10:34 AM (#4)

  • Member
  • *
  • Posts: 18
I changed FMC170_CONSTELLATION_ID_VP780 to 507 on line 249 of main.cpp, and the program seems to be running. Will it run correctly?
 
Thanks

tonyku March 16, 2015, 12:23 PM (#5)

  • Administrator
  • Member
  • *****
  • Posts: 196
Hi Eli,

The Constellation ID for 507 is designed to run on FM780 for FMC170.

Are you running FM780 platform?

It looks like firmware 507 was released on March 12, 2015.   The linux BSP has not been updated to have the latest FMC170 software.

I will post our latest version for FMC170 software on the next post so that you can try it out and build it.   There will be a new Linux BSP release this Friday.


Tony



tonyku March 16, 2015, 12:38 PM (#6)

  • Administrator
  • Member
  • *****
  • Posts: 196
Hi Eli,

Attached is a "temp" release for the FMC170 that should be able to connect to your FM780 with FMC170.

The official release for the Linux BSP will be out this Friday.



Tony

ec March 16, 2015, 12:42 PM (#7)

  • Member
  • *
  • Posts: 18
Yes, we are running FM780 + FMC170.
I'm not really concerned now with the 170 (though my colleague would be, so your help is appreciated), my current goal is to be able to send and receive data to the 780 board from a user application using DMA. The training materials (step 1) seems to be intended to do that, but when I run it, it fails saying could not receive random data. Training materials step 2 fails as well, saying could not find adder address (38).

Edit: I just saw that you posted the temp release, I'll give that a try.

Thanks,
Eli

ec March 16, 2015, 02:31 PM (#8)

  • Member
  • *
  • Posts: 18
I tried the new FMC170TestApp, this time it reported the constellation ID as 393 (I haven't uploaded any different firmware), and said constellation ID not supported by this software, exiting...
 
Thanks,
Eli

tonyku March 16, 2015, 03:45 PM (#9)

  • Administrator
  • Member
  • *****
  • Posts: 196


Hi Eli,

The burn in (flash memory) firmware would be the memory firmware.  When the card boots up, by default, that's what it will load (hence #393 for the CID).   So if you just power on the system, by default the memory firmware will be loaded by the flash.

If you want to test the memory (which also does DMA reads and writes) - you can run the sipmemtest with that firmware.   The mem test is availbale inside the BSP distribution.

if you want to load FMC170, then you'll have to program the FM780 via JTAG with the firmware you want through Impact or whatever Xilinx tool you are using, then do a "soft reboot".



Tony


ec March 16, 2015, 05:40 PM (#10)

  • Member
  • *
  • Posts: 18
Thanks
 
With the same configuration, I ran 'memtestip FM780 0 100 2 1' and got the following result:
 
LOOP0000000 | Bank index 0, GM780_DDR3_V1 | Could not send data
LOOP0000000 | Bank index 1, GM780_DDR3_V1 | Could not send data
LOOP0000000 | Bank index 2, GM780_DDR3_V1 | Could not send data
LOOP0000000 | Bank index 3, GM780_DDR3_V1 | Could not send data
 
Test efficiency (READ/WRITE) (including printfs, etc..) : 0.0[MB/s]
Test efficiency (DMA Read)    : nan[MB/s]
Test efficiency (DMA Write)    :0.0[MB/s]
 
Thanks

tonyku March 16, 2015, 05:52 PM (#11)

  • Administrator
  • Member
  • *****
  • Posts: 196
Um,   GM780_DDR3_V1 is not a valid type (nor is it in any code inside the memory test).    Have you guys modified the source code?

Also, the frequency should be 200 MHZ.







Thanks
 
With the same configuration, I ran 'memtestip FM780 0 100 2 1' and got the following result:
 
LOOP0000000 | Bank index 0, GM780_DDR3_V1 | Could not send data
LOOP0000000 | Bank index 1, GM780_DDR3_V1 | Could not send data
LOOP0000000 | Bank index 2, GM780_DDR3_V1 | Could not send data
LOOP0000000 | Bank index 3, GM780_DDR3_V1 | Could not send data
 
Test efficiency (READ/WRITE) (including printfs, etc..) : 0.0[MB/s]
Test efficiency (DMA Read)    : nan[MB/s]
Test efficiency (DMA Write)    :0.0[MB/s]
 
Thanks

ec March 17, 2015, 09:33 AM (#12)

  • Member
  • *
  • Posts: 18
Sorry, we have not modified the source, the GM780 was just a typo, the actual error said FM780_DDR3_V1.
 
I tried again with frequency 200 and got the same error.
 
Thanks

tonyku March 17, 2015, 11:12 AM (#13)

  • Administrator
  • Member
  • *****
  • Posts: 196
Can you attach the entire log from beginning of the run?

tonyku March 17, 2015, 11:13 AM (#14)

  • Administrator
  • Member
  • *****
  • Posts: 196

Also, please attach the log after doing this:

sudo lspci -vvv


Thanks.

Tony