Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor III
761 Views

Error while downloading linux image - NIOS 2 with MMU

Hello, 

 

I'm getting the below error while downloading the linux image onto NIOS-2 with MMU. I'm getting this error after updating quartus and nios2eds to version 11.0. The same image worked when using the older version(9) of Quartus and NIOS2EDS.  

 

Any idea on what might be going wrong? 

 

Using cable "USB-Blaster [4-1]", device 1, instance 0x00 

Pausing target processor: OK 

Initializing CPU cache (if present) 

OK 

Downloaded 3168KB in 0.5s (6336.0KB/s) 

Verified OK  

Starting processor at address 0xC6000000 

nios2-gdb-server-wrapped: nios2debug.cpp:578: virtual ADI_ERROR NIOS2DEBUG::leave_debug_mode(): Assertion `m_state == STATE_DEBUG' failed. 

/..../nios2eds/bin/nios2-download: line 609: 23398 Aborted  

nios2-gdb-server --go --tcpport none --write-pid /.../nios2-linux/uClinux-dist/images/nios2-download.pid /..../nios2-linux/uClinux-dist/images/zImage.srec 

 

Thanks, 

Chetan
0 Kudos
5 Replies
Highlighted
Valued Contributor III
8 Views

Hello Chetan. 

Please make sure you are following (http://www.altera.com/support/kdb/solutions/rd07292010_420.html) correctly. 

 

Is your DDR2 s1 address range 0x10000000 to 0x1fffffff and all the other components in between 0-0x0fffffff? 

 

Also did you change /linux2.6/arch/nios2/include/asm/nios.h? (DDR2_TOP_BASE to 0x10000000, and DDR2_TOP_SPAN to 268435456 (256Mb)) 

 

Give them a try... 

All the best, 

Turhan
0 Kudos
Highlighted
Valued Contributor III
8 Views

Hi Turhan, 

 

Thanks for the reply. I'm working with a custom board which has nios2, 64MB RAM and a couple of other peripherals. I used "sopc-create-header-files" command to create the header files specific to the board and I have added a custom configuration for the same. The memory mappings seem to be OK.  

 

Strangely the same configuration worked when I was using Quartus-9.2. But after I updated the tools and the project to Quartus 11.0, I'm having the above problem. I also tried running a hello world program on nios2 without mmu and even that gave the same error. All these configurations worked fine with older version(9.2) of the tools. My guess is the program is going to debug mode after download and I'm not sure how to change this. Also not sure if this is due to the automatic migration of project which I did from Quartus 9.2 to Quartus 11.0. I will try to create a new project in latest version and will check if I face the same problem or not. Let me know if you thing something else might be wrong. 

 

Thanks, 

Chetan.
0 Kudos
Highlighted
Valued Contributor III
8 Views

Did you update the uClinux? The sopc-create-header-files is replaced with devicetree method in the updated version. If you have updated the uClinux, perhaps that's why you are having problems. 

 

I would suggest you to use a design with MMU, together with the devicetree method. For that you will need to follow the guide in 

(http://www.alterawiki.com/wiki/linux_for_the_nios_ii_processor

and the following thread: 

(http://alterauserforums.org/forum/showthread.php?t=29720

 

I hope these suggestions will help. If you want to continue with the older method, I don't know what is really going wrong. 

 

Cheers, 

Turhan
0 Kudos
Highlighted
Valued Contributor III
8 Views

Hi Chetan 

 

I have had similar issues when using DDR2 controllers in Quartus 11 and had to fall back to 10.1 to fix my issue. I still need to investigate the issue but have found some info on porting from 10.1 to 11.0 so I will look into that when I get the time again. 

 

You have 64MB RAM so I'm assuming it is SDRAM. I have had SDRAM working in 11.0. The fact that nios2-download says it downloaded 3MB in 0.5s really does seem like it is a RAM issue. I have had very simliar probelms which turned out to RAM related, also saying it downloads in next to no time and then the m_state == DEBUG error. 

 

I think your idea of starting a fresh project in 11.0 might be the way to solve this. 

 

Regards 

Antonie
0 Kudos
Highlighted
Valued Contributor III
8 Views

Hi Turhan, 

I have not updated uClinux. I have tried configuring with and without mmu, but still I'm not able to find a solution for this. As Antonie said, I'm pretty sure its a RAM issue. 

 

Hi Antonie,  

The RAM which I'm using is a DDR and I was using the "High Performance Controller" architecture which has now changed and current version of tools doesn't support that for Cyclone III. I'm still working on how to make the new controller architecture work. 

 

Thanks for the help. Will keep this thread updated on my progress. 

 

Regards. 

Chetan
0 Kudos