FreeRTOS on Xilinx ZedBoard (ZC702) does not boot

manofhope wrote on Saturday, September 26, 2015:

Hi everybody,

I am a Student, and i have received the job, first to get used to FreeRTOS and make it run on the ZedBoard and later develop some applications.
First managed to run a BareMetall “Hello World” on the Board, which i generated from a template inside of the SDK. The result of the print printed out in a serial terminal.
My next step was to get a FreeRTOS Demo run on the Board. Therefore I imported the provided Projects (HW, BSP, Application) to the SDK. But neither the BlinkyDemo, nor the FullDemo run. The Application builds without any errors or warnings.
A Debugging Session shows, that the Board crashes somewhere during the bootsequence. I’ve copied the executed Codelines:

_vector_table:
	B	_boot
    
(... Debugger jumps)
   
#if XPAR_CPU_ID==0
    /* only allow cpu0 through */
	mrc	p15,0,r1,c0,c0,5
    and	r1, r1, #0xf
	cmp	r1, #0
	beq	OKToRun
    
(... Debugger jumps)
 
OKToRun:
	mrc     p15, 0, r0, c0, c0, 0		/* Get the revision */
	and     r5, r0, #0x00f00000 
	and     r6, r0, #0x0000000f
	orr     r6, r6, r5, lsr #20-4
    
(... Debugger jumps)
    
00000004:   stclvc  4, cr0, [r10, #-376]  

The last Step with 00000004 is the last executed Step. afterwards the Debugger wount step any further. And if i click ‘run’ to the next breakpoint nothing happens.

This behavior shows with FreeRTOS V8.2.2 and V8.2.0 (or, i tried only these two).
My duedate is coming closer and i am absolutly cluless, what i should do to solve this problem.
I hope anybody can help me with this one.

rtel wrote on Saturday, September 26, 2015:

As the crash is in the boot sequence, I don’t think the problem is necessarily a FreeRTOS one directly, but something in the setup of you debug session, or vector table.

You say you are running the demo in the debugger - do you have your debugger configured to run the ps7_init macro, as shown on the image link below, which is displayed in the “Starting a debug Session” of the documentation page for that port.

http://www.freertos.org/Zynq_target_setup_tab.jpg

That must be called to configure the system. If you are booting without the debugger then you must instead add the function call into your code (as a C function call).

manofhope wrote on Sunday, September 27, 2015:

Thanks for your fast reply!
I configured the Debugger as described in the documentation page. The ps7_init macro is defined and should be run.
I think , that there must be something wrong with the debugger configuration or the vectortable, but i never touched anything there. I thougt, that the Demo should run on a supported platform without changing things there.

The documentation writes, that in the beginning of the main section the vectortable is loaded in the Demo. I can confim this, that there is the function vPortInstallFreeRTOSVectorTable(), that sould be called during the function call of prvSetupHardware(), which is the first call in the main function. The function replaces the standard vectortable, that is loaded by the BSP. But my board never reaches this section of code. The board gets stuck, before it begins to execute the application code.

If there are any Information that could help, please let me know, so i can post them here.

manofhope wrote on Sunday, September 27, 2015:

manofhope wrote on Sunday, September 27, 2015: