Hi,
If you're getting an invalid pointer error, it sounds like it is on the host side of the code. I haven't dealt too much with SOCs so I'm not sure of the differences that may arise.
It looks like the last call to the AOCL_Utils is the setCwdToExeDir() in the valgrind report. I would remove that call to the function in your main program since that exists in many of the examples (It's usually in the
init() function in the OpenCL Examples). To my understanding it just changes your working directory, I don't really know the purpose of this but it may cause unexpected results later down the road. The code in the examples will probably look like this:
bool init(){
cl_int status;
if(!setCwdToExeDir()){
return false;
}
...
}
To get a better understanding it might be good to run gdb to see which pointer is invalid.
To get gdb running you'd first need to compile with the debug info flag which is normally
-g on your host code then you can run gdb like a normal program but with the gdb command before it.
gdb ./hpsfpga1dtest
.
There are signal interrupts that need to be ignored so you can put in
handle SIG44 nostop
and then run your code with
r. When it hits the invalid pointer it should exit and then you can enter
bt to get a backtrace which will get you the last line from your code that was being executed.
If you don't ignore the interrupts, the program will stop at the interrupts treating them as breakpoints, so you'd need to press
c to continue the program execution.
From there, what line does the program fail on?
If I had to guess I'd say it almost looks like it can't find the aocx file?