Altera_Forum
Honored Contributor
19 years agoRunning from on-chip memory.
I have been trying for several days to get a custom board to run Nios II embedded processor with a hello world program with no luck. I have successfully achieved this task with evaluation kits, but so far not with my board. I have searched this forum and tried several things that I saw, but I had no luck.
My board is about as simple as they come. A Cyclone, EPCS4, and oscillator with both an active serial programming header and JTAG header (pulled directly from the Altera manual). I have used the FPGA for other tasks (so the board works), but I have only just started trying the Nios processor. My current SOPC configuration is: - Nios II/s with debug level 1 running at 50Mhz. - UART - JTAG UART - On-chip Memory configured as ROM - On-chip Memory configured as RAM - EPCS Controller In the FPGA configuration, I have a PLL taking 25Mhz and upping it to 50Mhz for the clk line of the processor. I have all the pin assignments set to output pins with the exception of the reset_n line which is set as an input pin normally vcc. In the Nios IDE (v5.1), I have setup a "hello world small" program. The system library is set to output stdin/out/err to the jtag uart and the rom gets the text and the read-only info, while the ram gets the read-write/heap/stack info. I program the FPGA configuration and then perform a "run as hardware" in the IDE and everything goes with no errors. I am expecting to see the hello world output in the terminal, but I don't. Sometimes I get a series of ascii characters like the baud rate is wrong, other times I get nothing. I have tried changing my clock speed with no luck. I tried to add some serial uart code from a previous (known good) program to see if it was just bad JTAG communication. It seems that the program is not running at all. No serial activity at any baud rate... I do see the rom and ram *.hex files being created. I have tried to recompile the FPGA configuration and re-program the FPGA but the program doesn't run. How can I verify that the new *.hex files were included in the configuration? I have tried: - changing the clock input speed (lower and higher than 50Mhz) - various memory configurations (started with a single on-chip memory) - various hello-world programs (stand alone, small, normal, etc) - to get debug info going through the UART - looked at the clock input on an external IO and it is there - to change the reset address to the EPCS - and more. I must be missing something simple. Can anyone give me any ideas? I am running out of hair to pull out! Thanks Chris Lathan