- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?!?! ThanksLink Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Anyone? I am sure this is able to be done rather easily outside of the GUI.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
bump......
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try "make mem_init_generate" after running make all. Is should create a mem_init folder and your hex will contain in it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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'- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I do not understand why main.o is getting created at the above directory. It should go to obj/default, not obj/default//"My_Full_Project_Path"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cygwin is included in the nios command line tools I believe. I generated the Makefile using nios2-app-generate-makefile.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Check your Makefile. The paths are added in there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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![](/skins/images/45C6C2D737ED71F4C51F0145C8CB1E9C/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page