Severson-Group / AMDC-Firmware

Embedded system code (C and Verilog) which runs the AMDC Hardware
http://docs.amdc.dev/firmware
BSD 3-Clause "New" or "Revised" License
30 stars 5 forks source link

Modify FreeRTOS base kernel for AMDC Compatibility #328

Closed codecubepi closed 8 months ago

codecubepi commented 9 months ago

Split from #320

Modify the downloaded FreeRTOS kernel to make it compatible with the AMDC Zynq-7000 platform

This issue will likely need to be split once I better understand the scope of work, target is two weeks.

Resources:

codecubepi commented 8 months ago

Update as of 01 Nov 2023:

I ran some testing of the Dual-Core configuration of the Hello World FreeRTOS program.

When trying to debug and step through each cpu independently I notice the following:

cpu0

cpu0 gets stuck in the boot.S (/amdc_freertos_bsp_cpu0/ps7_cortexa9_0/libsrc/standalone_v7_0/src/boot.S) assembly code and never reaches main()

When stepping though the debugger, it reaches the CheckEFUSE label, but never takes the conditional branch to OKToRun on line 181. Instead it seems to get stuck in some loop after the following ldr instruction.

image

cpu1

cpu1 occassionally reaches main(), and I will see a print over serial from cpu1 in the image below. This happens when I let both cores run freely.

Sometimes cpu1 appears to also get stuck in a loop before reaching main(). This issue seems to occur when I am stepping though the early execution of cpu0... if I understanf correctly, cpu0 sets up correct execution for cpu1, so if I interrupt this process in cpu0, I get issues in cpu1.

image

Debug help would be appreciated.