Forum Discussion

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

Ask for help about on-chip memory

Hi everyone

When I used the on-chip memory,I meet the error as following:

D:/QuartusII_project/nios_turorial_2/lights_syslib/Debug/liblights_syslib.a(alt_dev_llist_insert.o)(.text+0xdc): In function `alt_get_errno':

/cygdrive/d/altera/kits/nios2_51/components/altera_hal/HAL/inc/sys/alt_errno.h:81: Unable to reach errno (at 0x00000024) from the global pointer (at 0x00009a0c) because the offset (-39400) is out of the allowed range, -32678 to 32767.

I want to konw how to deal with the errors.Waiting for help!

2 Replies

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

    You should try using the search feature of the forum. Search for "global pointer". There is a lot of information on this topic.

    In any case, the -G0 (that's zero) compiler flag should prevent data from being linked into .sdata and/or .sbss.

    Cheers,

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

    Oh,I change the memory size to 40K,the problem is solved.

    But,the new problem is coming.

    when I run as niosII-Hardware,the message is as following:

    Using cable \"USB-Blaster [USB-0]\", device 1, instance 0x00

    Pausing target processor: not responding.

    Resetting and trying again: FAILED

    Leaving target processor paused

    My code is so simple,as following:# include <stdio.h>

    int main()

    {

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

    return 0;

    }

    Why?Could you help?