Use B-core in uClinux for bf561 (1): Example

Source: Internet
Author: User

We know that bf561 is composed of two identical kernels, while uClinux only uses the core. Normally, the B core does not work. However, in uClinux for bf561, a drive-based B-core operation is possible, and a corebld application is also provided. Program It can load the specified program to the B-core for running. Next, let's try the following steps in user/blkfin_apps/corebld/readme: 1. Choose bf561 core B support tools from user settings> Blackfin app programs, in this way, uClinux will compile and generate the corebld application and coreb_get_testarg in Bin. In addition, a dualcore_test.ko module is generated under the test_module directory. However, this module is not copied to romfs by default. Therefore, we need to manually copy it to the romfs directory, in this way, you can package it into uimage in the next make operation. 2. Download uClinux and run root:/bin> insmod. /dualcore_test.kodualcore_test: module license 'Unspecified 'taints kernel. dual core test module inserted: Set testarg = [1] @ [feb00000] This module runs in core A. during initialization, it writes an integer 1 to the address 0xfeb0 0000, and then waits for the program running in the B-core to modify the value at this position, when the module is uninstalled, it will output the value at the address 0xfeb0 0000 again to prove that the program in the B-core has modified this value. 3. Run root: /bin> corebld defaults 2 starting core B 00000 wrote 208 bytes to 0x0xff600000write 4096 bytes to 0x0xff500000wrote 4096 bytes to 0x0xff500000 at this time, the program coreb_get_test_arg in the B-core should modify the 0xfe. From corebld. C Code We can see that it actually reads coreb_get_test_arg as a normal file and extracts the corresponding executable code, call the functions provided by/dev/coreb to write the executable code to L1 instruction memory of the B-core, and then call the driver function to execute the code. From this process, we can see that the executable file formats that corebld can call are limited. Currently, corebld can only analyze files in ELF format. 4. Run root:/bin> rmmod dualcore_test.kodual Core Test Module removed: testarg = [2]. Therefore, coreb_get_testarg has changed the value to 2.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.