Forum Discussion

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

please help me the more the better

#include <stdio.h>

int main()

{

printf("Hello from Nios II!\n");

return 0;

}

i use on chip ram and jtag_uart can output correct:"hello from nios II!"

but use ext_sram and jtag_uart :nios2-terminal: connected to hardware target using JTAG UART on cable

nios2-terminal: "USB-Blaster [USB-0]", device 1, instance 0

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

can not output

please help me why?thanks!

2 Replies

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

    --- Quote Start ---

    originally posted by dspchunjie@Oct 31 2005, 11:35 AM

    i use on chip ram and jtag_uart can output correct:"hello from nios ii!"

    but use ext_sram and jtag_uart :nios2-terminal: connected to hardware target using jtag uart on cable

    nios2-terminal: "usb-blaster [usb-0]", device 1, instance 0

    nios2-terminal: (use the ide stop button or ctrl-c to terminate)

    can not output

    please help me why?thanks!

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=10693)

    --- quote end ---

    --- Quote End ---

    If it works from onchip_ram but not from ext_sram, it is probably a problem with the access to the memories.

    Try to debug the system, and see what kind of code you are executing... if you find that the assembler instructions the CPU is executing is something like "00...000" or "fff...ff", then it&#39;s probably a problem in the access to the memories.

    ...Are you able to debug the application from the Nios II IDE?

    bye

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

    What speed are you running the sram at? That memory is an asyncronous device so offchip timing is important to focus on.