Forum Discussion
Altera_Forum
Honored Contributor
14 years agonios2stackreport is a bash script and its contents are as follows:# !/bin/bash
FILEPATH=${0//\\/\/} _this_script=$(cd ${FILEPATH%[\\/]*} && echo $(pwd 2>/dev/null)/${FILEPATH##*/}) _this_script_dir=$(dirname ${_this_script}) export SOPC_KIT_NIOS2=${_this_script_dir/\/bin} . "${_this_script_dir}/sh_pl.sh" $@ I was having trouble with the last line. sh_pl.sh was not being properly called, so I located sh_pl.sh on my system and called it explicitly using its absolute path. and i got the following error message: $ make Info: Building ../hello_0_bsp/ C:/altera/11.0/nios2eds/bin/gnu/H-i686-mingw32/bin/make --no-print-directory -C ../hello_0_bsp/ [BSP build complete] Info: Compiling hello_world.c to obj/hello_world.o nios2-elf-gcc -xc -MP -MMD -c -I../hello_0_bsp//drivers/inc -I../hello_0_bsp//HA L/inc -I../hello_0_bsp/ -I../hello_0_bsp//drivers/inc -DSYSTEM_BUS_WIDTH=32 -pi pe -D__hal__ -DALT_NO_INSTRUCTION_EMULATION -DALTERA_TRIPLE_SPEED_MAC -DALT_SING LE_THREADED -O0 -g -Wall -EL -mno-hw-div -mhw-mul -mno-hw-mulx -o obj/hell o_world.o hello_world.c Info: Linking hello_0.elf nios2-elf-g++ -T'../hello_0_bsp//linker.x' -msys-crt0='../hello_0_bsp//obj/HAL/ src/crt0.o' -msys-lib=hal_bsp -L../hello_0_bsp/ -Wl,-Map=hello_0.map -O0 -g -Wall -EL -mno-hw-div -mhw-mul -mno-hw-mulx -o hello_0.elf obj/hello_world.o -lm nios2-elf-insert hello_0.elf --thread_model hal --cpu_name cpu --simulation_enab led false --id 0 --sidp 0x10022c90 --timestamp 1319134118 --stderr_dev jtag_uart --stdin_dev jtag_uart --stdout_dev jtag_uart --sopc_system_name cycloneIII_3c12 0_dev_niosII_standard_sopc --quartus_project_dir "c:/altera/11.0/kits/CycloneIII _3C120_FPGA/examples/NS_cycloneIII_3c120_dev_niosII_standard" --jdi C:/altera/11 .0/kits/CycloneIII_3C120_FPGA/examples/NS_cycloneIII_3c120_dev_niosII_standard/c ycloneIII_3c120_dev_niosII_standard.jdi perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LC_ALL = (unset), LANG = "C.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). Can't locate sh_launch.pm in @INC (@INC contains: /cygdrive/c/altera/11.0/nios2e /bin C:/PROGRA~1/MKS/Toolkit/etc/perl/lib C:/PROGRA~1/MKS/Toolkit/etc/perl/lib C :/PROGRA~1/MKS/Toolkit/etc/perl/lib/site_perl C:/PROGRA~1/MKS/Toolkit/reskit/etc /perl/lib/i386 .) at C:\altera\11.0\nios2eds\bin\nios2-stackreport.pl line 1. BEGIN failed--compilation aborted at C:\altera\11.0\nios2eds\bin\nios2-stackrepo rt.pl line 1. make: *** [hello_0.elf] Error 2 make: *** Deleting file `hello_0.elf' I have no idea how to begin debugging this. I just commented out the last line from nios2-stackreport and the build completes succesfully. I know this work around is going to come back to haunt me later, but it will do for now. Here are the contents of sh_pl.sh # !/bin/sh PERL5LIB=`cygpath -u "$SOPC_KIT_NIOS2/bin"` perl "${SH_PL:-$0.pl}" $@ Hopefully this step is not too important, and leaving it out won't affect my build.