-
Posts
18 -
Joined
-
Last visited
Community Answers
-
BMiller's post in Vitis2022.2 pointer error was marked as the answer
I can't speak to the sample program specifically, but when malloc fails it usually returns NULL. So try
if (flash_env == NULL) {
return XST_FAILURE;
...
Note, you probably have to include stdio.h to get the definition of NULL.
Disclaimer: It's been 40+ years since I regularly programmed in C.