Rockbox Development > Starting Development and Compiling

Programming Help?

(1/2) > >>

froggyman:
Hello all, I have been using RockBox for quite some time now and I have also been looking into starting to program for a while too. And I thought that C would be a could language to start on being that so many things are written in it.

So does anyone know of any good, in depth guides to help someone who wants to start C programming. Also, the main reason i want to learn C is because of so many programs are made with it and so I can understand the rockbox source better, along with the patches.

 I do however have alot of programming expierence in Ti-Basic and Z80 assesmbly.

Sorry if this is the wrong thread for this, but it seemed like the best one.

aaron424:
I also would like to start working with C programming. Any good articles?

froggyman:
I just got a book from my librairy titled "The C programming Language" by K & R.

I also managed to find one on wikibooks: http://en.wikibooks.org/wiki/C_Programming

From what I found, its mostly a time comitment. I have also found a lot of refrence articles (listing C commands and their syntax) help out alot when writing programs for the first time. For example I am working on a piano plugin for rockbox and use the refrence book to see what commands I need to do what I want , it will be some time before I get anything done that works for the plugin, as this is my first "big" C program and still end up getting a lot of errors and what not.

Chronon:
That book, The C Programming Language, is considered by many to be the canonical text on C.

Perusing source for existing plugins is also helpful for familiarizing yourself with the Rockbox plugin API.

GodEater:
The main problem I always found with programming text books like K&R is that they teach you these basic steps, and once you reached the end of the book you know quite a bit about programming. What they always fail to do though is point out that now you've reached this level of understanding there's no good reason to use all these new skills you have to solve ALL your problems.

For example : If you're writing a program to transfer data over the internet you *could* do it with the skills you've picked up from reading K&R cover to cover, but you'd be mostly wasting your time, and probably making a ton of mistakes. What you *should* do is find a library (in the sense of "someone else's code", not in the sense of "a place which stores loads of books") that already does that. A lot of Rockbox regulars will know that our beloved Bagder is also the chief programmer of libcurl and the curl command line utility. If you wanted to do the above you'd be far better of using all the code that he's sweated away at over the years than starting again from scratch on your own.

Learning what libraries are out there and the best way to use them is the next step on the programming path in my opinion, and there are few text books which make that point well.

Programming for Rockbox is slightly similar. We don't have "libraries" as such, but there is heaps of code in the Rockbox code base for doing certain functions - it's important once you've finished your C book to go through that and work out which bits you can use, and which bits need you to write new functions.

Navigation

[0] Message Index

[#] Next page

Go to full version