milkshake
Advanced Member
Hi, this is aimed at PokeParadox.
I have folled the steps here I have installed code::blocks and installed the libraries I have configured the compilers, I ran the bash scripts from the cross compile set up page but the codesorcery url didnt work so I updated it to this.
and now it installed the libs.
and now im confused what to do next how do I configure code::blocks to compile using the pandora sdk? instead of g++? or is this done automatically?
and also do you have a more concise set up examples of how to use penjin in coding?
thanks
I have folled the steps here I have installed code::blocks and installed the libraries I have configured the compilers, I ran the bash scripts from the cross compile set up page but the codesorcery url didnt work so I updated it to this.
Code:
#!/bin/bash
# some default variables
TOOLCHAIN=arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
TOOLCHAIN_MD5=2c2b324f0a84916afd9920029286eb10
TOOLCHAIN_SHA1=d8c01b420470e236761cebd65f86fc0f7415c3e9
PNDSDK_DIR="/usr/local/pandora"
CWD=[ pwd ]
# usefull functions ...
black='\E[30m'
red='\E[31m'
green='\E[32m'
yellow='\E[33m'
blue='\E[34m'
magenta='\E[35m'
cyan='\E[36m'
white='\E[37m'
cecho () # Color-echo. Argument $1 = message, Argument $2 = color
{
local default_msg="No message passed." # Doesn't really need to be a local variable.
message=${1:-$default_msg} # Defaults to default message.
color=${2:-$black} # Defaults to black, if not specified.
echo -e "$color $message"
#echo "$message"
tput sgr0 # Reset to normal.
return
}
check_wget_error()
{
if [ "$?" -ne "0" ];
then
cecho "Sorry, wget failed. Maybe angstrom repository is down, please try again later" $red
exit 1
fi
}
# Fast hack to ask for sudo pwd at startup
sudo ls &>/dev/null
# Make working directory
cecho "Making working directory (`pwd`/tmp)" $green
if [ ! -d "tmp" ]
then mkdir tmp
fi
# Check if codesourcery TOOLCHAIN is available, download it if needed
echo -e
cecho "Checking if codesourcery toolchain is available, download it if needed" $green
if [ ! -f "tmp/$TOOLCHAIN" ]
then
wget -O tmp/$TOOLCHAIN http://smp-on-qemu.googlecode.com/files/$TOOLCHAIN
check_wget_error
fi
# Verify the codesourcery toolchain integrity
echo -e
cecho "Verifying the codesourcery toolchain integrity" $green
md5=$(md5sum tmp/$TOOLCHAIN |cut -d' ' -f1)
if [ "$md5" != "$TOOLCHAIN_MD5" ]
then
cecho "Error : `pwd`/tmp/$TOOLCHAIN is corrupted, please fix" $red
exit 1
fi
# Create the pandora sdk directory
echo -e
cecho "Creating the pandora sdk directory ($PNDSDK_DIR)" $green
if [ ! -d $PNDSDK_DIR ]
then
sudo mkdir $PNDSDK_DIR
sudo chown -R $USER:$USER $PNDSDK_DIR
else
sudo chown -R $USER:$USER $PNDSDK_DIR
fi
# Extract codesourcery toolchain
echo -e
cecho "Extracting codesourcery toolchain to $PNDSDK_DIR" $green
tar -xjf tmp/$TOOLCHAIN -C $PNDSDK_DIR
cd $CWD
# All done
echo -e
echo -e
cecho "All done, your Pandora SDK is located here : $PNDSDK_DIR/arm-2009q3" $green
echo -e
cecho "The following pandora sdk path have been added to your login script (~/.bashrc) : PNDSDK" $green
echo -e
echo "export PNDSDK=\"/usr/local/pandora/arm-2009q3\"" >> ~/.bashrc
echo "export PATH=\"\$PATH:\$PNDSDK/bin:\$PNDSDK/usr/bin\"" >> ~/.bashrc
source ~/.bashrc
and now it installed the libs.
and now im confused what to do next how do I configure code::blocks to compile using the pandora sdk? instead of g++? or is this done automatically?
and also do you have a more concise set up examples of how to use penjin in coding?
thanks