1Development Environment Only for visual DSP
4.5 Debugging is performed, but 5.0 does not.
2Directory structure 1. During the transplantation process, the original directory structure is basically retained. 2. A new vdsp subdirectory is created under the root directory to save the vdsp project files and generated temporary files. The final dxe file is also saved here. 3. Change the ASM-Blackfin name in the include directory to ASM, because alias cannot be used in windows. 4. Create a project file named after the directory name for the files in each subdirectory.
3CodeModify 1. During the porting process, all codes are commented out by using tools, and corresponding annotations are removed as needed. So if you find that functions or struct that can be used elsewhere cannot be used here, or there is a link error, do not be surprised. Please look for the declaration or implementation in the source file, remove the comments. Of course, there may be errors and debugging is required. 2. Use the tool to insert a statement in the first line of each. c file: # include <config. h> This is a new file, which is not in the original system. The purpose of this file is to influence some behaviors of the compiler. The system configuration is also placed in this place. 3. For a self-added driver, add a dummy function and reference it in the main function. Otherwise, the link may not be correct (I don't know if it is a bug of vdsp, I am still alone ). 4. For files automatically generated in make or configure, the method is to generate the files first in Linux and then copy them. If you find that there is a lack of automatically generated files, refer to this method. 5. In the original system, head. s directly jumps to the start_kernel function to start execution. When porting, it is changed to the main function, and then start_kernel is called in the main function.
4CRT In bf561, the CRT files used by the and B cores are different. The CRT files used by the core are headers in uClinux. S (ARCH/Blackfin/mach-bf561) while B core still uses the uclinux_basiccrt.s generated by the vdsp wizard. If you want to use multi-core functions in the VDS database, such as testset, add the following in head. S: // Initialise the multi-core data tables. Call. X _ mc_data_initialise; . Extern _ mc_data_initialise ;. type _ mc_data_initialise, stt_func; if you want to use C ++ code in core A, add: //////////////////////////////////////// /// // cplusplus Call. x ___ ctorloop; // run global scope C ++ Constructors . Extern ___ ctorloop;. Type ___ ctorloop, stt_func;
5Rootfs The generation of rootfs is completed by cross-Compiling in Linux, and ext2 file system is used. Before using rootfs, go to head first. s or the main function is interrupted. Open the memory window, find the _ end symbol, and then use memory fill to insert root_fs to the _ end address. Note: Select hex32 for the fill data type. Rootfs can be downloaded from csdn resources.
6Link file The original U-boot link file is arch/Blackfin/kernel/vmlinux. lDs. s, which is not used in the transplantation. Instead, the LDF file generated by the vdsp wizard is used. However, refer to vmlinux. lDs. s content was partially modified.