[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Parallella Community • View topic - Getting Started with the SDK

Getting Started with the SDK

Discussion about Parallella (and Epiphany) Software Development

Moderators: amylaar, jeremybennett, simoncook

Getting Started with the SDK

Postby eoghanoh » Sun Feb 09, 2014 10:06 pm

Last edited by eoghanoh on Thu Jul 03, 2014 4:45 pm, edited 6 times in total.
eoghanoh
 
Posts: 23
Joined: Mon Dec 17, 2012 3:22 am

Re: Getting Started with the SDK

Postby mhonman » Mon Feb 10, 2014 9:06 am

That's a super summary!

BTW the reason printf doesn't work in release mode (no gdbserver) is that there is nothing running on the ARM cores to handle the TRAP instructions that the Epiphany-side "write" functions use. An Epiphany core that has some data to write sits in a halt state until the ARM host picks up the parameters from its registers and memory, returns results into the core's registers and memory, and instructs it to resume execution.

Those functions are normally performed by the e-server (I've written but not fully debugged a standalone TRAP server).
mhonman
 
Posts: 112
Joined: Thu Apr 25, 2013 2:22 pm

Re: Getting Started with the SDK

Postby shodruk » Mon Feb 10, 2014 11:10 am

Great tutorial! Thank you for sharing! :D
Shodruky
shodruk
 
Posts: 464
Joined: Mon Apr 08, 2013 7:03 pm

Re: Getting Started with the SDK

Postby jeremybennett » Mon Feb 10, 2014 11:14 am

Hi eoghanoh,

Nice piece of work. It will be very helpful to others. As mhonman points out the e-server does not currently provide full support for host I/O. I'm working on an upgrade to e-server, which should improve the functionality. More news when I have it ready.

Best wishes,


Jeremy
User avatar
jeremybennett
 
Posts: 61
Joined: Mon Dec 17, 2012 9:06 am

Re: Getting Started with the SDK

Postby eoghanoh » Mon Feb 10, 2014 12:55 pm

Thanks, hopefully it'll be useful.

Regarding printf: I wasn't really referring to e-server at this stage, I was talking about running your application outside of e-server. printf is fine from ARM but not from Epiphany. Stumped me for a while but once I worked out what was happening I can understand why. So I have #ifndef NDEBUG statements to check whether or not printf is OK.

I define NDEBUG with a -D command line option when compiling for release.

Thanks,
Eoghan.
eoghanoh
 
Posts: 23
Joined: Mon Dec 17, 2012 3:22 am

Re: Getting Started with the SDK

Postby hewsmike » Wed Feb 12, 2014 7:05 am

It's official : I am an idiot !! :oops: :roll: :?

I've been successfully fiddling on the Parallella natively ie. working thru a TTY session to the ARM/Epiphany from my Ubuntu machine. Now wanting to transition to cross-compilation ie. use Eclipse + ESDK etc on the Ubuntu.

Check that you have a 64-bit OS !!

I didn't. I thought I did, but no. 'i686' is 32-bit, one wants 'x86_64' returned when one checks via 'uname -m' .... blah, there's time I won't get back.

Cheers, Mike.
hewsmike
 
Posts: 85
Joined: Mon Dec 17, 2012 3:20 am

Re: Getting Started with the SDK

Postby adexmont » Fri May 02, 2014 10:21 am

adexmont
 
Posts: 121
Joined: Thu Oct 24, 2013 12:58 pm

Re: Getting Started with the SDK

Postby Hybridalienrob » Sun May 04, 2014 9:54 pm

I've been trying to get the SDK built & installed as well. If they're any use, here are my notes so far. It's still WIP and I'm waiting for my PSU to arrive so I can't actually test or debug anything yet.

sudo apt-get install bison flex libgmp-dev libncurses-dev libmpc-dev libmpfr-dev texinfo
mkdir ~/epiphany
cd ~/epihany
git clone git@github.com:parallella/parallella-examples.git
git glone git@github.com:parallella/parallella-bin.git
git clone git@github.com:parallella/parallella-ubuntu.git
git clone git@github.com:parallella/parallella-linux.git
git clone git@github.com:parallella/parallella-uboot.git
git clone https://github.com/adapteva/epiphany-libs.git

# Get latest download script & run
wget https://raw.github.com/adapteva/epiphan ... olchain.sh
chmod +x download-toolchain.sh

./download-toolchain.sh --clone
git clone https://github.com/adapteva/epiphany-libs.git

echo 'export EPIPHANY_HOME=~/epiphany/esdk' >> ${HOME}/.bashrc
echo '. ${EPIPHANY_HOME}/setup.sh' >> ${HOME}/.bashrc

Create new shell

cd ~/epiphany/sdk

Download & extract the following to gcc/mpc gcc/mpfr and gcc/gmp
http://multiprecision.org/mpc/download/mpc-1.0.1.tar.gz
http://www.mpfr.org/mpfr-current/mpfr-3.1.2.tar.xz
ftp://ftp.gmplib.org/pub/gmp-5.1.2/gmp-5.1.2.tar.lz
Install lzip if prompted when opening

# (should succeed)
./build-toolchain.sh

# will fail, but creates the required directories
./build-sdk.sh

mv ../INSTALL/* ../esdk/tools/e-gnu

Download ftp://ftp.parallella.org/esdk/esdk.5.13 ... armv7l.tgz
Extract bsps, docs and example folders to ~/epiphany/esdk

# remove bad commit
cd ../epiphany-libs/
git revert 2876e8dd2fc3c064742f77621a

cd ../sdk
# comment out following two lines from sdk/build-sdk.sh
#cp -Rd docs ${ESDK}
#cp -Rd examples ${ESDK}

./build-sdk.sh

Download ftp://ftp.parallella.org/esdk/old/esdk. ... armv7l.tgz
extract eclipse folder from /esdk.5.13.07.10/tools/ into ~/adapteva/esdk/tools
follow instructions here for eclipse setup..
viewtopic.php?f=13&t=935

# install ARM tools
sudo apt-get-install gcc-arm-linux-gnueabihf

Download
https://launchpad.net/linaro-toolchain- ... ux.tar.bz2
extract to /opt/adapteva
Hybridalienrob
 
Posts: 3
Joined: Mon Dec 17, 2012 3:25 am

Re: Getting Started with the SDK

Postby AndyC » Fri Aug 08, 2014 1:54 pm

Hi Eoghan,

Thanks very much for this, I had been banging my head against the wall for a couple of days till I found this post.

On my Development box I had to install gdb-multiarch as the standard gdb did not support arm architectures.

Now for the million dollar question, how do you debug a combination of Host/Epiphany code. Any ideas?

All the best

Andy
AndyC
 
Posts: 184
Joined: Fri Jun 27, 2014 5:46 pm

Re: Getting Started with the SDK

Postby snim2 » Tue Aug 26, 2014 1:35 pm

Thanks for this @Hybridalienrob. I'm trying to follow your instructions and turn them into a working shell script. There's a public gist here: . I've corrected a typo and commented out some stuff, but I'll turn those comments into working BASH when I've got everything working on at least one machine.

On line 32 of the gist the user (or script!) should cd to ~/epiphany/sdk but when I tried this that directory didn't exist. Should the epiphany-sdk and epiphany-libs repositories be cloned into sdk and libs instead of epiphany-sdk and epiphany-libs? Also, the build-toolchain.sh script failed, but annoyingly didn't write an error message to its log. Is that because the directory structure wasn't write, or EPIPHANY_BUILD_HOME wasn't set (since there isn't a step for it above)?

Thanks for your help. It would be really great to get this nicely automated.

Sarah
snim2
 
Posts: 53
Joined: Mon Feb 03, 2014 5:02 pm

Next

Return to Programming Q & A

Who is online

Users browsing this forum: No registered users and 1 guest

cron