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

Software Reset

Altera_Forum
Honored Contributor II
1,094 Views

I am trying to implement a software reset (from an incoming command on my system) using the code that is shown in many previous posts on this forum. This uses the following macro: 

 

 

#define NIOS2_RESET()\ 

 

NIOS2_WRITE_STATUS(0);\ 

NIOS2_WRITE_IENABLE(0);\ 

((void(*)(void))NIOS2_RESET_ADDR)() 

 

 

This macro is then called at an appropriate point in my code. However, when I try to compile this I receive a waring of implicit declaration for the middle two lines (NIOS2_WRITE_STATUS and NIOS2_WRITE_IENABLE) and a linker error for the same two lines. I guess I am missing something somewhere, but can anyone tell me what?? Note that this project is not using development kits/boards. Thanks for your help. 

 

 

0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
387 Views

You probably forgot to include nios2.h. 

 

#include "nios2.h"
0 Kudos
Reply