Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

IDE Problems

Altera_Forum
Honored Contributor II
989 Views

Hello, 

 

This is a repost of a thread on the UC forum. I wanted to post it here also on the software forum. 

My problem is below this first post. 

 

Thanks, 

 

-Baycool 

 

 

********************************************************* 

 

This is a custom board. I have taken everything out except for the Flash and SDRAM. It is actually a fairly simple system, flash, sdram, and an ethernet port. I don't use tightly_coupled_memory (have not familiarized myself with it yet), and my data cache line size is 4 Bytes, exception pointer is set to SDRAM. 

 

I am out of ideas. I also can not load the kernel into RAM from the IDE, I'm forced to burn the Flash each time I make a change. I get the following message from the IDE console. Do I have a JTAG problem? I'm using a USB Blaster "Rev B". 

 

Downloading 08000000 ( 0%) 

Downloading 08010000 ( 6%) 

Downloading 08020000 (12%) 

Downloading 08030000 (18%) 

Downloading 08040000 (25%)assertion "m_state == STATE_DEBUG" failed: file "nios2 

debug.cpp", line 1695 

Signal 6 

 

 

 

Here is a copy of what I get when I launch the nios2-terminal. Most of the time I'm unable to log into the system, I usually get "Login incorrect." When I am able to log in, I usually get kicked out fairly shortly, and the system goes back to the login prompt. 

 

 

uClinux/Nios II 

Altera Nios II support © 2004 Microtronix Datacom Ltd. 

Built 1 zonelists 

Kernel command line: root=/dev/mtdblock0 ro 

PID hash table entries: 1024 (order: 10, 16384 bytes) 

Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) 

Inode-cache hash table entries: 16384 (order: 4, 65536 bytes) 

Memory available: 128640k/131072k RAM, 0k/0k ROM (857k kernel code, 203k data) 

Mount-cache hash table entries: 512 (order: 0, 4096 bytes) 

Linux NoNET1.0 for Linux 2.6 

Serial: JTAG UART driver $Revision: 1.4 $ 

ttyJ0 at MMIO 0x80000860 (irq = 2) is a jtag_uart 

io scheduler noop registered 

io scheduler anticipatory registered 

io scheduler deadline registered 

io scheduler cfq registered 

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize 

Altera NDK flash (AMD): Found 1 x8 devices at 0x0 in 8-bit bank 

Amd/Fujitsu Extended Query Table at 0x0040 

Altera NDK flash (AMD): CFI does not contain boot bank location. Assuming top. 

number of CFI chips: 1 

cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness. 

cmdlinepart partition parsing not available 

RedBoot partition parsing not available 

Using Altera NDK partition definition 

Creating 2 MTD partitions on "Altera NDK flash (AMD)": 

0x00200000-0x00600000 : "romfs/jffs2" 

0x00000000-0x00200000 : "loader/kernel" 

VFS: Mounted root (romfs filesystem) readonly. 

Freeing unused kernel memory: 52k freed (0x80f2000 - 0x80fe000) 

expand: from=/ramfs.img to=/dev/ram0 

expand: from=/ramfs.img to=/dev/ram1 

SIOCSIFADDR=-1: 9 

SIOCGIFFLAGS = -1: Bad file descriptor (9) 

SIOCADDRT=-1: 9 

Unable to create socket 

close on exec: : Bad file descriptor 

setsockopt: : Function not implemented 

Unable to bind server socket: : Function not implemented 

Unable to listen to socket 

Unable to create socket 

close on exec: : Bad file descriptor 

setsockopt: : Function not implemented 

Unable to bind server socket: : Function not implemented 

Unable to listen to socket 

Unable to create socket 

close on exec: : Bad file descriptor 

setsockopt: : Function not implemented 

Unable to bind server socket: : Function not implemented 

Unable to listen to socket 

 

/etc/issue www.microtronix.com June 2005 

 

 

Welcome to Linux on the Nios II 

 

Nios2 login:  

 

 

 

Any ideas would be great, 

Doug  

 

************************************************************* 

My reply: 

 

************************************************************* 

Doug, 

 

Did you ever figure out your problem? 

 

I am also developing a custom board. I also get the mysterious error: 

 

assertion "m_state == STATE_DEBUG" failed file "nios2debug.cpp", line 1695 signal 6 

 

What does this message mean? I just opened an SR with Altera, but have been stuck with this for a couple of weeks now.... 

 

My conditions are as follows: 

 

I get this error just by reversing the order of how I open my tools. If I open a shell to load my hardware before opening IDE I get the error. 

If I open IDE before opening my SDK shell I DO NOT get error. The result is reproducible with some of my boards. Other boards will hang with the message:  

 

nios2-terminal: (Use the IDE stop button or Ctrl-C to terminate) 

 

or not respond to further commands. 

 

I am in a jam because my boards have been manufactured and assembled and are ready for production , and now this error shows up. 

 

-Baycool 

 

I am using Quartus 5.0 and Nios II 5.0 with a Full License for both
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
293 Views

Hello, 

 

I just wanted to share with the forum, that I believe my error below: 

 

assertion "m_state == STATE_DEBUG" failed file "nios2debug.cpp", line 1695 signal 6 

 

was caused by faulty ssram. I do have a custom board that still suffers with a Byteblaster like circuit, 

but  

 

 

So, in case any one has ruled out their JTAG connection or noise problems, do a robust on-chip test of your memory before doing a SW download. 

 

Thanks "slacker" for your assistance... 

 

-baycool
0 Kudos
Reply