Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12600 Discussions

eCos library IDE integration?

Altera_Forum
Honored Contributor II
1,261 Views

Hi! 

 

I've been working with Nios I and eCos for a time, and now I've decided to upgrade to Nios II and the altera eCos porting. 

 

I've been able to generate the library, but I supposed that when I finished installing Nios2eCos.exe, eCos would appear in the RTOS combo. 

 

Anybody knows how can I include the eCos library (and include files) to an IDE project, in order to create a program that uses eCos RTO? 

 

Thank you in advance 

 

Alex Bueno
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
321 Views

Currently you will need to build the eCos library outside of the Nios II IDE by running either nios2configtool (recommended) or configtool directly. Having done that, it is possible to build and debug applications using the IDE.  

 

Instructions for using the debugger are provided in the getting started guide that comes with the eCos installer. 

 

You can build an application by simply creating an "Advanced C/C++ Project". This requires you to provide your own makefile. For example you could do this for the "examples" directory that comes with eCos. When creating the project, set the "Build Command" on the "Make Builder" tab to be the make command that you would have run on the command line, i.e.: 

 

make INSTALL_DIR=<install directory> 

 

rather than just: 

 

make 

 

Note that you can&#39;t do this for the examples directory in situ. You will need to copy it to another location outside of the components directory. Otherwise the project you create will overlap with the default "Nios II Device Drivers" project. 

 

Before attempting to do this, I recommend that you follow the instructions in the getting started guide to ensure that you can successfully build applications from the command line.
0 Kudos
Altera_Forum
Honored Contributor II
321 Views

> Currently you will need to build the eCos library outside of the Nios II IDE by >running either nios2configtool (recommended) or configtool directly. Having done >that, it is possible to build and debug applications using the IDE. 

 

Done. 

 

>Instructions for using the debugger are provided in the getting started guide that >comes with the eCos installer. 

 

I&#39;ve not yet tried to do it. 

 

>You can build an application by simply creating an "Advanced C/C++ Project". This >requires you to provide your own makefile. For example you could do this for the >"examples" directory that comes with eCos. When creating the project, set the >"Build Command" on the "Make Builder" tab to be the make command that you >would have run on the command line, i.e.: 

 

OK. Until now, I&#39;ve only tried "standard" C/C++ projects, so the Make options were not available. I&#39;ll try it and see what it happens :-) 

 

>Before attempting to do this, I recommend that you follow the instructions in the >getting started guide to ensure that you can successfully build applications from >the command line. 

 

Yes, I&#39;ve done it on the command line, and it was successful (for the examples). The fact is that I have a full application for Nios I eCos, with some directories, and I want to migrate to Nios II eCos. 

 

I&#39;ll see if I succeed, and begin trying things. 

 

Note that at the moment we&#39;ve not yet been able to run any simple program in the Nios II. We have just begun to work with it, and I&#39;m trying the software tools without being able to test it on the board. 

 

Thank you for all 

 

aLeX 

 

P.D: sure I will have new questions soon :-)
0 Kudos
Altera_Forum
Honored Contributor II
321 Views

I&#39;m having some trouble getting my IDE project to build. I&#39;m starting with a fresh install of Quartus 4.2, Nios2 1.1, and the latest eCos and Linux from this site. My project directory initially contains two files: 

 

main.c 

#include <stdio.h> int main(void) {  printf("Hello, eCos world!\n");  return 0; } 

 

Makefile 

# Mostly written by Jonathan Larmour, Red Hat, Inc.# Reference to ecos.mak added by John Dallaway, eCosCentric Limited, 2003-01-20# This file is in the public domain and may be used for any purpose INSTALL_DIR=../dcpa-test_install include $(INSTALL_DIR)/include/pkgconf/ecos.mak XCC           = $(ECOS_COMMAND_PREFIX)gcc XCXX          = $(XCC) XLD           = $(XCC) CFLAGS        = -I$(INSTALL_DIR)/include CXXFLAGS      = $(CFLAGS) LDFLAGS       = -nostartfiles -L$(INSTALL_DIR)/lib -Ttarget.ld # RULES .PHONY: program clean program: dcpa-test     $(INSTALL_DIR)/program_flash $<      dcpa-test: main.o     $(XLD) $(LDFLAGS) $(ECOS_GLOBAL_LDFLAGS) -o $@ $< clean:     -rm -f hello *.o %.o: %.c     $(XCC) -c -o $*.o $(CFLAGS) $(ECOS_GLOBAL_CFLAGS) $< %.o: %.cxx     $(XCXX) -c -o $*.o $(CXXFLAGS) $(ECOS_GLOBAL_CFLAGS) $< %.o: %.cc     $(XCXX) -c -o $*.o $(CXXFLAGS) $(ECOS_GLOBAL_CFLAGS) $< 

 

I have built the library using nios2configtool; it is located in ../dcpa-test_install. I can build this code from the command line and it builds successfully. 

 

I then do New Advanced C/C++ Project, name it DCPATest, set the location to the directory with my two files, and Finish. 

 

I then right-click on my project in the list, and select Build. A window (looks like the build window) flickers on my screen. Right-clicking the project again shows that the Build Project item has disappeared from the menu. Selecting Build Project from the Project menu does the same thing. Right-clicking my project and selecting Properties brings up a window with "C/C++ Make Project" selected, the Make Builder tab in front, and it says "Missing builder information on project." 

 

I think I missed a step in setting my project up. Any ideas?
0 Kudos
Reply