Rockbox Development > Starting Development and Compiling

Would this work?

<< < (2/2)

bluebrother:

--- Quote from: hobosrock on November 09, 2009, 07:21:32 PM ---Also why wouldnt that compiler work? After all it compiles for arm7 tdmi.

--- End quote ---
Because compilers are different, even at the C language level. The most important issue is support for the C99 standard here, and apart from gcc I haven't seen a compiler with reasonable support for C99. The moment you use special features like inline assembly you're pretty much bound to a compiler, and Rockbox does make use of (and needs) such features. Not to forget about so simple things like compiler command line usage, which can be heavily different between compilers even if they build for the same target CPU.

I don't know the compiler you mentioned. Building by itself could be possible, but will definitely require adjusting heaps of the Rockbox sources. Besides, why use a commercial compiler if a free one is available that's pretty good?

torne:

--- Quote from: hobosrock on November 10, 2009, 12:33:50 AM ---Oh I see thanks for the heads up there  :) so far I just started with a simple plugin. Is there an easy way to compile one plugin and just pop it into an install or do I have to recompile each time?
--- End quote ---
When you run "make" only files which have changed will be recompiled - once you've built Rockbox once, it will only recompile the plugin whose source you are changing. You don't need to reinstall rockbox, you can just copy the one plugin you have changed over, but the install of rockbox needs to be close (ideally identical) to the version you are building the plugin from.


--- Quote ---Also where would I find a more complete list of rockbox functions? [rb->functionname();] Thanks for all the help so far!
--- End quote ---
In apps/plugin.h.


--- Quote ---Edit:
I'm also a bit confused about rb->(lcd-update) I dont get how I would get things into memory and not display them until this is called.
--- End quote ---
You don't have to do this, the LCD code does it for you. *None* of the drawing functions are actually guaranteed to update the screen (unless they say they do), so you always need to call lcd_update() to make sure what you have drawn gets displayed.


--- Quote ---rb->splashf() makes no sense to me (It seems the same as splash...)
--- End quote ---
splash() can only print strings, splashf() is like printf, it can format arbitrary values. e.g. rb->splashf(5*HZ, "The value of x is %d", x); will print "The value of x is 7", assuming x is indeed 7.


--- Quote ---and rb->lcdputsxy() is a bit confusing to me since I have programmed in Ti-Basic (too slow for most games) and when displaying strings of text if you set the coordinates as 0,0 half the characters where cut off.... when you use 0,0 as your coordinates does it simply place it in the corner or cut a part off the characters
--- End quote ---
It sounds like Ti-Basic uses that as the center point for the text. We position text such that the top left corner of the text is at the coordinate given, so 0,0 will start at the very top left corner of the display with no margin, but will not cut off any pixels.


--- Quote ---Maybe this would be easier if you pointed me to the file in which these functions are defined... Eventually I'll figure out the source. Thanks again!

--- End quote ---
The actual implementations of the plugin API functions are all over the place: lcd related functions are in the LCD drivers, playback related functions are in the playback code, etc. The API is declared in plugin.h, though.

hobosrock:
Thanks and if you don't mind I have one other question (sorry I don't know anything  :-\) I dont see why you used %d there... I get the x after the comma however I dont see how %d is replaced by x...
(good point bluebrother  :o I just didnt know where to start)

saratoga:

--- Quote from: hobosrock on November 10, 2009, 06:05:54 PM ---Thanks and if you don't mind I have one other question (sorry I don't know anything  :-\) I dont see why you used %d there... I get the x after the comma however I dont see how %d is replaced by x...
(good point bluebrother  :o I just didnt know where to start)

--- End quote ---

Thats a pretty common programming convention in many languages that are based on c.  Take a look at the documentation for printf:

http://www.cplusplus.com/reference/clibrary/cstdio/printf/

Rockbox uses many of those options (though obviously not all of them are applicable).

hobosrock:
Well thanks I guess thats pretty much all I needed. It was an easier start than I thought, thanks guys!

Navigation

[0] Message Index

[*] Previous page

Go to full version