Forum Discussion
Altera_Forum
Honored Contributor
20 years agoYes I tried this compiler option -g0
Also I tried to remove all the data of my mouse driver, I preserved only the device structure. And now I get the same message in an other module « …….. ecos_install/lib/extras.o(.text.smsc_lan91cxx_init+0x30): In function `smsc_lan91cxx_init': : global pointer relative offset 34352 at address 0x008ad9a8 out of range -32678 to 32767 « In this case I built first the ecos library with « Microwindows eCos support selected » and then I compiled and linked my application to this library and I got the previous message. If I build with “Build complete eCos+Microwindows application” I have the message during the library building. nios2-elf-gcc -c -I/cygdrive/c/alt_projects/ecos_menu/ecos_install/include -I/cygdrive/c/altera/kits/nios2/components/ecos/ecos-current/packages/services/gfx/mw/current -I/cygdrive/c/altera/kits/nios2/components/ecos/ecos-current/packages/services/gfx/mw/current/src -I/cygdrive/c/altera/kits/nios2/components/ecos/ecos-current/packages/services/gfx/mw/current/tests -I. -finline-limit=7000 -g0 -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -DSYSTEM_BUS_WIDTH=32 -mno-hw-mul -mno-hw-div -I/cygdrive/c/alt_projects/ecos_menu/ecos_install/include/microwin -D__ECOS=1 -DMSDOS=0 -DELKS=0 -D__rtems__=0 -D_MINIX=0 -DNOTYET=0 -DUNIX=1 -DHAVE_FILEIO -DHAVE_BMP_SUPPORT=1 -DHAVE_PNM_SUPPORT=1 -DHAVE_XPM_SUPPORT=1 -DxHAVE_JPEG_SUPPORT=1 -DHAVESELECT=1 -o /cygdrive/c/alt_projects/ecos_menu/ecos_install/lib/ecos_app.o /cygdrive/c/altera/kits/nios2/components/ecos/ecos-current/packages/services/gfx/mw/current/src/ecos/ecos_app.c cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C nios2-elf-gcc -g -nostdlib -Wl,--gc-sections -Wl,-static -mno-hw-mul -mno-hw-div -L/cygdrive/c/alt_projects/ecos_menu/ecos_install/lib -Ttarget.ld -o /cygdrive/c/alt_projects/ecos_menu/ecos_install/bin/ecos_mw.elf /cygdrive/c/alt_projects/ecos_menu/ecos_install/lib/ecos_app.o /cygdrive/c/alt_projects/ecos_menu/ecos_install/lib/ecos_app.o(.text.cyg_user_start+0x1c): In function `cyg_user_start': : global pointer relative offset 34348 at address 0x008700d4 out of range -32678 to 32767 I use the default options with the net package and -G0 As I understand now, some data of the .bss area are pointed with the gp + offset and the gp is constant, so this area must be lower than 0x10000.