[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Support new platform "Andestech" Platform
From: |
Thomas YS Liu |
Subject: |
Support new platform "Andestech" Platform |
Date: |
Fri, 6 Aug 2010 20:53:16 +0800 |
Hi All
Patches are us following
---------- 轉寄的郵件 ----------
寄件者: <address@hidden>
日期: 2009年7月1日下午3:59
主旨: Andes application porting guide
*Hi, all:* * *
Share you with the experiences in open source applications porting for Andes
platform.
* *
** Environment settings for Andes Toolchain*
# Andes toolchain setting
export ANDESIGHT_ROOT=/home/path/toolchains/nds32-elf-n1213-43u1h
export PATH=$ANDESIGHT_ROOT/bin:$PATH
# PREFIX folder
export PREFIX=/my/path/nds32
export CROSS_COMPILE="nds32le-linux-"
which ${CROSS_COMPILE}gcc &> /dev/null || export CROSS_COMPILE="nds32-elf-"
export HOST=${CROSS_COMPILE%-}
export BUILD="i686-linux"
export TARGET=${CROSS_COMPILE%-}
# Cross Toolchain
export BUILD_CC=gcc
export CC="${TARGET}-gcc"
export CXX="${TARGET}-g++"
export AR="${TARGET}-ar"
export AS="${TARGET}-as"
export RANLIB="${TARGET}-ranlib"
export LD="${TARGET}-ld"
export STRIP="${TARGET}-strip"
# Cross Compilation FLAGS (-EL is for little endian)
export NDS32_GCC_CFLAGS=-EL
#export CFLAGS="-EL -I$PREFIX/include"
#export CFLAGS="-EL -I$PREFIX/include -O2"
export CFLAGS="-EL -I$PREFIX/include -fomit-frame-pointer -funroll-loops
-O3"
# With Static Linking
#export LDFLAGS="-EL -static -L$PREFIX/lib"
With Shared Linking
export LDFLAGS="-EL -L$PREFIX/lib"
export ASFLAGS=-EL
export CXXFLAGS=-EL
note: The prefix of Andes toolchain is* nds32-elf* in AndeSight v1.3.x, but
we will modify the prefix to nds32le-linux since Andesight v1.3.3.
* Open Source Application Porting using Andes Toolchain
*1. Modify config.sub*
*1.1 Modify config.sub file* for individual package
This step helps the autoconf tool
<http://www.gnu.org/software/autoconf/>recognizing the Andes
architecture and machine type. You can follow the diff
file below to modify the corresponding field in your package’s config.sub
file.
*$ diff -u config.sub.orig config.sub*
*--- config.sub.orig 2009-03-03 14:45:26.000000000 +0800*
*+++ config.sub 2009-03-03 15:08:37.000000000 +0800*
*@@ -149,6 +149,7 @@*
* case $basic_machine in*
* # Recognize the basic CPU types without company name.*
* # Some are omitted here because they have special meanings below.*
*+ nds32 | nds32le \*
* tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \*
* | arme[lb] | pyramid | mn10200 | mn10300 \*
* | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 |
hppa1.1 \*
*@@ -171,6 +172,7 @@*
* exit 1*
* ;;*
* # Recognize the basic CPU types with company name.*
*+ nds32-* | nds32le-* \*
* vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-*
\*
* | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* |
c[123]* \*
* | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \*
or
*1.2 Modify config.sub file for automake*
Added NDS32 archicture from Andes Technology.
---
config.sub | 2 ++
1 file changed, 2 insertions(+)
Index: automake1.10-1.10.1/lib/config.sub
===================================================================
--- automake1.10-1.10.1.orig/lib/config.sub 2008-08-13
16:20:51.000000000 +0800
+++ automake1.10-1.10.1/lib/config.sub 2008-08-13 16:25:05.000000000 +0800
@@ -270,6 +270,7 @@
| mn10200 | mn10300 \
| mt \
| msp430 \
+ *| nds32 | nds32le* \
| nios | nios2 \
| ns16k | ns32k \
| or32 \
@@ -351,6 +352,7 @@
| mmix-* \
| mt-* \
| msp430-* \
*+ | nds32-*|** nds32le-*** \*
| nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \x
*2. configure and make*
./configure --host=$HOST --build=$BUILD --prefix=$PREFIX
make
#make install DESTDIR=${DEPLOY_DIR}
make install DESTDIR=${PREFIX}
Regards,
Mentor
--
Best Regards,
Thomas Yu - Sian , Liu
- Support new platform "Andestech" Platform,
Thomas YS Liu <=