I am attempting to compile my source.s code into the hex file that will be placed in my system RAM. This must be done completely through the command line and I am having some problems. I am using the following commands in order.nios2-bsp: This creates the BSP from the .sopcinfo file nios2-app-generate-makefile : This generates the make file from the source code make all: Compile the make file and generate the .elf file elf2hex: This converts the elf file to the hex file Now, I am running into problems when I run the make all. It appears that the src file (named "code_name" below) is not able to be compiled into the .o file that is required later on in the build process. I am left with the following error: Assembler messages: Fatal error: can't create obj/default//C/Users/..../code_name.o: No such file or directory make: *** [obj/default//C/Users/..../code_name.o] Error 1 The directory exists, but the file does not. Has anyone succesfully created their .hex file for their ram from simply their source code, and the .sopcinfo file using the command line?!?! Thanks
Mike,I am getting the following error when I run make all. I need to run make all before I can make mem_init_generate. Fatal error: can't create obj/default//C/Users/mattmaur/Desktop/sel2740s_mainboa rd_SEPARTE_QSYS/sel2740x/rtl/sel2740s_mainboard/sel2740s_mainboard_top/syn/softw are/nios_sw/main.o: No such file or directory make: *** [obj/default//C/Users/mattmaur/Desktop/sel2740s_mainboard_SEPARTE_QSYS /sel2740x/rtl/sel2740s_mainboard/sel2740s_mainboard_top/syn/software/nios_sw/mai n.o] Error 1 make: Leaving directory `C:/Users/mattmaur/Desktop/sel2740s_mainboard_SEPARTE_QS YS/sel2740x/rtl/sel2740s_mainboard/sel2740s_mainboard_top/syn/software/nios_sw'
Check the generated Makefile. Do install cygwin?How did you generate the Makefile at the first place? Using eclipse or command line? You can try using the Nios II command shell.
This problem has been solved.I believe the problem came from my path length being too long. When the assembler creates the main.o file, is is placed under your obj/default folder in which the whole directory is created again. It follows this format. MY_DIR/project_folder/obj/fefault/MY_DIR/project_folder/main.o As you can imagine, this path length can get rather long. My guess is it exceeded the maximum allowed by the Nios Cygwin build tools. Simply making my MY_DIR path less levels solved this issue. -Matt