i wrote a program for a test in C++ on my PC in Eclipse. I thought : if i change it into C Nios will have it easier. So I translated it into C. I Thought copy and pasting it would be enough. Then i discovered NIOS 2 Eclipse hat some difficulties with my Code. It wasnt able to include conio.h , math.h and so on. I thought ok.. Even if the Error is not written explicit there , i will change those functions to own written ones . It worked But other Error with no description appeared. It was jsut a global 2 D Array which i had to put into my main. I passed the pointer to all my functions . Then it compiled with no Error. I thought , ok, now the output on screen must be correct. But it wasnt. I also copied it back into my Eclipse on my PC. There it worked fine. I discovered , that my Program on NIOS Eclipse does 3 functions in the main and then jumps back xD. It was a deep shock for me.
Maybe you can tell me what is going on here .
Thank you for any advice :D
It may has something to do with the compiler or the BSP package.
Ah yeah fopen also didnt work. Even if i activeted something in the BSP ( maybe i need to do it different)
A a nice time !
I am expecting you checked the code by running it step by step to know that the NIOS II jumps back after executing the three functions. Can you check if the NIOS II restarts after executing these three functions?
If yes you have to check for any invalid instructions made by the system. I recommend you to set an IP in the Qsys design to be the "Default Slave" IP to clear any invalid instructions to avoid the false reset. This false reset happens if the cash is full/overlapped and etc.
>I am expecting you checked the code by running it step by step to know that the NIOS II jumps back after executing the three >functions. Can you check if the NIOS II restarts after executing these three functions?
>If yes you have to check for any invalid instructions made by the system.
Yes I first was just surprised. Then I launched the Debugger ( the Bug-icon) it goes through instructions step by step. Even as a beginner I saw clear signs that it really "jumps" back.
>Can you check if the NIOS II restarts after executing these three functions?
This is what I am really curious about. I couldn't understand it with my methods of debugging I will change some pointers to be not global. Maybe this is what crashes it down. I also will check if the error messages are allowed on all levels so I can see if there are some hidden errors noticed by the compiler
> I recommend you to set an IP in the Qsys design to be the "Default Slave" IP to clear any invalid instructions to avoid the false >reset. This false reset happens if the cash is full/overlapped and etc.
Interesting ! First I will check, like I said the global variables and pointers. If this won't help I will invest time to setup a "Default Slave" ( havn't done it before - this is why I didnt do first).
Thank you a lot . It was improtant for me to talk about this- I will check it out :D
Wow I now put all my global variables into the main and it works better now. It is just a little bit slower and ONE!!!! character is missing xD
Maybe because the connection between NIOS and the console is bad ?
Greate, so let's check why it is slow and how it is missing a character.
Having the connection between the NIOS II and the console can happen but you can check the cable and set up the JTAG frequency to bet better connection.
Please check the following link to change the JTAg configurations: