Author Topic: Xil_Out32 causes my program to crash?  (Read 4907 times)

0 Members and 1 Guest are viewing this topic.

Offline BoscoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 279
Xil_Out32 causes my program to crash?
« on: March 31, 2024, 03:02:34 pm »
Hi all,

I created a Hello World FreeRTOS project in Vitis 2023.2 which works fine with xil_printf running with FreeRTOS timers. However, when I try to initialise AXI GPIO using the Xilinx libraries supplied in the demos, it crashes on calls to Xil_Out32 and Xil_In32. However if I build the peripheral_test example, everything works correctly. I've been over the differences between the two but I can't find anything. Even if I copy the code from the peripheral_test to my code, it doesn't work. I have checked the CMakeLists files and the linker files but the they are all the same. The values for the addresses and peripheral parameters are also identical in xParameters.h. Has anyone experienced this before?

Thanks!
 

Offline BoscoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 279
Re: Xil_Out32 causes my program to crash?
« Reply #1 on: March 31, 2024, 04:11:15 pm »
I have looked at both launch configurations and they are identical. the ps7_init.tcl is also exactly the same for both.

The only difference so far is the working peripheral_tests are on bare metal and my program is FreeRTOS. However, no FreeRTOS code gets called before the gpio_init function is called where Xil_Out32 is called and the crash occurs.
 

Offline BoscoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 279
Re: Xil_Out32 causes my program to crash?
« Reply #2 on: March 31, 2024, 09:29:00 pm »
So I found the issue... When creating the peripheral_test project, the latest .bit was being imported from the platform project. I wasn't regenerating the BSP when updating the platform project on my FreeRTOS project which meant the FPGA version was not being updated...

On top of this it seems the updated of the bitstream in the application side of things is unreliable. Even fully regenerating the platform, cleaning and updating all parts of the application, sometimes the bitstream does not get updated. I'm now sourcing the bitstream directing from the platform project to avoid any issues here.
« Last Edit: March 31, 2024, 09:39:43 pm by Boscoe »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf