U++ framework
Do not panic. Ask here before giving up.

Home » Community » Newbie corner » Raspberry (Raspbian) - ARM 6 Core + Ultimate++?
Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #36976] Fri, 03 August 2012 13:25 Go to next message
Wolfgang is currently offline  Wolfgang
Messages: 146
Registered: November 2011
Location: Germany
Experienced Member
Is it possible to run Ultimate++ on a Raspberry PI (with Raspbian) as OS?!
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #36979 is a reply to message #36976] Fri, 03 August 2012 18:16 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 740
Registered: November 2008
Location: France
Contributor
Hi Wolfgang,

Raspbian is a linux tuned for the rasberry PI so for me it should run without any problems

Maybe some others have already tried ?
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37003 is a reply to message #36979] Tue, 07 August 2012 16:47 Go to previous messageGo to next message
twkrimm is currently offline  twkrimm
Messages: 1
Registered: August 2012
Junior Member
Did you find out if it works on the Raspberry PI?
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37004 is a reply to message #36979] Tue, 07 August 2012 18:28 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
Didier wrote on Fri, 03 August 2012 12:16

Hi Wolfgang,

Raspbian is a linux tuned for the rasberry PI so for me it should run without any problems



Well, somebody mentioned on the forum that in order to link theide, you need at least 512MB of RAM.

Mirek
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37025 is a reply to message #37004] Thu, 09 August 2012 15:30 Go to previous messageGo to next message
Wolfgang is currently offline  Wolfgang
Messages: 146
Registered: November 2011
Location: Germany
Experienced Member
hmm okay... I've downloaded the sources with svn.. but how to build it? Is there a tutorial or something like that?
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37027 is a reply to message #37025] Thu, 09 August 2012 20:04 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
Wolfgang wrote on Thu, 09 August 2012 09:30

hmm okay... I've downloaded the sources with svn.. but how to build it? Is there a tutorial or something like that?


I think that in order to build on new platform, tarball of nightly build would be better (as it has generated makefile).

As for instruction, you will be the first to try, so I hope to get some from you Wink

Mirek
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37041 is a reply to message #37027] Fri, 10 August 2012 20:58 Go to previous messageGo to next message
Wolfgang is currently offline  Wolfgang
Messages: 146
Registered: November 2011
Location: Germany
Experienced Member
of course I'll give you information - if it would work for me..

but i got stucked at the very beginning of make for upp-x11-src-5267 - it tells me that my arch is unknown (but in the makefile there is an entry for arm) - how to find out which arch-string it uses?

> arch
> armv6l
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37048 is a reply to message #36976] Sat, 11 August 2012 10:50 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1796
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

I don't have Raspberry, but just for fun I tried to build a cross compile toolchain and build umk for arm. I followed this guide and then set up build method in TheIDE to use the toolchain. I noticed only two problems: First, the Core/config.h didn't recognize the architecture correctly, so I had to help it a little. Second problem was that I don't have the libraries for arm on my system. If you have raspbian installed, I think it should suffice to just copy the include and lib folders.

Because of the missing libraries the linking failed, but otherwise I think everything should work fine. Just my two cents Smile

Best regards,
Honza
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37058 is a reply to message #37048] Sun, 12 August 2012 09:58 Go to previous messageGo to next message
Wolfgang is currently offline  Wolfgang
Messages: 146
Registered: November 2011
Location: Germany
Experienced Member
Okay, I tried and after installing some libs, changing two config files and after hours of compiling I got this:

Quote:

idewin.cpp:(.text._ZN3IdeC2Ev+0x8e0): undefined reference to `Upp::CPU_Cores()'
collect2: ld returned 1 exit status
make[1]: *** [ide.out] Fehler 1
make[1]: Leaving directory `/home/wolfgang/upp.src/uppsrc'


This is the point there I don't know how to handle it..

[Updated on: Sun, 12 August 2012 09:59]

Report message to a moderator

Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37059 is a reply to message #37058] Sun, 12 August 2012 11:20 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1796
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

The function is defined in Core/Cpu.cpp, like this:
#ifdef CPU_X86
int CPU_Cores() {
	static int n;
	ONCELOCK {
		// platform dependent code to find out number of cores
	}
	return n;
}
#else
inline int CPU_Cores() {
	return 1;	
}
#endif

It should never be undefined... Although the fallback to assuming one core is not really correct, it should work. At least for now.

My guess the problem is in the 'inline' keyword. Try removing that...

Honza
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37060 is a reply to message #37059] Sun, 12 August 2012 12:41 Go to previous messageGo to next message
Wolfgang is currently offline  Wolfgang
Messages: 146
Registered: November 2011
Location: Germany
Experienced Member
ahhh, thank you - I'll try and give you response Very Happy
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37061 is a reply to message #37060] Sun, 12 August 2012 21:39 Go to previous messageGo to next message
Wolfgang is currently offline  Wolfgang
Messages: 146
Registered: November 2011
Location: Germany
Experienced Member
It has compiled... now i will try to start Very Happy
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37062 is a reply to message #37061] Sun, 12 August 2012 22:39 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1796
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Wolfgang wrote on Sun, 12 August 2012 21:39

It has compiled... now i will try to start Very Happy

Wow, that went better than I expected Very Happy
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37076 is a reply to message #37062] Sat, 18 August 2012 16:37 Go to previous messageGo to next message
Wolfgang is currently offline  Wolfgang
Messages: 146
Registered: November 2011
Location: Germany
Experienced Member
Here's a short manual what to do... for the one who will compile it on raspberry: It takes hours, really!

Started theIde one time but until now I haven't found the time to try to create a projekt or compile a own projekt on the raspberry.

1.
I've used the tarball version:
http://www.ultimatepp.org/www$uppweb$nightly$en-us.html
....
First of all, we need some packages: libx11, libxft, libnotify, libgtk2.0, libbz2
	apt-get install libx11-dev libxft-dev libnotify-dev libgtk2.0-dev libbz2-dev

2. Edit ./uppsrc/Core/config.h Line 91,
	Change
		#elif __arm // ToDo!
	to
		#elif __arm || __arm__ // ToDo
	
3. Edit /usr/include/glib-2.0/glib/gtypes.h Line 34,
	Change 
		#include <glibconfig.h>
	to
		#include </usr/lib/arm-linux-gnueabihf/glib-2.0/include/glibconfig.h>

4. Linking gdkconfig.h
	ln -s /usr/lib/arm-linux-gnueabihf/gtk-2.0/include/gdkconfig.h /usr/include/

5. Edit ./uppsrc/Core/Cpu.cpp Line 104,
	Change
		inline int CPU_Cores()
	to
		int CPU_Cores()
6. do a "make" and compile it!

[Updated on: Sat, 18 August 2012 16:38]

Report message to a moderator

Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37077 is a reply to message #37076] Sat, 18 August 2012 17:41 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1796
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Wolfgang,

Congratulation on the successful build Smile

Points 2. and 5. should be committed to Core soon. Points 3. and 4. should be properly solved by editing include and lib path, respectively. When using tarball, just add the paths to CINC and LIBPATH variables at the beginning of uppsrc/Makefile.

I believe that compiling anything using U++ on Raspberry would be reaaally slow. Especially when using makefile (thus not using BLITZ) on single core processor. That is why cross compiling was invented Smile

Honza
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37078 is a reply to message #37077] Sat, 18 August 2012 22:07 Go to previous messageGo to next message
Wolfgang is currently offline  Wolfgang
Messages: 146
Registered: November 2011
Location: Germany
Experienced Member
Yes, of course you're right. But it's a nice feeling to know that you can compile it on raspberry itself respectively to know that u++ compiles on raspberry! Very Happy
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37079 is a reply to message #37078] Sat, 18 August 2012 22:41 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1796
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Wolfgang wrote on Sat, 18 August 2012 22:07

Yes, of course you're right. But it's a nice feeling to know that you can compile it on raspberry itself respectively to know that u++ compiles on raspberry! Very Happy

Very Happy Yes, it is very good to know that U++ works well on ARM.
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37080 is a reply to message #37079] Sat, 18 August 2012 23:59 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3459
Registered: August 2008
Senior Veteran
I will try it soon. I have got one Smile.

Best regards
IƱaki
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37188 is a reply to message #37080] Tue, 04 September 2012 12:51 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
what about precompiled upp libs? for most common architectures and a detailed guide how to cross compile for other platforms (todos on upp side)? sth. in the stile of SDL, with core, gfx, etc..

i dont know, probably sth like this exists already...
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37194 is a reply to message #37188] Tue, 04 September 2012 15:42 Go to previous messageGo to next message
Zbych is currently offline  Zbych
Messages: 332
Registered: July 2009
Senior Member
There is short guide on raspbian page that describes how to build cross tools:

http://www.raspbian.org/RaspbianDocumentation
http://pastebin.com/raw.php?i=YrtntGtU

It would be nice to be able to build upp-arm applications on PC.
RP is just to slow and has to little memory, to be reasonable platform for development.
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37195 is a reply to message #37194] Tue, 04 September 2012 18:17 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
What might be interesting is compiling examples/UWord for Pi and see how it performs...

Mirek
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37196 is a reply to message #37195] Tue, 04 September 2012 18:45 Go to previous messageGo to next message
Zbych is currently offline  Zbych
Messages: 332
Registered: July 2009
Senior Member
X-server on RP uses fbuff driver and there is no hardware acceleration. Web browser page scrolling takes about a second or two. I guess that UWord will not perform to well either.
Only hope for fast graphics on RP is openGL ES lib (without x-server).

BTW I tried to compile UWord in TheIde on RP, but there wasn't enough RAM to finish compilation. Maybe I will try umk.

[Updated on: Tue, 04 September 2012 18:47]

Report message to a moderator

Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37814 is a reply to message #36976] Wed, 14 November 2012 21:11 Go to previous messageGo to next message
NilaT is currently offline  NilaT
Messages: 70
Registered: November 2011
Location: Austria
Member
Hello and sorry for digging out this old thread again but I have some issues installing Upp on my Pi (512 MB RAM model B)

I downloaded the latest source and followed the instructions from page 1, but when I run make, I get an error which I don't understand.

It tells me:
CtrlCore/ImageX11.cpp:252:2: error: stray '@' in program
as you can see in this picture: http://db.tt/IL3qlFVB

I opend ImageX11.cpp as root with nano and looked at line 252, but theres no @, as you can see here: http://db.tt/9yyjt5b4

Sorry for the bad pic quality, I made them with my mobile phone. Don't know how to make screenshots on the pi yet.

I just did a quick google search and found something that says the compiler don't understand a character. I choose utf8 as I setted up the pi, is that a possible error?

Or can you guys give me a bump?

Thanks in advance Wink
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37816 is a reply to message #37814] Wed, 14 November 2012 22:16 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1796
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

NilaT wrote on Wed, 14 November 2012 21:11

I downloaded the latest source and followed the instructions from page 1, but when I run make, I get an error which I don't understand.

It tells me:
CtrlCore/ImageX11.cpp:252:2: error: stray '@' in program

Hi NilaT,

You just had a bad luck in picking the nightly source Smile Someone forgot a debug macro in source, which is in release mode defined as '@' (so that it is easy to notice - though it seems that nobody ever does Smile ). It is already fixed, just grab a newer package tomorrow (or older, if you don't want to wait).

Best regards,
Honza
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37831 is a reply to message #36976] Fri, 16 November 2012 08:05 Go to previous messageGo to next message
NilaT is currently offline  NilaT
Messages: 70
Registered: November 2011
Location: Austria
Member
Good morning,

and thank you very much again, dolik.rce.
I downloaded the new nightly build yesterday and compiled it.

It took damn long but it succeeded.
So from now on, upp is running on my pi.
It's not very fast though. Sad

Thanks again for the help!
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37926 is a reply to message #36976] Fri, 23 November 2012 20:49 Go to previous messageGo to next message
Wolfgang is currently offline  Wolfgang
Messages: 146
Registered: November 2011
Location: Germany
Experienced Member
Hi again,

after long time of abstinence i'm try do something with my raspberry Very Happy

Can some1 tell me how to build a cross compile toolchain with to compile an application written with upp for the raspberry ARM?
Re: Raspberry (Raspbian) - ARM 6 Core + Ultimate++? [message #37955 is a reply to message #37926] Sat, 24 November 2012 20:21 Go to previous message
Didier is currently offline  Didier
Messages: 740
Registered: November 2008
Location: France
Contributor
Hi wolfgang,

if you have U++ running on the Raspberry PI the half of the work is done : you all the bibs and the includes that you need to compile apps for the Raspberry PI.

Here is what I did to make a cross compile environment for the gumstix (ARM cortex-A8).

1 - Make a copy of /usr/lib and /usr/include from the Raspberry PI to you're computer ==> this is the easiest way to get all the compatible libs and includes.

2 - Compile a GCC suite for the ARM11
To do this I used open-embedded environnement. But you can try this
http://raspberrypi.stackexchange.com/questions/1/how-do-i-bu ild-a-gcc-4-7-toolchain-for-cross-compiling



3 - You need a correct U++ Build Method (xxx.BM files)
I have attached the one I use to cross compile towards cortex-A8
The important things to notice are :
  • gcc name ( arm-angstrom-linux-gnueabi-g++ in my case )
  • --sysroot=PATH_TO_COPIED_USR options added to compiler and linker (to tell gcc to use the wright libs)
  • path to the gcc bins directly set
  • -mcpu=cortex-a8 -mfpu=neon : options for cortex-A8
  • remove SSE2 form the default options (SSE2 is not part of ARM instructions set)


4 - Report the corrections made to Upp code (/Core/Config.h) : add __arm__

5 - Some Upp pitfalls/bugs on ARM to be aware of :
MT does not work : apps get stuck in infinite loop on start ==> I didn't have time to look into it


This should help you start up quickly

[Updated on: Sat, 24 November 2012 20:35]

Report message to a moderator

Previous Topic: Is it possible to embed a Skylark app in a normal U++ GUI app?
Next Topic: How do you create this?
Goto Forum:
  


Current Time: Wed May 27 13:14:52 GMT+2 2026

Total time taken to generate the page: 0.01039 seconds