Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Openembedded debug best practice
PostPosted: Sun May 15, 2011 6:24 pm 
Offline

Joined: Fri Jan 16, 2009 10:46 pm
Posts: 44
Dear All,

I'm working with openembedded for sam9263, I can build the image and then I'm adding some application to the system, I'm create the recipes and putting the source file as described in the manual and everything seems ok.
The problem is that during the dubug cycle, change the souce code, building the image, download to the target for debugging ...a lot of time is spend on build process by bitbake ...maybe my pc is slow but really it takes a lot of time.
I have tried also to compile the single receipes with my application: $ bibake -b recipes/testgpio/testgpio_1.0.bb ...it takes time too.

I'm wondering if there is a best practice for speedup development cycle (change-compile-build image)

thanks


Top
 Profile  
 
 Post subject: Re: Openembedded debug best practice
PostPosted: Mon May 16, 2011 1:57 am 
Offline

Joined: Sat Oct 30, 2010 6:04 pm
Posts: 574
If you are simply doing user space applications, wouldn't it be simpler to put the GNU/GCC tool chain, make, pico/whatever on the target and edit/compile/run there from the terminal?

If you like windows, you could use a samba share.


Top
 Profile  
 
 Post subject: Re: Openembedded debug best practice
PostPosted: Mon May 16, 2011 12:20 pm 
Offline

Joined: Fri Jan 16, 2009 10:46 pm
Posts: 44
thanks,
I'm not only developing application on user space, but also some drivers.
Putting the native arm toolchain on the target can be a solution, but maybe there is something else to speed up the development.
Only to compile one recipe with my application (1k c code), my pc takes 1 hour...
I have read somewhere that for developing (once you have selected the target) is more useful using a SDK generated by openembedded....


Top
 Profile  
 
 Post subject: Re: Openembedded debug best practice
PostPosted: Mon May 16, 2011 12:20 pm 
Offline

Joined: Fri Jan 16, 2009 10:46 pm
Posts: 44
thanks,
I'm not only developing application on user space, but also some drivers.
Putting the native arm toolchain on the target can be a solution, but maybe there is something else to speed up the development.
Only to compile one recipe with my application (1k c code), my pc takes 1 hour...
I have read somewhere that for developing (once you have selected the target) is more useful using a SDK generated by openembedded....


Top
 Profile  
 
 Post subject: Re: Openembedded debug best practice
PostPosted: Tue May 17, 2011 11:05 pm 
Offline

Joined: Fri Jan 16, 2009 10:46 pm
Posts: 44
issue close, I have identified a pretty good way to go ahead
Thanks


Top
 Profile  
 
 Post subject: Re: Openembedded debug best practice
PostPosted: Wed May 18, 2011 7:11 pm 
Offline

Joined: Tue Jan 11, 2011 9:34 am
Posts: 9
can you share your method with us?
Why was it taking so long for a small amount of code?
I usually just use

bitbake small_recipie.bb -f -c clean
bitbake angstrom_image_recipe.bb

OAC


Top
 Profile  
 
 Post subject: Re: Openembedded debug best practice
PostPosted: Wed May 18, 2011 8:03 pm 
Offline

Joined: Sat Oct 30, 2010 6:04 pm
Posts: 574
He was making the entire kernel from scratch each time, as best I can observe.

Another classical method of debugging drivers is to use loadable modules along with insmod, modprobe, and rmmod. Along with building and testing foundation code outside of Linux so that when you integrate it, it has a good chance of working/mostly-working first time around.

Then again the Linux guys I've worked with actually "own" the make process, and were comfortable patching, editing, debugging and integrating changes, rather than just script kiddies.


Top
 Profile  
 
 Post subject: Re: Openembedded debug best practice
PostPosted: Wed May 18, 2011 8:17 pm 
Offline

Joined: Tue Jan 11, 2011 9:34 am
Posts: 9
Agreed. Whatever works best for you.
I tend to do my boot loaders and the kernel +modules manually but let OE handle the file system and initramfs if applicable.

Once I get to a stable patched kernel etc, i just move my patch set into OE and let it complete the full system.

OAC


Top
 Profile  
 
 Post subject: Re: Openembedded debug best practice
PostPosted: Mon May 23, 2011 11:43 pm 
Offline

Joined: Thu Jan 06, 2011 11:13 am
Posts: 31
Hello,

You have a lot of ways in order to not compile all your rootfs and your kernel :

- As said, using modules instead of built-in when you are debugging a driver
- Use nfs (you can only compile one package with bitbake and then add the new binaries to your rootfs)
- Use ssh to get your binaries
- Use opkg tool: copy the package file generated by OE to your target, or better, setup opkg to use your host machine as a package server


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: