Code Monkey home page Code Monkey logo

ingenic-toolchain-v5.2's Introduction

交叉编译工具链

君正交叉编译工具链r3.2.1版,基于Binutils-2.25、GCC-5.2、Glibc-2.22以及UClibc-0.9.33,支持君正MXU和MXU2指令集。

部署工具链

本文档将指导开发者部署并测试交叉编译工具链,文中默认工具链存放路径为“~/CU1000-Neo/toolchain”。

1. 设置环境变量

执行以下命令:

export PATH=~/CU1000-Neo/toolchain/bin:$PATH

然后即可使用mips-linux-gnu-gcc和mips-linux-gnu-g++来编译程序。

2. 测试工具链

创建helloworld.c文件,内容如下:

#include <stdio.h>
int main(void)
{
    printf("Hello world!\n");
    return 0;
}

然后执行以下命令:

mips-linux-gnu-gcc -O2 -o helloworld helloworld.c

如果能正常完成编译,则说明工具链可以正常使用。


Cross-compile toolchain

Ingenic cross-compile toolchain r3.2.1 version, based on Binutils-2.25, GCC-5.2, Glibc-2.22 and UClibc-0.9.33, supports Ingenic MXU and MXU2 instruction set.

Deploy the toolchain

This document will guide developers to deploy and test the cross-compile toolchain. In this document, it is by default that the storage path of the toolchain is "~/CU1000-Neo/toolchain".

1. Set PATH environment variable

Run the following command:

export PATH=~/CU1000-Neo/toolchain/bin:$PATH

Now you can use the mips-linux-gnu-gcc and mips-linux-gnu-g++ to compile programs.

2. Test the toolchain

Create a helloworld.c file with the following contains:

#include <stdio.h>
int main(void)
{
    printf("Hello world!\n");
    return 0;
}

Then build it:

mips-linux-gnu-gcc -O2 -o helloworld helloworld.c

If helloworld can be built correctly, it shows that the toolchain has been deployed properly and can be used normally.

ingenic-toolchain-v5.2's People

Contributors

tobunto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.