nazwantsdiy wrote on Wednesday, November 16, 2016:
I do not know how to change/update the SDK environment. The question above is a consequence of a problem that I started having when using freeRTOS. So, I though that switching to “static” would fix it. But maybe you could suggest what could be the problem in the following:
Xilinx SDK 2016.1 freeRTOS823_xlinx OS platform
My code seemed to work fine until I introduced some freeRTOS elements. The general functionality of my code as follows:
- In the Interrupt subroutine, I assign a value to a variable focusPosition read from the IP register:
static void ISR(void *CallbackRef)
focusPosition = XRb_focus_Get_position_o(CallbackRef);
- Then I printf the value to the console in the main function:
extern u32 focusPosition;
The code prints the correct value, however, when I try to implement some additional lines in the code, like xTaskCreate() xEventGroupCreate(), something messes up all the memory and the printed value stays constant, which is not correct.
How can simple addition of the code that has nothing to do with the variable have any influence on that variable? As far as I understand, the xTaskCreate() and xEventGroupCreate() are created on the heap. I tired pocking around to see if Xil_DCacheDisable() would help, but no. Any ideas? Is my focusPosition variable properly defined/declared?