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++
12642 Discussions

Hello_led can not run on Nios II/s core.

Altera_Forum
Honored Contributor II
3,421 Views

Hi,  

 

I use the Microtronix Cyclone Dev.Board, and follow the Altera Hardware Design and Software Design. 

 

When I make the LowCost HardWare Design(use the Nios II/e Core and epcs_controller as the reset address) and run the Software Design(allowed under the lowcost), all allowed software can run on the board, but some message display, 

 

"nios2-terminal: Warning: The JTAG cable you are using is not supported for Nios 

nios2-terminal: II systems. You may experience intermittent JTAG communication 

nios2-terminal: failures with this cable. Please use a USB Blaster revision B 

nios2-terminal: cable or another supported cable. Please refer to the file 

nios2-terminal: errata.txt included in the Nios II development kit documents 

nios2-terminal: directory for more information. 

 

nios2-terminal: connected to hardware target using JTAG UART on cable 

nios2-terminal: "ByteBlasterII [LPT1]", device 1, instance 0 

nios2-terminal: starting in terminal mode only (Control-C exits)". 

 

But When I make the standard HardWare Design(use the Nios II/S core and ext_flash as the reset address),  

when I run the software, the Nios II IDE also diplay 

"nios2-terminal: Warning: The JTAG cable you are using is not supported for Nios 

nios2-terminal: II systems. You may experience intermittent JTAG communication 

nios2-terminal: failures with this cable. Please use a USB Blaster revision B 

nios2-terminal: cable or another supported cable. Please refer to the file 

nios2-terminal: errata.txt included in the Nios II development kit documents 

nios2-terminal: directory for more information. 

 

nios2-terminal: connected to hardware target using JTAG UART on cable 

nios2-terminal: "ByteBlasterII [LPT1]", device 1, instance 0 

nios2-terminal: starting in terminal mode only (Control-C exits) 

and nothing happen on the board. 

 

What is wrong? Can someone tell me?  

 

If need the detailed info about my setting, I will paste. 

 

Thank you.
0 Kudos
18 Replies
Altera_Forum
Honored Contributor II
1,154 Views

Hi 

 

 

You can try runing it by setting the reset address in ram . 

Probably the flash can not work ,because the time not consist with  

the altera board.
0 Kudos
Altera_Forum
Honored Contributor II
1,154 Views

Hi, 

 

I think it just the problem of Nios2 Core. When I change the Nios II/s to Nios II/e, it is OK. 

 

Why, if the Microtronix Cyclone Dev.Board have bugs, or someting else. Can someone help me? 

 

Thanks.
0 Kudos
Altera_Forum
Honored Contributor II
1,154 Views

I think you need to provide more information. 

 

What does the debugger output display in this case? Can you debug the design (clicking on the beetle rather than the running man)?  

 

If not then which error messages come out of nios2-download and nios2-gdb-server when you try to debug it?
0 Kudos
Altera_Forum
Honored Contributor II
1,154 Views

Hello wombat, 

 

I give your more detailed information. When I use the Nios II/e Core, 

First, I download the .sof and 7-seg all lightened. 

Second, I creat hello_led project, build project and RUN debug as Nios II Hardware, the infomation given in console is 

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

Console [<terminated> Nios II Download Output ......] 

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

Using cable "ByteBlasterII [LPT1]", device 1, instance 0x00 

Pausing target processor: OK 

Reading System ID at address 0x021208B8: verified 

 

Downloading 00000000 ( 0%) 

Downloading 01000020 ( 4%) 

Downloaded 1KB in 0.0s  

Leaving target processor paused 

 

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

Console [nios2-gdb-server output ......] 

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

Using cable "ByteBlasterII [LPT1]", device 1, instance 0x00 

Processor is already paused 

Reading System ID at address 0x021208B8: verified 

Listening on port 4484 for connection from GDB: 59saccepted 

 

When I set breakpoint in the program and run the Resume Button, the program run and can stop at the breakpoint. Also, the program take effect on the board and the led changed lighting. 

 

When I change the Nios II/e Core to Nios II/s Core, I compile in Quartus and download .sof to board. The 7-seg are all lightened. I creat the Hello_led project, build and Run debug as Nios II Hardware. The infor in the console is 

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

Console [<terminated> Nios II Download Output ......] 

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

Using cable "ByteBlasterII [LPT1]", device 1, instance 0x00 

Processor is already paused 

Reading System ID at address 0x021208B8: verified 

 

Downloading 00000000 ( 0%) 

Downloading 01000020 ( 4%) 

Downloaded 1KB in 0.0s  

Leaving target processor paused 

 

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

Console [nios2-gdb-server output ......] 

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

Using cable "ByteBlasterII [LPT1]", device 1, instance 0x00 

Processor is already paused 

Reading System ID at address 0x021208B8: verified 

Listening on port 4877 for connection from GDB: 59saccepted 

 

I set the breakpoint and Run the Resume Button, but the program do not run to the breakpoint and stay alt_main() all the time. It means that the Nios II/s can not run. 

 

I do not know what is wrong, can you tell how to deal with? 

 

By the way, Can Nios II/e Core run uClinux? 

 

Thank you very much.
0 Kudos
Altera_Forum
Honored Contributor II
1,154 Views

It sounds as though the processor is running fine, but there is something else wrong. 

 

Please can you confirm that, with the Nios II/s processor, you can tell the IDE to stop at alt_main and it works. 

 

If so then please try stepping through alt_main to find out where it goes wrong. You can step over most of the functions, but please ensure you step INTO alt_sys_init() and main(). Do you get as far as main? 

 

[Note that if you&#39;re debugging optimised code you may want to debug in assembler mode]
0 Kudos
Altera_Forum
Honored Contributor II
1,154 Views

Maybe you have already stated this, but is the hardware and software exactly what is provided with the Nios kit? (did you modify anything?). Using that board with hello_led is something I&#39;ve done many times and have not had a problem with it. Also since hello_led is so small I would use -O0 optimization (try to keep things as simple as possible). I have run -O0 and -O2 with that set of hardware and software so I would not expect that to be a problem. 

 

Can you list the versions of Quartus and Nios that you are using as well.
0 Kudos
Altera_Forum
Honored Contributor II
1,154 Views

But It do not happen with Nios II/e Core. 

My HW/SW environment is  

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

Quartus II 4.2 

Nios II 1.1 Eval 

Microtronix Cyclone Board 

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

I have tried other example, like Hello_world. When run debug as..., the program stop at main() and can not run any more.  

 

I installed the Quartus II 4.1(SP2) and Nios II 1.0, the same problem happened. 

 

I will try again to find some clue and paste. 

 

Thank you.
0 Kudos
Altera_Forum
Honored Contributor II
1,154 Views

Have you seen similar (bad) results if there is an &#39;f&#39; core in the system? Also are you regenerating the hardware or using the sof file supplied with the kit? 

 

One more thing, what do you have the USB cable connected to? I found having that board connected to my LCD monitor was problematic (noise from the monitor messed up communication with the board). I really doubt this is the cause for you though. 

 

Can you copy and paste what appears in the console window. Also have you tried Quartus 4.2 SP1?
0 Kudos
Altera_Forum
Honored Contributor II
1,154 Views

Yes, I have tried to use f/Core, the same result(bad on s/Core) happen.  

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

First, I generated the system(I made the system with the standard HW design component, but I did not have lcd, so I deleted the lcd) with e/Core and everything is OK.(hello_led,memtest, board_diag and so on). I use Microtronix Cyclone Board(I borrow from other, the board was made in 2003. So Sometimes I think if it is the wrong of the board, but no infor from Microtronix said the revision of the board).  

My system include sram/flash/sdram/epcs_controller/igor_mac/uart/led_pio/button_pio/sevenseg_pio/system_timer/jtag_uart. 

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

Second, I regenerated the system only changed by s/Core. I tried the hello_led in Nios II IDE, it can not run. 

I found in debug, the program stopped in the line 117. I set breakpoint and click Resume, but nothing run and program still stay at line 117. 

 

I have no USB, no UART cable......, I only have on ByteBlaster cable connectted. I also have no LCD. 

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

Then, I changed back to Nios II/e Core, the program can run again. 

http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif  

 

Here is my console information when I run the s/Core. 

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

Using cable "ByteBlasterII [LPT1]", device 1, instance 0x00 

Pausing target processor: not responding. 

Resetting and trying again: OK 

Reading System ID at address 0x021208B8: verified 

 

Downloading 00000000 ( 0%) 

Downloading 01000020 ( 4%) 

Downloaded 1KB in 0.0s  

Leaving target processor paused 

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

nios2-terminal: Warning: The JTAG cable you are using is not supported for Nios 

nios2-terminal: II systems. You may experience intermittent JTAG communication 

nios2-terminal: failures with this cable. Please use a USB Blaster revision B 

nios2-terminal: cable or another supported cable. Please refer to the file 

nios2-terminal: errata.txt included in the Nios II development kit documents 

nios2-terminal: directory for more information. 

 

nios2-terminal: connected to hardware target using JTAG UART on cable 

nios2-terminal: "ByteBlasterII [LPT1]", device 1, instance 0 

nios2-terminal: starting in terminal mode (Control-C exits) 

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

Using cable "ByteBlasterII [LPT1]", device 1, instance 0x00 

Processor is already paused 

Reading System ID at address 0x021208B8: verified 

Listening on port 1058 for connection from GDB: accepted 

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

When I click Resume Button, nothing appears in console. 

When I click step into Button, nothing happens and then I click suspend Button, it display Nios II ELF Debugger error. 

"Target request failed: Failed to interrupt." and the program can not be suspended. 

I do not try Q4.2 SP1. 

 

I have no idea yet.
0 Kudos
Altera_Forum
Honored Contributor II
1,154 Views

I think maybe it is the Nios II boot problem. 

 

Please give me some information about how and sequence about program executing on Nios II. 

Just take the hello_led as the example. 

 

Nios II&#39;s Entry and PC pointer. 

 

Thank you.
0 Kudos
Altera_Forum
Honored Contributor II
1,154 Views

Hi, 

 

I retry my system with small part(Nios II/s Core, onchipram, uart, led_pio, test_pio). Yes, It can run. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/tongue.gif  

 

I think maybe some component conflict with each other. I will add each part a time. 

 

Thank you.
0 Kudos
Altera_Forum
Honored Contributor II
1,154 Views

In your quartus settings for the device and pin options check to make sure unused I/O are tri-stated. Also make sure that all your assigned I/O make it to the correct locations (easiest way is to look at the assignment editor or the .pin file).

0 Kudos
Altera_Forum
Honored Contributor II
1,154 Views

It has nothing to do with USBblaster cable (just bypass the warning), but you&#39;d better buy a UART cable. It is cheap and important for run/debug nios II applications. In fact, UART cable is necessary to you, I think.

0 Kudos
Altera_Forum
Honored Contributor II
1,154 Views

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

--- Quote Start ---  

It has nothing to do with USBblaster cable (just bypass the warning), but you&#39;d better buy a UART cable. It is cheap and important for run/debug nios II applications. In fact, UART cable is necessary to you, I think.[/b] 

--- Quote End ---  

 

What problems are you having which force you to use a standard UART? I&#39;ve been using a JTAG UART for ages with no problems.
0 Kudos
Altera_Forum
Honored Contributor II
1,154 Views

The only people I recommend use a Uart are those that know their end system will not have a JTAG connection. Some people would want to use the JTAG Uart anyway for debug purposes due to it&#39;s speed but I think there is merit in using the UART for this as well (to test it&#39;s communication reliability amungst other things).

0 Kudos
Altera_Forum
Honored Contributor II
1,154 Views

Hello, 

 

I have solved the problem by changing the SDRAM Controller Core.  

I think it is the bug of SDRAM Controller Core(the new_sdram_controller provided by nios2 kit ). I use the SDRAM Controller Core of SOPC Builder 2.7 Provided instead. The program can run and led is lightened. 

 

Why?  

But the new_sdram_controller_core can used by Nios II/e Core and all test programs can run with Nios II/e Core normally.  

When use Nios II/s Core, I must use the old sdram_controller_core instead. 

My Dev board is Microtronix Cyclone Development Board. 

 

I have read the .ptf file of each controller core, but I do not know exactly which part can disable my system. 

 

Can tell me the reason? 

 

Thank you.
0 Kudos
Altera_Forum
Honored Contributor II
1,154 Views

Do you have any insight into what the problem was with the core you were using.  

 

I believe I am suffering a similar problem albeit in a different environment. I am using a cyclone dev kit with quartus 4.2 sp 1 and nios ii 1.1 (latest). Using the HAL but no OS.  

 

I have binned the sdram and located my application in sram. I can download code to the board and make it run but when I try to debug I see very similar messages.  

 

The console is unresponsive and the message &#39;processor already paused&#39; is worryingly there.  

 

I have also seen a message which says error accessing memory address 0x80035c (0x800000 being the base of sram).  

 

if there is something about the sdram controller which caused gdb to stall maybe it is also causing me a problem at the moment. perhaps you could enlighten me ?
0 Kudos
Altera_Forum
Honored Contributor II
1,154 Views

Hello benmidgley, 

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

--- Quote Start ---  

Do you have any insight into what the problem was with the core you were using.[/b] 

--- Quote End ---  

 

My SDRAM is MT48LC2M32B2.  

I just found that there is the single Micro MT48LC2M32B2-7 chip in the Presets: menu of sdram_controller(new_sdram_controller). I choose this. Do not change anything. Then, my system can run.
0 Kudos
Reply