Forum Discussion
Hello_led can not run on Nios II/s core.
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.18 Replies
- Altera_Forum
Honored Contributor
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. - Altera_Forum
Honored Contributor
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. - Altera_Forum
Honored Contributor
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? - Altera_Forum
Honored Contributor
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. - Altera_Forum
Honored Contributor
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're debugging optimised code you may want to debug in assembler mode] - Altera_Forum
Honored Contributor
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'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. - Altera_Forum
Honored Contributor
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. - Altera_Forum
Honored Contributor
Have you seen similar (bad) results if there is an 'f' 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? - Altera_Forum
Honored Contributor
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. - Altera_Forum
Honored Contributor
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's Entry and PC pointer. Thank you.