[Lab2] Flash exceptions

[Lab2] Flash exceptions

by Dominic Robert Heinrich Hagmann -
Number of replies: 1

So I have still been struggling with getting the software profiling to work. In a few test runs where I keep the amount of data very small, I actually managed to get a gmon.out file. Now in most other cases, when I program the CPU and then start it, the program kind of hangs itself up and never really returns.

So now with the signal tap logic analyzer and the niosII plugin for it, I was able to collect some trace data of the program execution. So the program actually never makes it into my main function and there seems to be some kind of exception, that causes the processor to reset itself.

So after hitting instruction wrctl status, r2 there are no instructions executed for some time and then the processor jumps to the __flash_exceptions_start.

I also looked up this symbol in the .objdump file.

Does anybody have an idea, what could lead to this error?

Attachment Screenshot from 2020-04-28 19-35-26.png
Attachment Screenshot from 2020-04-28 19-36-09.png
Attachment Screenshot from 2020-04-28 20-28-15.png
In reply to Dominic Robert Heinrich Hagmann

Re: [Lab2] Flash exceptions

by Dominic Robert Heinrich Hagmann -

Actually I have now solved my problems for using the gprof tool.

So I think there was some issue with the heap. I was allocating the memory for the accelerator with malloc.

So I changed:

1. No dynamic memory allocation (malloc, free)

2. Prevented all printf

3. Had to open a second niosII command shell. In this I called the command > nios2-terminal
    After this the restarting and loading of the gmon.out file worked much much faster and the generation only
    failed for the first execution of a newly compiled *.elf file.