RTOS on Trenz TE0722 board

Am failing to get a basic RTOS build up on the Trenz Zynq board. Have constructed a build as per the guide in “Mastering the FreeRTOS” (pre-release version). This in on Xilinx Vivado 2014.4 (for historic reasons) and under Windows 10. The construction of the project succeeds and can be downloaded to the target. However when executing, the processor crashes in vPortInstallFreeRTOSVectorTable() within prvSetupHardware(); I have noted the following: In debug when tracing, the address of freertosvector_table that is loaded is 0 – so does the code not simply copy the vector table over itself? That stepping through the routine vPortInstallFreeRTOSVectorTable, when the instruction dsb is executed the link register lr is clobbered. Hence when the bx lr instruction is executed we effect a re-boot (without a reset). Any ideas? Pete A

RTOS on Trenz TE0722 board

There are three options for creating a project: 1) Taking the existing Zynq demo from the FreeRTOS download, and re-targeting it for your hardware (replacing the hardware definition project to be correct for your hardware, then re-generating the BSP project from the updated hardware definition). 2) Manually creating the project from scratch by allowing the SDK to create a bare metal project that uses a standalone BSP, and then manually adding in the FreeRTOS source files. 3) Using the SDK to create a FreeRTOS BSP instead of a standalone BSP, and in so doing, having the SDK add the FreeRTOS source files into the project for you. Which method did you use?

RTOS on Trenz TE0722 board

Option 2 – following the guidelines in the manual. (Did not get option 3 that I have seen.) Have tried option 1 but cannot get to download – the debugger simply connects to the hardware and does not give a download option. Pete

RTOS on Trenz TE0722 board

Did you take the files you added to your project from the FreeRTOS V9.0.0 release? The SDK project in the V9.0.0 release uses the 2016.1 SDK, which may explain your download issue, as you are using 2014.4. In the Zync 7000 demo found in FreeRTOS V9.0.0 freertosvectortable is implemented in FreeRTOSasmvectors.S, where it is placed in the freertosvectors section. Looking at the linker file I see freertosvectors is then placed at the very start of the .text region, which means it should appear at 0x00100000. Looking at the map file I see freertosvectors does indeed appear at 0x00100000, but you are reporting that in your built freertosvector_table appears at address 0 – so could this be a linker script problem?

RTOS on Trenz TE0722 board

when tracing the code in vPortInstallFreeRTOSVectorTable() the address loaded to r0 is 0x00000000. So could be a linker problem. Am faily new to the Vivado suite. Have a long background in real time systems and using Keil microvision etc. Pete

RTOS on Trenz TE0722 board

Have a look at FreeRTOSDemoCORTEXA9ZynqZC702RTOSDemosrclscript.ld – I think the addition of *(.freertosvectors) was the only edit over the linker script that was automatically generated for the hardware I was using.

RTOS on Trenz TE0722 board

That’s it – thought it might be something simple and not in my knowledge base yet. Onward. Thanks awfully… Pete