Altera_Forum
Honored Contributor
16 years agonios2-ide vs nios2-bsp
I don't like to use Eclipse and the NIOS2-IDE. I'm usually much more effective with the tools I'm familiar with like: emacs, make, gcc, gdb, linker scripts, objdump, etc.
However I can't seem to use the command line tools to build an elf file like I do when using the NIOS2-IDE. The problem is that the resulting object file is much bigger when I do it the CLI way. This is basically what I do: in my syslib nios2-bsp HAL bspdir top.sopcinfo --default_stdio uart make -C bspdir in my app I do something like: CFLAGS = -c -Os -g -DSYSTEM_BUS_WIDTH=32 LDFLAGS = -g -T../main_syslib/bspdir/linker.x -nostdlib ../main_syslib/bspdir/obj/HAL/src/crt0.o CC = nios2-elf-gcc LD = nios2-elf-ld It compiles fine, but like I said, it gets too big for my RAM: nios2-elf-ld: region ram is full (main.elf section .text). Region needs to be 3140 bytes larger. What appears to be the problem is that nios2-bsp does not have as many options (at least that I can find) as the NIOS2-IDE, e.g. the buttons for "Program never exits", "Small C library", etc. Also, is there a simple way to make a script to do the equivalent of opening the SOPC Builder and click generate? I wrote a script for an earlier version of SOPC Builder, but it consisted of a sequence of perl scripts (ptf_update.pl, mk_systembus.pl, etc.) with lots of different options. There must be a better way?