Build and compile tiny6410 bare metal project in DS-5.11

Source: Internet
Author: User

1. Create a project

Click file and select new-> cproject. In the displayed C projec window, enter your project name in project name, and select bare-metal executable (bare metal executable) under project type) empty Project in the folder, select armcompiler for toolchains, and click Finish. You can see your project name in the project explorer column on the left of the main window.

2. Add the source file and header file to the project.

2.1 create a source file and header file in the project

Right-click your project folder, select new-> sourcfile, and enter your source file name and extension. c. Save. Right-click your project folder and select new-> headerfile. Fill in your header file name and extension. h.

2.2 add existing files to the Project

Find the Save path of your project, copy the corresponding source file to your project, right-click the project folder and select refresh. The file will be displayed.

 

3. Modify the compilation tool Configuration

If you want to use your makefile,Right-click the project folder, select the C/C ++ build column on the left of properties, and remove genarate makefile automatically.

If you do not need your makefile,Right-click the project folder, select Properties, expand the C/C ++ build column on the left, and click setting. A series of Windows will appear on the right. Set the toolsetting column of the First window.

Select the initdes configuration folder under arm ccompiler, add your header file path to the includepath (-I) on the Right, enter the optimizations configuration folder, and set it to optimization level (-O2 ), go to the code generation configuration folder and set targetcpu to ARM1176JZF-S.

Select the codegeneration configuration folder under arm Cycler and set target CPU to ARM1176JZF-S.

Select the general configuration folder under arm linker, set the image entry point as the startup label of the startup code, you can also enter the port address directly, target CPU is the ARM1176JZF-S, select the Image Layout configuration folder, set Ro base address 0x50 00 0000. Select the additional infomation configuration folder and check the list total codeand data sizes of output image.

Set the buildsteps column in the second window, and enter the following command fromelf -- bin -- output = xxx under the command of post-Build Steps. bin XXX. axf, where XXX is your project name, XXX is the BIN file name you want to generate.

Set the artifact column in the third window, and enter axf in artifact extension.

Click OK in the lower right corner.

 

4. compile the project

Right-click your project folder and select buildproject. The compilation and link information is displayed on the console of the main window.

Build and compile tiny6410 bare metal project in DS-5.11

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.