Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

Minimal Setup of NIOS + EPCS not Working

Hi,

I am trying to insert the EPCS serial Flash Loader to a NIOS system without any success. I would like to know if someone has an idea what is missing.

.sopc file is attached, and it is an architecture as follows:

CPU

EPCS_Flash_controller

jtag_uart

sysid

clock 50Mhz

OnchipRAM 128K (Any program even hello world is at least 57K :-( )

Nothing More..

Pretty Simple isnt it? I have been narrowing the project to get to this very simple project and it still not working. ( I am out of ideas )

on Quartus I only define the Clock and Reset Pins, with its location asignment.

Compile OK

I have a .sof and .elf

on Flash Programmer

http://www.alteraforum.com/forum/attachment.php?attachmentid=2746&stc=1&d=1279028786

This is the complete LOG that I see, while scrolling on the Flash PRogrameer

http://www.alteraforum.com/forum/attachment.php?attachmentid=2747&stc=1&d=1279029165

Any ideas what can it be?

I will also put the .c file in the .zip, it is only a super dumm program just to test if it boots.

I will really appreciate your help if this can be solved.

The Board and Hardware is working since I can Programm the Flash with a .jic file if I load a design having the Serial Flash Programer gernerated from the Wizzard., in that case Auto Detect sees correctly the EPCS16

But not if it is done from NIOS.

Thankyou!

:p

6 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Do you need to get the jtag debugger code to run the nios cpu from its reset vector (presumably code in the EPCS interface)?

    I just removed the jtag debugger completely when we started loading code by other means (and exporting the nios reset signals to an avalon slave).
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    At the moment the jtag debugger is the only way of looking if nios is running, by reading out the stdio.

    I might try it now without jtag debugger, I will try to use some other means, like maybe a normal serial rs232.

    This board is ment to be debugged via TCP, but if this simple project is not running, I am far from being able to debug via tcp. (this was the original project, but at this moment I am trying to do keep it simple untill it works and then I need to put the epcs on the original project with tmac etc.)

    Thankyou
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Serial is always useful. Failing that a single LED!

    These days it is possible to get TTL <=> USB serial adapters that plug onto a 4 pin 0.1" (and probably other) header. They significantly reduce the board space (and cost) of adding a serial debug port.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thankyou dsl,

    it is a good hardware solution for next time. At the moment I allready got the serial connector attached to some free GPIO I had free on the board.

    The Version Without JTAG serial but instead a normal UART is at least smaller, < 1K, However I still have the same problem with EPCS.

    Flash Programer can not access it.

    I am wondering what is the last lines on the log.

    EPCS signature is 0x00

    EPCS identifier is 0x000000

    "No EPCS layout data - looking for section [EPCS-000000]"

    Unable to use EPCS device

    Leaving target processor paused

    Error code: 8 for command $SOPC_KIT_NIOS2/bin/..........

    in SOPC the flash is in 0x00041800,

    Why is it trying to find, so that it is going all the way to 0x00041B00?

    It is saying somethng about reserved fields non-zero...

    any ideas?

    Thanyouo again.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Serial is always useful. Failing that a single LED!

    These days it is possible to get TTL <=> USB serial adapters that plug onto a 4 pin 0.1" (and probably other) header. They significantly reduce the board space (and cost) of adding a serial debug port.

    --- Quote End ---

    Hi dsl,

    I change allready the jtag uart for a real uart. and it is running as before.

    However the EPCS problem is still there,, Any ideas?

    P.S. When I press the reset program is not starting again, I asume it is because it is jumping to the reset address pointing to the flash. how can I make it jump to the starting address without recompiling the sopc?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Hi,

    I am trying to insert the EPCS serial Flash Loader to a NIOS system without any success. I would like to know if someone has an idea what is missing.

    .sopc file is attached, and it is an architecture as follows:

    CPU

    EPCS_Flash_controller

    jtag_uart

    sysid

    clock 50Mhz

    OnchipRAM 128K (Any program even hello world is at least 57K :-( )

    Nothing More..

    Pretty Simple isnt it? I have been narrowing the project to get to this very simple project and it still not working. ( I am out of ideas )

    on Quartus I only define the Clock and Reset Pins, with its location asignment.

    Compile OK

    I have a .sof and .elf

    on Flash Programmer

    http://www.alteraforum.com/forum/attachment.php?attachmentid=2746&stc=1&d=1279028786

    This is the complete LOG that I see, while scrolling on the Flash PRogrameer

    http://www.alteraforum.com/forum/attachment.php?attachmentid=2747&stc=1&d=1279029165

    Any ideas what can it be?

    I will also put the .c file in the .zip, it is only a super dumm program just to test if it boots.

    I will really appreciate your help if this can be solved.

    The Board and Hardware is working since I can Programm the Flash with a .jic file if I load a design having the Serial Flash Programer gernerated from the Wizzard., in that case Auto Detect sees correctly the EPCS16

    But not if it is done from NIOS.

    Thankyou!

    :p

    --- Quote End ---

    Dear rubenc,

    I have encounter the same problem. How did you solve this problem? It is appreciated to give me a guidance to solution. my email is simon_100@sina.com. Thank you!