Forum Discussion

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

Help: assemble langurage development

Hi,

I want to develop nios ii firmware using assemble langurage. The firmware will run in the onchip_memory. My questions are,

1), how to deside the sp address?

2), how to set the exception address in SOCP?

Thanks,

eRen

3 Replies

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

    Hi,

    - the stack grows towards lower memory, so put it at the highest accessible memory location.

    - setting the exception address can be done in the second tab sheet of the SOPC builder

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

    eRen,

    setup of the stack pointer is made in file crt0.s. Copy this file from &#39;<NIOS-Dir>\components\altera_nios2\HAL\src\&#39; to your software directory and make your changes. If the compiler finds this file in your directory it is not searched further.

    Mike