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++

how to modify alt_sys_init()?

Altera_Forum
Honored Contributor II
1,446 Views

hello,everybody,when bulid a project,alt_sys_init() initializes every single device in your system--even ones which your application may not use,how can i to modify alt_sys_init() so as to initializes the only device which my project own,the altera dev_kit documents says a "readme.html" file give a example,but i can not find it,can every find it or know how to do it ,thank you,my email:niezedong@163.com

0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
400 Views

hi cosmosd, 

 

check the "hello_alt_main" example that comes with the nios2 ide.  

 

--wolf
0 Kudos
Altera_Forum
Honored Contributor II
400 Views

yes , i have found the readme.txt that gives a example,thank you!wolf, 

but i have another question,how can i generate .elf in the nios 2 IDE,i want to downlode a program into the flash that can run at the reset time,i use the flash programmer ,but it must the *.elf file,but i do not know how to generate *.elf in the nios 2 IDE, i have a think that if can run run in the nios2 SDK shell,but in the shell,use" nr ××.c ",the error message is no makefile,have every one tell me how to generate .elf file in the nios 2 IDE and how to compile C.file in the nios2 SDK shell successfully. 

 

thank you!
0 Kudos
Altera_Forum
Honored Contributor II
400 Views

usually, Nios II IDE generates elf files by default. 

In your project properties dialog check if the Binary Parser under C/C++ Build is set to GNU Elf Parser. You will find the .elf file in the debug directory of your project.  

The autogenerated makefile generated.x is located in the syslib directory in debug\system_description\. 

Because I am not using the sdk at all, I can't help you with that question, sorry. 

 

--wolf
0 Kudos
Reply