Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12409 Discussions

ELF File Error in Eclipse Build Tools for Nios II for Qsys System

Altera_Forum
Honored Contributor II
1,164 Views

I have a Qsys system with a Nios II processor which aims to detect an sd card and turn on LED 0 if one is detected (via code from the Nios II Software Biold Tools for Eclipse). When I try to run my Eclipse code on my DE0-Nano board (SD card is soldered to a header which is on some GPIO pins), I get a couple errors: 

In the Console: 

C:\altera\14.1\Programs\sdtesing\sd_interface\software\sd_lib_bs[/HAL/src/alt_main.c:154: undefined reference to `main' 

make : *** [sd_connect.elf] Error 1 

 

and in a popup: 

Project does not have an ELF file. Please make sure project has been built successfully. The program compiles and loads to the board successfully in Quartus.  

 

 

The BSP and Application created without any errors. A tutorial program which loads a program with Eclipse runs fine.  

 

My code and Qsys program are below. If you have any suggestions for either, they would be much appreciated. I'm fairly new to Quartus and very new to Qsys systems, so I'm grateful for any help.  

 

Devices: 

DE0-Nano  

Kingston 4GB SD Card 

Windows 7 

Quartus 14.1 

 

Code: # include <io.h># include <system.h># include <altera_up_sd_card_avalon_interface.h> 

 

void led_on(){ //turns on LED_0 

while(1){ 

IOWR(LED_BASE, 0, 1); 

 

int main(){ 

alt_up_sd_card_dev *device_reference = NULL; 

 

device_reference = alt_up_sd_card_open_dev("/dev/Interface"); 

if((device_reference != NULL) && (alt_up_sd_card_is_Present())){ //if there is an SD Card detected... 

led_on(); //do the thing that turns an LED on 

return 0; 

 

Qsys system: (See attachment)
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
233 Views

I am sorry to say that the file you have attached is hardly visible. on the nios console are you getting an error like: " find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer." please let us know.

Reply