Hello world! problems

View: New views
17 Messages — Rating Filter:   Alert me  

Hello world! problems

by Jose Gomez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, as I have stated on other posts I am a beginner programmer.  So, I was following the instructions for the hello world example on gumstix.net and used a make file to do the cross-compiling.  I was able to get the executable file from that, but once I tried running it in gumstix it will just give me the error: unexpected ), I did not mess with the recipe and I was able to run the same C code on my compiler.

What could be the problem?

Thank you for the help in advance,
Jose

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Hello world! problems

by John Pauley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That sounds like your program was _not_ compiled with the cross-compiler but was compiled with your host compiler...  Have you tried running what you think is cross-compiled on the host?

John

On Jul 3, 2008, at 2:46 PM, Jose Gomez wrote:

Hi, as I have stated on other posts I am a beginner programmer.  So, I was following the instructions for the hello world example on gumstix.net and used a make file to do the cross-compiling.  I was able to get the executable file from that, but once I tried running it in gumstix it will just give me the error: unexpected ), I did not mess with the recipe and I was able to run the same C code on my compiler.

What could be the problem?

Thank you for the help in advance,
Jose
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Hello world! problems

by Jose Gomez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am using codeBlocks in Ubuntu hardy and I don't know how to run the executable file here.  If I use the command "make" will it use the host compiler? Am I supposed to use bitbake to cross-compile?

Thank you very much for the help John.

Jose

On Thu, Jul 3, 2008 at 5:45 PM, John Pauley <pauleyj@...> wrote:
That sounds like your program was _not_ compiled with the cross-compiler but was compiled with your host compiler...  Have you tried running what you think is cross-compiled on the host?

John

On Jul 3, 2008, at 2:46 PM, Jose Gomez wrote:

Hi, as I have stated on other posts I am a beginner programmer.  So, I was following the instructions for the hello world example on gumstix.net and used a make file to do the cross-compiling.  I was able to get the executable file from that, but once I tried running it in gumstix it will just give me the error: unexpected ), I did not mess with the recipe and I was able to run the same C code on my compiler.

What could be the problem?

Thank you for the help in advance,
Jose
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users



-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Hello world! problems

by m_ahlenius :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jose,

yes, you will need to use bitbake in the OE environment to build the
application.  Otherwise, you will have to edit the makefile so that it
uses the cross compiler tools and libs accordingly.    I have done this
before, but  ended up just having the bitbake recipe run the makefile.

If you follow the instructions for setting up bitbake and then go
through Steve's Hello World tutorial, it should work just fine for you.

best,

'mark

Jose Gomez wrote:

> I am using codeBlocks in Ubuntu hardy and I don't know how to run the
> executable file here.  If I use the command "make" will it use the
> host compiler? Am I supposed to use bitbake to cross-compile?
>
> Thank you very much for the help John.
>
> Jose
>
> On Thu, Jul 3, 2008 at 5:45 PM, John Pauley
> <pauleyj@... <mailto:pauleyj@...>> wrote:
>
>     That sounds like your program was _not_ compiled with the
>     cross-compiler but was compiled with your host compiler...  Have
>     you tried running what you think is cross-compiled on the host?
>
>     John
>
>     On Jul 3, 2008, at 2:46 PM, Jose Gomez wrote:
>
>>     Hi, as I have stated on other posts I am a beginner programmer.
>>     So, I was following the instructions for the hello world example
>>     on gumstix.net <http://gumstix.net> and used a make file to do
>>     the cross-compiling.  I was able to get the executable file from
>>     that, but once I tried running it in gumstix it will just give me
>>     the error: unexpected ), I did not mess with the recipe and I was
>>     able to run the same C code on my compiler.
>>
>>     What could be the problem?
>>
>>     Thank you for the help in advance,
>>     Jose
>>     -------------------------------------------------------------------------
>>     Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
>>     Studies have shown that voting for your favorite open source project,
>>     along with a healthy diet, reduces your potential for chronic
>>     lameness
>>     and boredom. Vote Now at
>>     http://www.sourceforge.net/community/cca08_______________________________________________
>>     gumstix-users mailing list
>>     gumstix-users@...
>>     <mailto:gumstix-users@...>
>>     https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>
>     -------------------------------------------------------------------------
>     Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
>     Studies have shown that voting for your favorite open source project,
>     along with a healthy diet, reduces your potential for chronic lameness
>     and boredom. Vote Now at http://www.sourceforge.net/community/cca08
>     _______________________________________________
>     gumstix-users mailing list
>     gumstix-users@...
>     <mailto:gumstix-users@...>
>     https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> ------------------------------------------------------------------------
>
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@...
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>  


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Hello world! problems

by Jose Gomez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you very much Mark, I will try that first thing on Monday. Just in case could tell me how to modify the make file?

Thank you again,

Jose

On Sat, Jul 5, 2008 at 10:12 AM, Mark Ahlenius <m_ahlenius@...> wrote:
Hi Jose,

yes, you will need to use bitbake in the OE environment to build the
application.  Otherwise, you will have to edit the makefile so that it
uses the cross compiler tools and libs accordingly.    I have done this
before, but  ended up just having the bitbake recipe run the makefile.

If you follow the instructions for setting up bitbake and then go
through Steve's Hello World tutorial, it should work just fine for you.

best,

'mark

Jose Gomez wrote:
> I am using codeBlocks in Ubuntu hardy and I don't know how to run the
> executable file here.  If I use the command "make" will it use the
> host compiler? Am I supposed to use bitbake to cross-compile?
>
> Thank you very much for the help John.
>
> Jose
>
> On Thu, Jul 3, 2008 at 5:45 PM, John Pauley
> <pauleyj@... <mailto:pauleyj@...>> wrote:
>
>     That sounds like your program was _not_ compiled with the
>     cross-compiler but was compiled with your host compiler...  Have
>     you tried running what you think is cross-compiled on the host?
>
>     John
>
>     On Jul 3, 2008, at 2:46 PM, Jose Gomez wrote:
>
>>     Hi, as I have stated on other posts I am a beginner programmer.
>>     So, I was following the instructions for the hello world example
>>     on gumstix.net <http://gumstix.net> and used a make file to do
>>     the cross-compiling.  I was able to get the executable file from
>>     that, but once I tried running it in gumstix it will just give me
>>     the error: unexpected ), I did not mess with the recipe and I was
>>     able to run the same C code on my compiler.
>>
>>     What could be the problem?
>>
>>     Thank you for the help in advance,
>>     Jose
>>     -------------------------------------------------------------------------
>>     Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
>>     Studies have shown that voting for your favorite open source project,
>>     along with a healthy diet, reduces your potential for chronic
>>     lameness
>>     and boredom. Vote Now at
>>     http://www.sourceforge.net/community/cca08_______________________________________________
>>     gumstix-users mailing list
>>     gumstix-users@...
>>     <mailto:gumstix-users@...>
>>     https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>
>     -------------------------------------------------------------------------
>     Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
>     Studies have shown that voting for your favorite open source project,
>     along with a healthy diet, reduces your potential for chronic lameness
>     and boredom. Vote Now at http://www.sourceforge.net/community/cca08
>     _______________________________________________
>     gumstix-users mailing list
>     gumstix-users@...
>     <mailto:gumstix-users@...>
>     https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> ------------------------------------------------------------------------
>
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@...
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Hello world! problems

by Bobby Goodrich :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

I used bitbake to compile the hello world package and everything works fine... except when I unpacked the .ipk file on the gumstix, it took up a whopping 400k of space!!  What is going on here? I don't understand how a 5 line Hello World program was bloated to take up that much space.

Date: Sun, 6 Jul 2008 00:06:02 -0500
From: rcr800@...
To: gumstix-users@...
Subject: Re: [Gumstix-users] Hello world! problems

Thank you very much Mark, I will try that first thing on Monday. Just in case could tell me how to modify the make file?

Thank you again,

Jose

On Sat, Jul 5, 2008 at 10:12 AM, Mark Ahlenius <m_ahlenius@...> wrote:
Hi Jose,

yes, you will need to use bitbake in the OE environment to build the
application.  Otherwise, you will have to edit the makefile so that it
uses the cross compiler tools and libs accordingly.    I have done this
before, but  ended up just having the bitbake recipe run the makefile.

If you follow the instructions for setting up bitbake and then go
through Steve's Hello World tutorial, it should work just fine for you.

best,

'mark

Jose Gomez wrote:
> I am using codeBlocks in Ubuntu hardy and I don't know how to run the
> executable file here.  If I use the command "make" will it use the
> host compiler? Am I supposed to use bitbake to cross-compile?
>
> Thank you very much for the help John.
>
> Jose
>
> On Thu, Jul 3, 2008 at 5:45 PM, John Pauley
> <pauleyj@... <mailto:pauleyj@...>> wrote:
>
>     That sounds like your program was _not_ compiled with the
>     cross-compiler but was compiled with your host compiler...  Have
>     you tried running what you think is cross-compiled on the host?
>
>     John
>
>     On Jul 3, 2008, at 2:46 PM, Jose Gomez wrote:
>
>>     Hi, as I have stated on other posts I am a beginner programmer.
>>     So, I was following the instructions for the hello world example
>>     on gumstix.net <http://gumstix.net> and used a make file to do
>>     the cross-compiling.  I was able to get the executable file from
>>     that, but once I tried running it in gumstix it will just give me
>>     the error: unexpected ), I did not mess with the recipe and I was
>>     able to run the same C code on my compiler.
>>
>>     What could be the problem?
>>
>>     Thank you for the help in advance,
>>     Jose
>>     -------------------------------------------------------------------------
>>     Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
>>     Studies have shown that voting for your favorite open source project,
>>     along with a healthy diet, reduces your potential for chronic
>>     lameness
>>     and boredom. Vote Now at
>>     http://www.sourceforge.net/community/cca08_______________________________________________
>>     gumstix-users mailing list
>>     gumstix-users@...
>>     <mailto:gumstix-users@...>
>>     https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>
>     -------------------------------------------------------------------------
>     Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
>     Studies have shown that voting for your favorite open source project,
>     along with a healthy diet, reduces your potential for chronic lameness
>     and boredom. Vote Now at http://www.sourceforge.net/community/cca08
>     _______________________________________________
>     gumstix-users mailing list
>     gumstix-users@...
>     <mailto:gumstix-users@...>
>     https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> ------------------------------------------------------------------------
>
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@...
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users



The i’m Talkaton. Can 30-days of conversation change the world? Find out now.
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Hello world! problems

by Dave Hylands :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Bobby,

On Thu, Jul 10, 2008 at 8:17 AM, Bobby Goodrich <iceshear@...> wrote:
>
> I used bitbake to compile the hello world package and everything works
> fine... except when I unpacked the .ipk file on the gumstix, it took up a
> whopping 400k of space!!  What is going on here? I don't understand how a 5
> line Hello World program was bloated to take up that much space.

Are you saying the .ipk file is that big, or that the hello world
program is that big?

If the hello world program is statically linked, then it could easily
be that big.  Under buildroot (using uclibc), hello world
compiled/linked dynamically is 5K, whereas compiled/linked statically
is 340K.

On my development machine (x86 using glibc), I get 6K dynamic and 540K static.

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Hello world! problems

by Bobby Goodrich :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
The .ipk file is 200k, and the unpacked "helloworld" package is 400k for a total of 600k (until I delete the .ipk)
First, how would I go about linking dynamically instead of statically using bitbake (not buildroot)?
Do I use the arm-angstrom-linux-gnueabi-c++ compiler istead of making the cumbersome package and recipe combination?

Second, If I was to use buildroot, then how would I be able to run the programs on the gumstix (which is currently running the OE filesystem and kernel) without having /bin/bash to execute them?
Flashing the gumstix with a buildroot kernel and filesystem nets me a corrupt terminal.
Also, how would I perform static vs dynamic linking with the buildroot (arm-linux-g++) cross compiler?
I suppose it would be the same was as the arm-angstrom-linux-gnueabi-c++ one.

Thanks for the response and any further help,
Bobby


> Date: Thu, 10 Jul 2008 10:01:39 -0700
> From: dhylands@...
> To: gumstix-users@...
> Subject: Re: [Gumstix-users] Hello world! problems
>
> Hi Bobby,
>
> On Thu, Jul 10, 2008 at 8:17 AM, Bobby Goodrich <iceshear@...> wrote:
> >
> > I used bitbake to compile the hello world package and everything works
> > fine... except when I unpacked the .ipk file on the gumstix, it took up a
> > whopping 400k of space!! What is going on here? I don't understand how a 5
> > line Hello World program was bloated to take up that much space.
>
> Are you saying the .ipk file is that big, or that the hello world
> program is that big?
>
> If the hello world program is statically linked, then it could easily
> be that big. Under buildroot (using uclibc), hello world
> compiled/linked dynamically is 5K, whereas compiled/linked statically
> is 340K.
>
> On my development machine (x86 using glibc), I get 6K dynamic and 540K static.
>
> --
> Dave Hylands
> Vancouver, BC, Canada
> http://www.DaveHylands.com/
>
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@...
> https://lists.sourceforge.net/lists/listinfo/gumstix-users


Making the world a better place one message at a time. Check out the i'm Talkathon.
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Hello world! problems

by Dave Hylands :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Bobby,

> The .ipk file is 200k, and the unpacked "helloworld" package is 400k for a total of 600k (until I delete the .ipk)
> First, how would I go about linking dynamically instead of statically using bitbake (not buildroot)?
> Do I use the arm-angstrom-linux-gnueabi-c++ compiler istead of making the cumbersome package and recipe combination?

Sorry - I'm not familiar with OE yet, so I'll have to let somebody
else answer that one.

> Second, If I was to use buildroot, then how would I be able to run the programs on the gumstix (which is currently running the OE filesystem and kernel) without having /bin/bash to execute them?

You probably can't use the buildroot toolchain with an OE system.

> Flashing the gumstix with a buildroot kernel and filesystem nets me a corrupt terminal.
> Also, how would I perform static vs dynamic linking with the buildroot (arm-linux-g++) cross compiler?
> I suppose it would be the same was as the arm-angstrom-linux-gnueabi-c++ one.

Normally, the toolchain defaults to dynamic. To force it to use
static, you pass -static on the command line to gcc/g++ when compiling
and when linking. Similarly to force dynamic, you use -dynamic.

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Hello world! problems

by Jose Gomez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

First of all thank you Mark and John for helping me with my Hello world problem, I was able to do the cross-compiling and run the exe file on the gumstix. 
Second, I would like to know if there is an example (meaning me being able to run the bitbake file) on how to use the i2c to communicate from OE gumstix to robostix, something like turning on and off an LED?  and if not, if it is not too much trouble that is, can someone tell how to do it?
 
Thank you,
Jose

On Thu, Jul 10, 2008 at 3:19 PM, Dave Hylands <dhylands@...> wrote:
Hi Bobby,

> The .ipk file is 200k, and the unpacked "helloworld" package is 400k for a total of 600k (until I delete the .ipk)
> First, how would I go about linking dynamically instead of statically using bitbake (not buildroot)?
> Do I use the arm-angstrom-linux-gnueabi-c++ compiler istead of making the cumbersome package and recipe combination?

Sorry - I'm not familiar with OE yet, so I'll have to let somebody
else answer that one.

> Second, If I was to use buildroot, then how would I be able to run the programs on the gumstix (which is currently running the OE filesystem and kernel) without having /bin/bash to execute them?

You probably can't use the buildroot toolchain with an OE system.

> Flashing the gumstix with a buildroot kernel and filesystem nets me a corrupt terminal.
> Also, how would I perform static vs dynamic linking with the buildroot (arm-linux-g++) cross compiler?
> I suppose it would be the same was as the arm-angstrom-linux-gnueabi-c++ one.

Normally, the toolchain defaults to dynamic. To force it to use
static, you pass -static on the command line to gcc/g++ when compiling
and when linking. Similarly to force dynamic, you use -dynamic.

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Hello world! problems

by Shane Kirkbride :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi Jose,

I use use i2c-io (courtesy of Dave)  to communicate between the robostix and the gumstix. But before you do that you need the i2c modules loaded (i2c-dev and i2c-pxa) and i2c-load loaded. Those are also .ipk modules which you can install. First put the i2c bootloader on the robostix then use i2c-load to load the i2c-io.hex file onto the robostix.  It works very well when done correctly.

~Shane

 


From: gumstix-users-bounces@... [mailto:gumstix-users-bounces@...] On Behalf Of Jose Gomez
Sent: Monday, July 14, 2008 12:59 PM
To: General mailing list for gumstix users.
Subject: Re: [Gumstix-users] Hello world! problems

 

First of all thank you Mark and John for helping me with my Hello world problem, I was able to do the cross-compiling and run the exe file on the gumstix. 

Second, I would like to know if there is an example (meaning me being able to run the bitbake file) on how to use the i2c to communicate from OE gumstix to robostix, something like turning on and off an LED?  and if not, if it is not too much trouble that is, can someone tell how to do it?

 

Thank you,

Jose

On Thu, Jul 10, 2008 at 3:19 PM, Dave Hylands <dhylands@...> wrote:

Hi Bobby,


> The .ipk file is 200k, and the unpacked "helloworld" package is 400k for a total of 600k (until I delete the .ipk)
> First, how would I go about linking dynamically instead of statically using bitbake (not buildroot)?
> Do I use the arm-angstrom-linux-gnueabi-c++ compiler istead of making the cumbersome package and recipe combination?

Sorry - I'm not familiar with OE yet, so I'll have to let somebody
else answer that one.


> Second, If I was to use buildroot, then how would I be able to run the programs on the gumstix (which is currently running the OE filesystem and kernel) without having /bin/bash to execute them?

You probably can't use the buildroot toolchain with an OE system.


> Flashing the gumstix with a buildroot kernel and filesystem nets me a corrupt terminal.
> Also, how would I perform static vs dynamic linking with the buildroot (arm-linux-g++) cross compiler?
> I suppose it would be the same was as the arm-angstrom-linux-gnueabi-c++ one.

Normally, the toolchain defaults to dynamic. To force it to use
static, you pass -static on the command line to gcc/g++ when compiling
and when linking. Similarly to force dynamic, you use -dynamic.

--

Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

 


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Hello world! problems

by Jose Gomez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Shane,

Thank you very much for reply, they do seem to be working pretty good, but I still would like to just run a program on gumstix oe to turn on and off the LEDs without me having to type in the commands on the gumstix console. I know the Flasher.hex does it but I want to see an example C program to control the robostix from the my verdex gumstix.
Just a very small example will do, that shows me the header files that I would need to include, and where I would be able to find them.

I really appreciate the help, thanks.

Jose

On Mon, Jul 14, 2008 at 2:06 PM, Shane Kirkbride <skirkbri@...> wrote:

Hi Jose,

I use use i2c-io (courtesy of Dave)  to communicate between the robostix and the gumstix. But before you do that you need the i2c modules loaded (i2c-dev and i2c-pxa) and i2c-load loaded. Those are also .ipk modules which you can install. First put the i2c bootloader on the robostix then use i2c-load to load the i2c-io.hex file onto the robostix.  It works very well when done correctly.

~Shane

 


From: gumstix-users-bounces@... [mailto:gumstix-users-bounces@...] On Behalf Of Jose Gomez
Sent: Monday, July 14, 2008 12:59 PM
To: General mailing list for gumstix users.


Subject: Re: [Gumstix-users] Hello world! problems

 

First of all thank you Mark and John for helping me with my Hello world problem, I was able to do the cross-compiling and run the exe file on the gumstix. 

Second, I would like to know if there is an example (meaning me being able to run the bitbake file) on how to use the i2c to communicate from OE gumstix to robostix, something like turning on and off an LED?  and if not, if it is not too much trouble that is, can someone tell how to do it?

 

Thank you,

Jose

On Thu, Jul 10, 2008 at 3:19 PM, Dave Hylands <dhylands@...> wrote:

Hi Bobby,


> The .ipk file is 200k, and the unpacked "helloworld" package is 400k for a total of 600k (until I delete the .ipk)
> First, how would I go about linking dynamically instead of statically using bitbake (not buildroot)?
> Do I use the arm-angstrom-linux-gnueabi-c++ compiler istead of making the cumbersome package and recipe combination?

Sorry - I'm not familiar with OE yet, so I'll have to let somebody
else answer that one.


> Second, If I was to use buildroot, then how would I be able to run the programs on the gumstix (which is currently running the OE filesystem and kernel) without having /bin/bash to execute them?

You probably can't use the buildroot toolchain with an OE system.


> Flashing the gumstix with a buildroot kernel and filesystem nets me a corrupt terminal.
> Also, how would I perform static vs dynamic linking with the buildroot (arm-linux-g++) cross compiler?
> I suppose it would be the same was as the arm-angstrom-linux-gnueabi-c++ one.

Normally, the toolchain defaults to dynamic. To force it to use
static, you pass -static on the command line to gcc/g++ when compiling
and when linking. Similarly to force dynamic, you use -dynamic.

--

Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/

-----------------------------------------------------