[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/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 - Code::Blocks - Good alternative to eclipse

Code::Blocks - Good alternative to eclipse

Discussion about Parallella (and Epiphany) Software Development

Moderators: amylaar, jeremybennett, simoncook

Code::Blocks - Good alternative to eclipse

Postby AndyC » Wed Aug 20, 2014 12:06 pm

Last edited by AndyC on Tue Nov 18, 2014 2:53 pm, edited 1 time in total.
AndyC
 
Posts: 184
Joined: Fri Jun 27, 2014 5:46 pm

Re: Code::Blocks - Good alternative to eclipse

Postby aolofsson » Wed Aug 20, 2014 10:03 pm

Andy,

This is great!! Fantastic to see a lightweight IDE running on Parallella!

Eclipse is great, but it will likely never be a good fit for native development on the Parallella. We have used Eclipse successfully for cross development from a beefier host though.
Unfortunately, Eclipse like the most of our SDK is undergoing a major overhaul right now...so we don't have much to show for it. (hope this presentation gives an idea of what is currently being developed)

http://www.eclipse.org/cdt/presentation ... dex.html#/

Andreas
User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: Code::Blocks - Good alternative to eclipse

Postby AndyC » Wed Aug 20, 2014 10:23 pm

Hi Andreas,

Some interesting looking stuff in that presentation, I look forward to it becoming available.

Cheers

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

Re: Code::Blocks - Good alternative to eclipse

Postby AndyC » Thu Aug 21, 2014 4:34 pm

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

Re: Code::Blocks - Good alternative to eclipse

Postby AndyC » Thu Aug 21, 2014 4:57 pm

Another tip, if you want you printf output in the debug window in the IDE rather than a separate window you need to change your app type to 'GUI Application', right click on project, Build Targets tab and then change the type pulldown.

You also need to fflush(stdout) in your code.
AndyC
 
Posts: 184
Joined: Fri Jun 27, 2014 5:46 pm

Re: Code::Blocks - Good alternative to eclipse

Postby nickoppen » Mon Oct 20, 2014 6:16 am

Sharing is what makes the internet Great!
User avatar
nickoppen
 
Posts: 266
Joined: Mon Dec 17, 2012 3:21 am
Location: Sydney NSW, Australia

Re: Code::Blocks - Good alternative to eclipse

Postby AndyC » Mon Oct 20, 2014 9:25 am

Hi Nick,

You are not by any chance running CodeBlocks or the compiler as root are you?

Cheers

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

Re: Code::Blocks - Good alternative to eclipse

Postby nickoppen » Mon Oct 20, 2014 10:00 am

Hi Andy,

I checked that. If I do a "whoami" as a pre-build step I get the response "linaro".

Since I posted my question I did an "env" prior to the build and the environment variable LD_LIBRARY_PATH is blank. It exists but is not set to anything. However, putting it is as a custom variable causes it to be set pre-build (i.e. I can "echo LD_LIBRARY_PATH" and that works) but attempting to set an environment variable pre-build does not seem to have any effect (i.e. LD_LIBRARY_PATH="/usr/local/...."; export LD_LIBRARY_PATH; echo $LD_LIBRARY_PATH; returns the path but the error persists).

Running clcc on the command line works but as linaro you set a message that says you need to be root to compile one of the modules (e-init() I think), so I tried to run clcc via sudo but that was equally unsuccessful. Again I think that the problem is that the LD_LIBRARY_PATH is blanked out and so using the -E option to preserve the environment is no use.

I tried to run "su" as a pre-build step but that needs to be run from a command prompt.

So, no... I don't believe so.

nick
Sharing is what makes the internet Great!
User avatar
nickoppen
 
Posts: 266
Joined: Mon Dec 17, 2012 3:21 am
Location: Sydney NSW, Australia

Re: Code::Blocks - Good alternative to eclipse

Postby AndyC » Mon Oct 20, 2014 10:39 am

Hi Nick,

I just added a cl file to a project here, in the properties under the build tab I ticked "compile file" and under the advanced tab I ticked "use a custom command to build this file'. In the custom command bit I put:

clcc -v -c $file -o $object


When I build I get this:

lcc -v -c /home/linaro/Development/CodeBlocks/OpenCL2/test.cl -o obj/Debug/test.o
coprthr-1.6.0 (Freewill)
clcc1: e_init(): Program must be invoked with superuser privilege (sudo).
clcc1: ee_write_esys(): ESYS mmap failure.
clcc1: e_open(): Platform was not initialized. Use e_init().
clcc1: e_alloc(): Platform was not initialized. Use e_init().
[4395] clmesg ERROR: device_e32.c(157): e_alloc returned -1
number of platforms 1
clcc1: compile '/home/linaro/Development/CodeBlocks/OpenCL2/test.cl' [coprthr:ARMv7]
compiler_native:build_log:
execshell> cd /tmp/xcl9UeJXS; gcc -D__coprthr_device__ -fno-exceptions -O3 -marm -mfpu=neon -funsafe-math-optimizations -fno-math-errno -funsafe-math-optimizations -fschedule-insns -fschedule-insns2 -U_FORTIFY_SOURCE -I/usr/local/browndeer/include -D __xcl_kthr__ -D __STDCL_KERNEL_VERSION__=020000 -fPIC -c AwpJMB.cpp
[4394] clmesg ERROR: clcc.c(718): clcc: clld returned non-zero exit status 11
execshell> cd /tmp/xcl9UeJXS; cpp -x c++ -D__coprthr_device__ -I/usr/local/browndeer/include /tmp/xcl9UeJXS/AwpJMB.cl | awk -v prog=\"/tmp/xcl9UeJXS/AwpJMB.cl\" 'BEGIN { pr=0; } { if($0~/^#/ && $3==prog) pr=1; else if ($0~/^#/) pr=0; if ($0!~/^#/ && pr==1) print $0; }' | xclnm --kcall -d -c -o _kcall_AwpJMB.c -
execshell> cd /tmp/xcl9UeJXS; gcc -D__coprthr_device__ -O0 -fPIC -D__xcl_kcall__ -I/usr/local/browndeer/include -c _kcall_AwpJMB.c
execshell> cd /tmp/xcl9UeJXS; g++ -shared -Wl,-soname,AwpJMB.so -o AwpJMB.so AwpJMB.o _kcall_AwpJMB.o AwpJMB.elfcl
progra compile '/home/linaro/Development/CodeBlocks/OpenCL2/test.cl' [coprthr:E16G Needham]
compiler_e32:build_log:
execshell> \cp /usr/local/browndeer/lib/_e32pth_core_main_needham.o /tmp/xcl6HDoQa
execshell> \cp /usr/local/browndeer/lib/_e32pth_core_needham.ldf /tmp/xcl6HDoQa
execshell> cd /tmp/xcl6HDoQa; e-g++ -O0 -g -Wall -c -fmessage-length=0 -ffast-math -ftree-vectorize -funroll-loops -Wunused-variable -ffp-contract=fast -mlong-calls -mfp-mode=truncate -falign-loops=8 -falign-functions=8 -w -fstack-usage -fno-exceptions -U_FORTIFY_SOURCE -fno-stack-protector -I/opt/adapteva/esdk/tools/e-gnu/epiphany-elf/sys-include -fpermissive -D__coprthr_device__ -x c++ -I/usr/local/browndeer/include -D __xcl_kthr__ --include=e32pth_if_needham.h --include=opencl_lift.h --include=e32_opencl_ext.h -D __STDCL_KERNEL_VERSION__=020000 -D__COPRTHR__ -D E32_DRAM_ZEROPAGE=0x8e100000 -S annckH.cpp
execshell> cd /tmp/xcl6HDoQa; e-g++ -O0 -g -Wall -c -fmessage-length=0 -ffast-math -ftree-vectorize -funroll-loops -Wunused-variable -ffp-contract=fast -mlong-calls -mfp-mode=truncate -falign-loops=8 -falign-Wl,-a


This is the same as if I try from the command line.

If you set it up as describe above does it work for you?

Cheers

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

Re: Code::Blocks - Good alternative to eclipse

Postby nickoppen » Mon Oct 20, 2014 11:09 am

Hi Andy,

Nope, I got the same as before - libclelf.so was not found.

Am I right is assuming that you have one compiler defined "GNU GCC Compiler" and that the only reference to clcc is via the cl file's properties (the "back door" compile options)?

Maybe I've been too complicated with my definitions. I think I should start again from a clean project and build it up from scratch.

nick
Sharing is what makes the internet Great!
User avatar
nickoppen
 
Posts: 266
Joined: Mon Dec 17, 2012 3:21 am
Location: Sydney NSW, Australia

Next

Return to Programming Q & A

Who is online

Users browsing this forum: No registered users and 4 guests

cron