Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12690 Discussions

Help: assemble langurage development

Altera_Forum
Honored Contributor II
1,230 Views

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
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
441 Views

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
0 Kudos
Altera_Forum
Honored Contributor II
441 Views

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
0 Kudos
Altera_Forum
Honored Contributor II
441 Views

Thanks Mike and Stefaan. 

 

eRen
0 Kudos
Reply