FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
5892 Discussions

ViP Example using the Cyclone III Development board

Altera_Forum
Honored Contributor II
1,184 Views

I am experienced with FPGA development, but new to the SoC process. I just acquired the EP3C120F780 Development kit with the Bitec boards and am attempting to get the Video and Image Processing Design Example to work. The AN427 Application Note is very good, but I have a couple of problems. 

 

The first time though the process, when the project is built, it loads fine. I don't get any video out, but I am working on that. 

 

If I shut down the board and try to reload the program the next day, I receive an error. "connected system ID hash not found on target at expected base address". 

 

If I delete vip_control and rebuild the project, it works again. Am I missing some NIOS 2 step?
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
397 Views

Additional information... 

 

I deleted all the files and rebuilt the project in NIOS 2. It connects and downloads the program. 

 

I closed NIOS 2, then reopened the vip_example files. Now I have an error in main.cpp. The ISR_timer_interrupt routine gives the following error message. 

 

"Function '_builtin_stwio" could not be resolved. This is in the line IOWR_ALTERA_AVALON_TIMER_STATUS (base, 0);
0 Kudos
Altera_Forum
Honored Contributor II
397 Views

Tracked down the problem to the "io.h" include file. It has the following lines. 

 

# ifndef SYSTEM_BUS_WIDTH 

# error SYSTEM_BUS_WIDTH undefined (this line is marked "error with text") 

# endif 

 

It later makes the following definitions. 

 

# define __IO_CALC_ADDRESS_NATIVE(BASE, REGNUM)  

((void *)(((alt_u8*)BASE) + ((REGNUM) * (SYSTEM_BUS_WIDTH/8)))) 

# define IORD(BASE, REGNUM)  

__builtin_ldwio (__IO_CALC_ADDRESS_NATIVE ((BASE), (REGNUM))) 

# define IOWR(BASE, REGNUM, DATA)  

__builtin_stwio (__IO_CALC_ADDRESS_NATIVE ((BASE), (REGNUM)), (DATA)) 

 

The error I received after reloading in Eclipse is "Function '_builtin_stwio' could not be resolved. 

 

I have no idea where SYSTEM_BUS_WIDTH is defined.
0 Kudos
Altera_Forum
Honored Contributor II
397 Views

Did your NIOS Eclipse project somehow get confused and stopped using nios2-elf-gcc ? If you're really stuck, 'clean' and then 'build' and post the entire transcript output; possibly some other compiler setting is missing.

0 Kudos
Altera_Forum
Honored Contributor II
397 Views

Hi Ted! 

 

No, still using nios2-elf-gcc. But, I did the "Clean" and "Build" as you suggested. I see the following information at the end of the transcript. 

 

Info: Linking vip_control.elf 

nios2-elf-g++ -T'../vip_control_bsp//linker.x' -msys-crt0='../vip_control_bsp//obj/HAL/src/crt0.o' -msys-lib=hal_bsp -L../vip_control_bsp/ -msmallc -Wl,-Map=vip_control.map -O0 -g -Wall -EL -mno-hw-div -mhw-mul -mno-hw-mulx -o vip_control.elf obj/default/Input_Channel_Interface.o obj/default/Output_Channel_Interface.o obj/default/Video_Standard.o obj/default/alt_math.o obj/default/main.o -lm  

nios2-elf-insert vip_control.elf --thread_model hal --cpu_name cpu --qsys true --simulation_enabled false --stderr_dev jtag_uart_0 --stdin_dev jtag_uart_0 --stdout_dev jtag_uart_0 --sopc_system_name vip_example --quartus_project_dir "C:/altera/c3_devkit/c3_devkit" --sopcinfo C:/altera/c3_devkit/c3_devkit/vip_example.sopcinfo 

2 [main] perl (7456) C:\altera\13.0sp1\quartus\bin\cygwin\bin\perl.exe: *** fatal error - cygheap base mismatch detected - 0x612708D0/0xAE08D0. 

 

This problem is probably due to using incompatible versions of the cygwin DLL. 

Search for cygwin1.dll using the Windows Start->Find/Search facility 

and delete all but the most recent version. The most recent version *should* 

reside in x:\cygwin\bin, where 'x' is the drive on which you have 

installed the cygwin distribution. Rebooting is also suggested if you 

are unable to find another cygwin DLL. 

 

/cygdrive/c/altera/13.0sp1/nios2eds/bin/sh_pl.sh: line 2: 6992 Segmentation fault PERL5LIB=`cygpath -u "$SOPC_KIT_NIOS2/bin"` perl "${SH_PL:-$0.pl}" $@ 

make: *** [vip_control.elf] Error 139 

make: *** Deleting file `vip_control.elf' 

 

**** Build Finished **** 

 

I found 2 files with that name, both in my \altera\13.0sp1\quartus folder. 

First one is in \bin64\cygwin\bin 

Second one is in \bin\cygwin\bin 

 

I am guessing that the software I have was built with an earlier version of Quartus and I may have a compatibility issue.
0 Kudos
Altera_Forum
Honored Contributor II
397 Views

 

--- Quote Start ---  

I receive an error. "connected system ID hash not found on target at expected base address". 

--- Quote End ---  

 

 

The debug/download in eclipse is pretty flaky in my experience. Try deleting and then re-creating the profile under "Nios II Hardware". 

 

 

--- Quote Start ---  

The error I received after reloading in Eclipse is "Function '_builtin_stwio' could not be resolved. 

--- Quote End ---  

 

 

I had this problem too, until I turned off "Codan Analysis UI for C/C++". 

 

I found this post here (http://www.alteraforum.com/forum/showthread.php?t=40002) very helpful (post# 5).
0 Kudos
Altera_Forum
Honored Contributor II
397 Views

 

--- Quote Start ---  

The debug/download in eclipse is pretty flaky in my experience. Try deleting and then re-creating the profile under "Nios II Hardware". 

 

I had this problem too, until I turned off "Codan Analysis UI for C/C++". 

 

I found this post here (http://www.alteraforum.com/forum/showthread.php?t=40002) very helpful (post# 5). 

--- Quote End ---  

 

 

Thanks, I no longer see the error. Now to figure out why I have no video. 

 

Still seeing the failure to connect for downloading, but the file does download from the command shell.
0 Kudos
Altera_Forum
Honored Contributor II
397 Views

It takes some effort, but I can get the download and debug to work. 

 

The "Clear Screen" fails during initialization. I can step through the process until i=9, then the board stops responding. 

 

Since the board was qualified with QuartusII 12, I am trying to download and install that version.
0 Kudos
Reply