Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Writing Code Quicker
« previous next »
  • Print
Pages: [1] 2

Author Topic: Writing Code Quicker  (Read 5125 times)

Offline Rcdude10tc32

  • Member
  • *
  • Posts: 20
Writing Code Quicker
« on: January 02, 2008, 09:45:02 AM »
hey guys, I have a feeling i might be answering my own question here but just curious how you all write code and not kill someone doing it.

-I've setup cygwin
-Wrote and compiled code using cygwin
-Ran it on the simulator and my rockbox
Everythings cool but it takes about 6 or 7 minutes for each compile of cygwin for the simulator build.

Is there any quicker way to compile just what i've changed?  Does anyone have it setup so a program like Eclipse automates the whole process and launches the simulator instantly?

Thanks
 -Justin
Logged

Offline Bagder

  • Member
  • *
  • Posts: 1452
    • Daniel's site
Re: Writing Code Quicker
« Reply #1 on: January 02, 2008, 09:51:07 AM »
Using Linux (even on vmware) is much quicker, 2-3 times faster on the same hardware than using cygwin. Then you can also use ccache and gain even more speedups when doing rebuilds of not too much changes.
Logged

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: Writing Code Quicker
« Reply #2 on: January 02, 2008, 09:59:26 AM »
Quote from: Rcdude10tc32 on January 02, 2008, 09:45:02 AM
Does anyone have it setup so a program like Eclipse automates the whole process and launches the simulator instantly?

There are instructions for Eclipse floating around somewhere in the wiki, but they're old and depreciated now.

All you need is Linux, a good text editor (vi, Emacs, Kate, etc.), SVN, and the source to Rockbox (which also gives you the other tools you need via shell scripts).
Logged
Former Rockbox dev. Rising from the ashes...

Players: iPod Video /w 128GB SSD mod, H320 /w 128GB SSD mod

Offline Lear

  • Developer
  • Member
  • *
  • Posts: 533
Re: Writing Code Quicker
« Reply #3 on: January 02, 2008, 10:21:04 AM »
Quote from: Rcdude10tc32 on January 02, 2008, 09:45:02 AM
-I've setup cygwin
-Wrote and compiled code using cygwin
-Ran it on the simulator and my rockbox
Everythings cool but it takes about 6 or 7 minutes for each compile of cygwin for the simulator build.

Is there any quicker way to compile just what i've changed?  Does anyone have it setup so a program like Eclipse automates the whole process and launches the simulator instantly?

Unless you have a very slow computer, or you're always making a full rebuild (which usually isn't necessary), I'd suspect a problem on your PC. In order to do its thing, Cygwin does some unusual things, which can cause slowdowns with some other applications (firewalls and antivirus programs typically). E.g., a firewall I used to use make Cygwin several times slower...
Logged

Offline Rcdude10tc32

  • Member
  • *
  • Posts: 20
Re: Writing Code Quicker
« Reply #4 on: January 02, 2008, 11:05:03 AM »
Quote from: Lear on January 02, 2008, 10:21:04 AM
...or you're always making a full rebuild (which usually isn't necessary...

My computers pretty good,
but you pretty much nailed it, it compiles Everything, all the rock plugins, doom, etc.  I didn't know you could only do part of it.  How do you compile just a part?
Logged

Offline Mad Cow

  • Member
  • *
  • Posts: 445
Re: Writing Code Quicker
« Reply #5 on: January 02, 2008, 02:33:29 PM »
If your computer's pretty good I would suggest vmware, it's a lot faster than Cygwin.
Logged
iRiver H10 5GB, Gigabeat F40, Gigabeat S60, all rockboxed. :P

Offline digerati1338

  • Member
  • *
  • Posts: 60
  • Geek Genius
Re: Writing Code Quicker
« Reply #6 on: January 02, 2008, 04:09:29 PM »
Try using linux.  Much better than windows for development.  Of course you know the distro that gets recommended to anyone new is Ubuntu.  You can use it as a live CD if you don't want to install it, though that might negate any performance gains.

I recommend a good text editor instead of Eclipse.  Emacs is great.  M-x compile runs make, and it has an integrated shell.
Logged

Offline tdtooke

  • Member
  • *
  • Posts: 151
Re: Writing Code Quicker
« Reply #7 on: January 02, 2008, 08:34:43 PM »
I'm finding out linux is a million times faster than cygwin now myself.  Can't believe I never tried it before since most of my compiling environments on windows were basically linux simulators.  Depending on how much you want to change the source code you might want something like codeblocks for the heavy lifting so to speak.  Jumping through various files in a project with no tools to jump you to right where you want to be can be a pain.
Logged

Offline digerati1338

  • Member
  • *
  • Posts: 60
  • Geek Genius
Re: Writing Code Quicker
« Reply #8 on: January 02, 2008, 10:04:17 PM »
Good text editors (code oriented) should be able to do that.  Its must more hidden than in an IDE.
Logged

Offline Rcdude10tc32

  • Member
  • *
  • Posts: 20
Re: Writing Code Quicker
« Reply #9 on: January 03, 2008, 05:02:57 AM »
Thanks guys,
its about time I get more into linux anyway, i've been poppin in live cds and not really doing anything with them for too long.  Should be some fun.
Thanks again
-Justin
Logged

Offline crash91

  • Artist
  • Member
  • *
  • Posts: 50
Re: Writing Code Quicker
« Reply #10 on: January 03, 2008, 08:18:00 AM »
Good to hear youre switching to linux ;) Also, if you have a dual(or multi) core processor, i remember reading in the wiki, that you should do make -j to make it use all of your cores, or something like that. IT did speed up compile times for me.
Logged
Owner of a Rockbox'd Sansa e250.
Rockbox WPS maker.

Offline MaW

  • Member
  • *
  • Posts: 11
Re: Writing Code Quicker
« Reply #11 on: January 08, 2008, 12:28:14 PM »
make -j tells make to try and run builds in parallel if possible. It does this by invoking multiple compiles at the same time, where it thinks that it's safe to do so. The number after -j tells it how many jobs to do at once - typically they say (number of processors or cores) + 1 is a good number.

However, it is known that in some situations it can cause programs to not compile right (or not compile at all), so that's something to be aware of unless Rockbox's Makefiles have been specifically checked to make sure they're okay with make's parallel build system.
Logged

Offline AlexP

  • Global Moderator
  • Member
  • *
  • Posts: 3688
  • ex-BigBambi
Re: Writing Code Quicker
« Reply #12 on: January 08, 2008, 12:46:34 PM »
make -j[whateveryouwant] works just fine to compile rockbox.
Logged
H140, F60, S120, e260, c240, Clip, Fuze v2, Connect, MP170, Meizu M3, Nano 1G, Android

Offline GodEater

  • Member
  • *
  • Posts: 2829
Re: Writing Code Quicker
« Reply #13 on: January 08, 2008, 12:48:24 PM »
Even "make -j" without the following number, where make tries to work out the best number of things to do at once on it's own works. Llorean and I had a race once, him using just -j, and me using -j3 (number of cores I had plus 1) - I lost!
Logged

Read The Manual Please

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Writing Code Quicker
« Reply #14 on: January 08, 2008, 03:48:59 PM »
Just for you cygwin people looking for a point of reference, it takes my Linux computer at home, that cost me $250 to build total, 4 minutes and 41 seconds to SVN update, make clean, and then compile a build for H120, Gigabeat F, Archos Recorder, Nano, and Sansa, and then make zips out of each of those builds and move them to a folder that I can download from over the web.

So, five builds plus zip creation when I frequently hear of 7-10 minute build times for a single build in cygwin.
Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Writing Code Quicker
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.135 seconds with 15 queries.