Commit 7633285f authored by Benoit Rat's avatar Benoit Rat

usb-loader: Improve the building script

parent 90e1017f
......@@ -8,6 +8,8 @@
#### Function to compile each modules
compile_module()
{
printf "\n\nCompiling module $1:\n"
#Go to the mopdule directory
cd ${root}/${1}
......@@ -17,19 +19,23 @@ compile_module()
# Append '+' symbol if some files need to be commited to git
if [[ -n `git status -s .` ]]; then GITS='+'; else GITS=''; fi;
if [[ -n $2 ]]; then
#Execute specific make commands such as make clean, make install
make $2
else
#Compile the module
make CROSS_COMPILE=${CROSS_COMPILE} CHIP=at91sam9g45 BOARD=at91sam9g45-ek MEMORIES=sram TRACE_LEVEL=5 DYN_TRACES=1 DEFINES="-D__GIT__=\\\"${GITR}${GITS}\\\"" INSTALLDIR=../../ $2
make CROSS_COMPILE=${CROSS_COMPILE} CHIP=at91sam9g45 BOARD=at91sam9g45-ek MEMORIES=sram TRACE_LEVEL=5 DYN_TRACES=1 DEFINES="-D__GIT__=\\\"${GITR}${GITS}\\\"" INSTALLDIR=../../
fi
}
#### Setup global variable
CROSS_COMPILE=/opt/wrs/misc/cd-g++lite/bin/arm-none-eabi-
root="$(echo $(/bin/pwd)/$dir | sed 's-/.$--')"
root="$(dirname $(pwd)/$0)"
#### Compilation of dataflash module
compile_module dataflash $2
compile_module dataflash $1
#### Compilation of extern ram module
compile_module extram $2
compile_module extram $1
less
#!/bin/sh
make CROSS_COMPILE=/opt/gcc-codesourcery/bin/arm-none-eabi- CHIP=at91sam9g45 BOARD=at91sam9g45-ek MEMORIES=sram TRACE_LEVEL=5 DYN_TRACES=1 INSTALLDIR=../../ $1
\ No newline at end of file
#!/bin/sh
make CROSS_COMPILE=/opt/gcc-codesourcery/bin/arm-none-eabi- CHIP=at91sam9g45 BOARD=at91sam9g45-ek MEMORIES=sram TRACE_LEVEL=5 DYN_TRACES=1 INSTALLDIR=../../ $1
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment