This article describes the settings and some instructions in the SDK when using FreeRTOS's idle hook function in zynq.
At the beginning of the game, Zynq found that FreeRTOS can be run in zynq and tried decisively; several examples were tested, everything works fine, but it fails to execute normally when using the idle hook function.
To use the idle hook function, you must define configUSE_IDLE_HOOK in the FreeRTOSConfig.h file to 1. Of course, you have manually changed its definition to 1 before compiling, but the idle hook function still does not run.
Check the source file did not find the error, inadvertently reconfirm whether configUSE_IDLE_HOOK is changed to 1, check the FreeRTOSConfig.h file configUSE_IDLE_HOOK defined as 0, modify again, recompile and run, no, then look, configUSE_IDLE_HOOK is defined as 0, ah The BSP should be regenerated when the project is compiled, and the default configUSE_IDLE_HOOK is defined as 0, so configUSE_IDLE_HOOK returns to 0.
Find the reason and enter the following process
Unsuccessful processingAdd #define configUSE\_IDLE\_HOOK 1 directly to the source file (including the main implementation file)
Of course, this is not the case. When compiling FreeRTOS, configUSE_IDLE_HOOK is 0. The configUSE_IDLE_HOOK defined here is only useful when compiling the source file, and the source file does not use this macro, so this change is not acceptable.
Of course, putting #define configUSE\_IDLE\_HOOK 1 in the FreeRTOS.h file containing the FreeRTOSConfig.h file contains #include "FreeRTOS.h", and the same is true.
Modify the source file of the SDK with BSP It is possible to modify the source file of the FreeRTOS BSP directly from the SDK.
When you find the BSP directory of the SDK (E:\Xilinx\SDK\2015.3\data\embeddedsw\ThirdParty\bsp\freertos821_xilinx_v1_0, assuming the vivado installation directory is E:\Xilinx), the search finds that there is no FreeRTOSConfig.h file at all, so This method is not feasible.
(It was later discovered that FreeRTOSConfig.h was generated at compile time)
Later, I found information on the Internet and found the official website (I personally think that Xilinx official website information is still quite a lot, unlike LatTIce is too little, or I may not find a way), I found a custom BSP method (AR# 63964), but In the example, the method of custom stand alone BSP is modified in a similar way, but it may be different from the stand alone because of the modification of FreeRTOS BSP. Finally, the modified BSP is selected, and each time the BSP is generated, the freertos821_xilinx.tcl error will be executed. , did not solve, to be processed later, so this method has not been successful.
SolutionIn the end, it’s really, I’m going to break through the iron shoes, I don’t have to work hard; I found out that I was too worried. The SDK has already considered this. Right click on the BSP->Board Support Package SetTIngs, you can see the following figure.
There is a setting directly here, directly set use_idle_hook to true (there are more settings on FreeRTOS, such as STDIO, heartbeat hook function, etc.).
It’s a simple question, it can even be said to be a problem that doesn’t exist, and the online search really didn’t find a description of similar situations. It took a lot of time. Here is the record here. Unsuccessful processing can also be used as an alternative to other problems in the future. method.
other Add #include "queue.h" for applications that use queues; add #include "semphr.h" with mutex
To use xil_printf, add #include "xil\_printf.h"; use the macro definition in vivado to add #include "xparameters.h"
Rigid-flex board is a circuit board with FPC characteristics and PCB characteristics formed by combining flexible circuit boards and rigid circuit boards according to relevant process requirements through lamination and other processes.
The rigid-flex board has both the characteristics of FPC and the characteristics of PCB. Therefore, it can be used in some products with special requirements. It has both a certain flexible area and a certain rigid area, which saves the internal space of the product and reduces the The finished product volume is of great help in improving product performance.
Rigid-Flexible Board,Rigid-Flexible Circuit Board,Rigid-Flexible PCB Fabricator,Rigid-Flexible PCB Manufacturer,Rigid-Flexible PCB Supplier
Huizhou Liandajin Electronic Co., Ltd , https://www.ldjpcb.com