I have installed the toolchain of sdk1.7 for p1010rdb. Now I use $CC xxx.c to compile c program. I want to know how to generate the file can run in my target board using p1010 processor..

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I have installed the toolchain of sdk1.7 for p1010rdb. Now I use $CC xxx.c to compile c program. I want to know how to generate the file can run in my target board using p1010 processor..

444 Views
lingyunhui
Contributor I

I have installed the toolchain of sdk1.7 for p1010rdb. Now I use $CC xxx.c to compile c program. I want to know how to generate the file can run in my target board using p1010 processor..

Labels (1)
0 Kudos
1 Reply

330 Views
addiyi
NXP Employee
NXP Employee

Here is an example of makefile using sdk standalone toolchain. This is not for your toolchain, but you can use it as example. Also, note that SDK toolchain is a sysrooted toolchain. It means that toolchain will start to look for target fragments and libraries starting from the path specified by the sysroot option.

####

SDKTARGETSYSROOT = /opt/fsl-networking/QorIQ-SDK-V1.7-MPC832XMDS/sysroots/ppce300c2-fsl-linux

CROSS_COMPILE = /opt/fsl-networking/QorIQ-SDK-V1.7-MPC832XMDS/sysroots/x86_64-fslsdk-linux/usr/bin/powerpc-fsl-linux/powerpc-fsl-linux-

CC = $(CROSS_COMPILE)gcc -m32 -msoft-float -mcpu=e300c2 --sysroot=${SDKTARGETSYSROOT}

LD = $(CROSS_COMPILE)ld

SOURCES = main.o

BIN = test

all:

  $(CC) -o main.o -c main.c

  $(CC) -o $(BIN) $(SOURCES)

clean:

  rm -f $(BIN) ./$(BIN) ${SOURCES}

###

Adrian

0 Kudos