Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

"Unable to Download SOF"

Altera_Forum
Honored Contributor I
911 Views

I have successfully configured and built a uCLinux kernel for a NiosII Cyclone board. I have set up the project to download to flash and execute from SRAM. However, when I tell Eclipse to 'Upload' the kernel image (vmlinux.bin, as per the 'Getting Started' guide), I get the following error message: 

 

------------------------------------------------ 

Microtronix Linux Extensions 

Version 1.3, Built December 30th, 2004 

------------------------------------------------ 

Feb 16, 2005 8:54:10 AM - (INFO) nios2-flash-programmer: Launching Quartus Progr 

ammer to download: 

/system/project_target.sof 

Error: Can't locate programming file project_target.sof (/system/;) in Chain Descri 

ption File  

Feb 16, 2005 8:54:10 AM - (SEVERE) nios2-flash-programmer: Unable to download SO 

F: /system/project_target.sof, exiting 

 

As I'm not the HW designer, I don't have control of the .SOF or Chain Description file. However, I have verified that the CDF contains the correct path to the SOF file. Also, I can launch Quartus manually and send 'project_target.sof' to the board successfully. Has anyone seen problems of this nature? Or, more simply, what exactly is being executed when I click 'Upload' in Eclipse? It appears a path is being set incorrectly in whatever bash script is being executed. Any info would be appreciated. 

 

Thanks in advance, 

 

Ryan
0 Kudos
4 Replies
Altera_Forum
Honored Contributor I
65 Views

It looks like the board information component for your system hasn't been registered properly with SOPC Builder... 

 

Have you been able to upload any nios II apps via the flash programmer? i.e. a simple hello_world application?
Altera_Forum
Honored Contributor I
65 Views

Thanks for the response Ken. 

 

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

It looks like the board information component for your system hasn&#39;t been registered properly with SOPC Builder...[/b] 

--- Quote End ---  

 

 

Yes, this is precisely the problem. Basically I have all the HW designer&#39;s files, designed on his machine w/ his Quartus/Nios SW, on a file server. Is there any documentation on the best way to &#39;distribute&#39; HW design files for software development?  

 

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

Have you been able to upload any nios II apps via the flash programmer? i.e. a simple hello_world application?[/b] 

--- Quote End ---  

 

 

Well, not out of the box, no, which motivated my last post. I spent most of yesterday tracking down this problem. Basically, the Microtronix plugins hide the command-line altera tools from the user by utilizing a number of sh and perl scripts to build command line arguments (i.e. the location of the project SOF file). None of these scripts could find my SOF, most likely because they assume the Quartus stuff was all designed and lives on the local machine. My workaround: The &#39;External Tools&#39; Menu Item (under &#39;Run&#39;) is configurable to allow for custom commands to be performed. I created an external tool for both my Kernel and for other generic C++ apps, along the lines of: 

 

-c "source $QUARTUS_ROOTDIR/sopc_builder/bin/nios_sh; source $SOPC_KIT_NIOS2/user.bashrc; bin2flash --flash=U19 --input=`cygpath &#39;c:/altera/kits/nios2/bin/eclipse/workspace/kernel/build/vmlinux.bin&#39;` --base=0x42000000 --location=0x0 --boot=c:/altera/kits/nios2/components/altera_nios2/boot_loader_cfi.srec --output=c:/altera/kits/nios2/bin/eclipse/workspace/kernel/build/vmlinux.flash && nios2-flash-programmer --cable=&#39;ByteBlasterMV [LPT1]&#39; --input=c:/altera/kits/nios2/bin/eclipse/workspace/kernel/build/vmlinux.flash --sof=c:/path/to/sof/target.sof --base=0x02000000; " 

 

This works for me for now, although any help on a better way to distribute/register hardware design files for software guys would be greatly appreciated. I&#39;m somewhat of a guinea-pig on this project, with two more SW engineers eventually needing to code for these boards as well. 

 

 

Sincerely and thanks, 

 

Ryan 

 

 

PS: Has anyone published a fix for this horribly-annoying &#39;java(w).exe takes 99% of the processor and 300MB of memory and doesn&#39;t give it back without a manual kill of java&#39; problem? I&#39;m using Nios 1.1 / Microtronix UCLinux 1.3 and Java 1.5.1. Most results when Googling point toward upgrading Eclipse, which I&#39;m guessing isn&#39;t an option due to the Microtronix stuff.
Altera_Forum
Honored Contributor I
65 Views

rfrenz, 

 

To me it looks like your programmer is looking for the flash-programmer SOF file. This is specific to your board. If you are working with an Altera or Microtronix board these already exist. If you&#39;re working on a custom board. You have to make one. 

 

There are two SOF files needed for any design. 

 

The SOF file which includes your Nios core (a custom core, or eval core). This should be your big one, the one your kernel, file system, etc... is built against. And the SOF file used to "burn" your flash. When programming your flash, the nios2-flash-programmer is going to load the flash SOF file. 

 

The best example I can give you is to reference the ug_nios2_flash_programmer under the documents directory. In there, they explain how to create a flash programming design for burning your custom boards using the mk_target_board command. It&#39;s a small Nios core used specifically to burn you flash.  

 

So, after all that, you need 2 SOF files. Your "target" SOF, and a "flash" SOF. The flash programmer is looking for the "flash" SOF. 

 

Hope this helps, 

Doug
Altera_Forum
Honored Contributor I
65 Views

Thanks Doug, 

 

I have all relevant files and am aware of both SOFs; I&#39;m sure my original problem explanation was confusing. I have the entire project directory accessible to my machine (including both SOF files, the PTF, etc). The problem is that they aren&#39;t &#39;registered&#39; with the SOPC builder, and as such cannot be found by the maze of bash and perl scripts called via the Eclipse plugins. I can successfuly create, build, and flash my code via the command-line, and so generally my problem is solved. The lingering question is how to code/flash against a project built somewhere else, e.g. without the project &#39;Registered&#39; through Quartus/SOPC; that is, how to do this without hacking perl scripts or wading through command line options? 

 

Sincerely and thanks again, 

 

Ryan
Reply