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
| | |-+  New to Rockbox Development, Plugins?
« previous next »
  • Print
Pages: [1] 2 3

Author Topic: New to Rockbox Development, Plugins?  (Read 7304 times)

Offline neoAKiRAz

  • Member
  • *
  • Posts: 27
New to Rockbox Development, Plugins?
« on: March 14, 2007, 01:54:25 AM »
Hi! I've just tried Rockbox for the first time in my Sansa e260, and it worked great! It's amazing.
I would like to contribute with the development of rockbox, but I'm not sure where to start from. I thought of plugins, like games or some others things.
Is there any guide for developing plugins? Because I've no idea where to start from. I know C/C++, I've worked with SDL, and I have some knowledge of assembler (x86, SPARC)... I'm not sure what's the platform for the plugins development, I mean, are there a sort of 'system calls' to access de LCD, etc? Or is just assembly language? Any help will be appreciated.
Greetz!
Logged

Offline neoAKiRAz

  • Member
  • *
  • Posts: 27
Re: New to Rockbox Development, Plugins?
« Reply #1 on: March 14, 2007, 02:35:44 AM »
Ok, I should have download rockbox source BEFORE posting :P Sorry for that.
Now I did. I found that it includes the sources of the plugins, and from there I found the API, to access the LCD, buttons, etc. I think I'll figure pretty much out from the plugin's .Cs.

What I'm not sure right now is how to compile, gcc for... Sansa?? Hehe, I guess not. How should I compile the source and make the .rock? I'd just have to compile it and copy it to the ROCKS dir?

Is there any other information of the API in addition of the 'plugin.h'?
Please excuse my english :P Thanks!
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: New to Rockbox Development, Plugins?
« Reply #2 on: March 14, 2007, 03:44:09 AM »
Yes, the wiki. Just look after the "For Developers" section in the DocumentationIndex
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline neoAKiRAz

  • Member
  • *
  • Posts: 27
Re: New to Rockbox Development, Plugins?
« Reply #3 on: March 14, 2007, 03:47:53 PM »
Is there anyway of compiling the .c of the plugin only, get the .rock file and just add it to the folder in /.rockbox?? Or I have to compile the whole rockbox source code?
I've been reading the Wiki but I haven't found anything on compiling plugins in the "How to write Rockbox plugins" section. I hope anyone can help me. Thanks!
Logged

Offline 007quick

  • Member
  • *
  • Posts: 70
Re: New to Rockbox Development, Plugins?
« Reply #4 on: March 14, 2007, 04:00:34 PM »
Ok, you must compile a whole install. Do you have a develepment enironment?
Logged

Offline neoAKiRAz

  • Member
  • *
  • Posts: 27
Re: New to Rockbox Development, Plugins?
« Reply #5 on: March 14, 2007, 04:12:16 PM »
Yes, I've just finished installing CygWin, I'm following the instructions in http://www.rockbox.org/twiki/bin/view/Main/HowToCompile, but when I run $ ../tools/configure it only shows 12 targets, and my Sansa isn't one of them. I'll make sure I have the last version of the sourcecode, although I downloaded it yesterday.
Oh, and I also get, before the "enter target platform" a "../tools/configure: line 380: cd: /home/Bruno: No such file or directory" which I don't know if will be a problem soon. That's because my Windows user name has a space on it, and then my home directory in Cygwin is "(...)home/Name With Spaces"... which I don't know how to change. Any idea?
Logged

Offline 007quick

  • Member
  • *
  • Posts: 70
Re: New to Rockbox Development, Plugins?
« Reply #6 on: March 14, 2007, 05:23:07 PM »
Ok if you want to indicate a file with spaces you have to do it with quotes like this "file with spaces"   So, did you install the cygwin under c:cygwin/  ? or in my documents?    the ".." refers to going up one level of the directory while the /tools/configure means to run the file called configure in the folder called tools. the important thing is to be able to point to that file. Then once you have a make file type "make" then when that finishes type "make zip"
Give that a try!
Logged

Offline neoAKiRAz

  • Member
  • *
  • Posts: 27
Re: New to Rockbox Development, Plugins?
« Reply #7 on: March 14, 2007, 05:32:36 PM »
Hi, thanks for your reply! I have some experience with linux, so you don't need to be so specific, thanks anyway :)

Ok, I used the 'svn co svn://svn.rockbox.org/rockbox/trunk rockbox' command and it downloaded the full source. What's the difference between this one and the .tar one? For example, the .tar doesn't have the 'bitmap' subdirs...

As for the space in the directory name, just moved the 'rockbox' downloaded folder to /home/. This directory is in 'C:\Programas\Facu\CygWin\home', so there are no spaces in the path now.

It started compiling for Sansa (make), but at the end I got:

Code: [Select]
/bin/sh: /usr/bin/cat: Resource temporarily unavailible
/bin/sh: /opt/arm/bin/arm-elf-gcc: Resource temporarily unavailible
make[3]: *** [/home/rockbox/build/apps/plugins/rockboy/link.lds] Error 126
make[2]: *** [rockboy] Error 2
rm (...a lot of .ELFs...)
make[1]: *** [rocks] Error 2
make: *** [all] Error 2

The /usr/bin/ folder is empty, although 'cat' is in /bin/, why does it look for it there?
Although I'm not 'making an iPod target', I checked and 'arm-elf-gcc' is in the PATH variable.
Any idea?
Logged

Offline neoAKiRAz

  • Member
  • *
  • Posts: 27
Re: New to Rockbox Development, Plugins?
« Reply #8 on: March 14, 2007, 05:58:25 PM »
That was really strange, I closed and reopened Cygwin and it threw me a bunch of "Resource temporarily unavailible"... and it wouldn't bring up the sh shell.
I just rebooted Windows and it got fixed. Yhen tried 'make' again and I got (after some "nothing to be done with...":

Code: [Select]
/home/rockbox/build/apps/plugins/rockboy/rockboy.o: In function `plugin_start':
rockboy.c:(.text+0x408): undefined reference to `iedata'
rockboy.c:(.text+0x40c): undefined reference to `iend'
rockboy.c:(.text+0x410): undefined reference to `iramstart'
rockboy.c:(.text+0x414): undefined reference to `iramend'
rockboy.c:(.text+0x41c): undefined reference to `iramcopy'
/home/rockbox/build/apps/plugins/rockboy/rockboy.o:(.header+0x8): undefined reference to `plugin_start_addr'
/home/rockbox/build/apps/plugins/rockboy/rockboy.o:(.header+0xc): undefined reference to `plugin_end_addr'
collect2: ld returned 1 exit status
make[3]: *** [/home/rockbox/build/apps/plugins/rockboy/rockboy.elf] Error 1
make[2]: *** [rockboy] Error 2
make[1]: *** [rocks] Error 2
make: *** [all] Error 2

What's this? Is there any way to exclude a plugin? I tried deleting rockboy.c and rockboy folder and it wan't enough. And related to this, one more question, now that I have an example my_plugin.c, how can I do for the makefile to compile it and produce the .rock file together with the rest of the plugins?
Logged

Offline 007quick

  • Member
  • *
  • Posts: 70
Re: New to Rockbox Development, Plugins?
« Reply #9 on: March 14, 2007, 06:03:41 PM »
Ok, do not delete files
NOT AT ALL
you need to get a patch from the fly spray on the left and then apply it.
Put the patch in the root folder of your rockbox.
eg. .../home/rockbox/
and then navigate to the above dir and do this command.
patch -p0 < thepatchyoudownloaded.patch                   (may also be a .diff)
if that doesn't work try -p1 then -p2 ..... -p5
Give that a shot!
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: New to Rockbox Development, Plugins?
« Reply #10 on: March 14, 2007, 06:04:52 PM »
Your compiler might be outdated -- you need at least 4.0.3 for the Sansa. Run arm-elf-gcc --version to get the version number displayed. If not try a "make clean" first.
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline 007quick

  • Member
  • *
  • Posts: 70
Re: New to Rockbox Development, Plugins?
« Reply #11 on: March 14, 2007, 06:05:56 PM »
Good advice! ;) :D
Logged

Offline neoAKiRAz

  • Member
  • *
  • Posts: 27
Re: New to Rockbox Development, Plugins?
« Reply #12 on: March 14, 2007, 06:20:59 PM »
I have version 4.0.3, the output to 'arm-elf-gcc --version' is

Code: [Select]
arm-elf-gcc (GCC) 4.0.3 (rockbox patch #1)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I don't understand what you say about the patch... There's a "Flyspray #" button on the left, but I need some input. I tried 'rockboy' with no luck, and then went to 'patches' in 'Tracker' and searched for 'rockboy' again. It showed up 4 entries, but dated 2006. I'm not sure either what I'm looking for... :P
With the 'svn' command what I did was downloading the lastest source from CVS? And now patches should fix some errors in it? Sorry for all these questions, but I'm a noob... :)
Thanks!
Logged

Offline 007quick

  • Member
  • *
  • Posts: 70
Re: New to Rockbox Development, Plugins?
« Reply #13 on: March 14, 2007, 06:27:58 PM »
No problem!
Its just bringing my total posts up! ;)
but anyways. Are you just trying to get rockboy to work?
I don't know the state that the sansa is in but it sounds like it was trying to compile it so assuming that it is in working condition, you need a rom file from various websites of a game. Say pokemon yellow or whatever you want. then you just click it from the file browser in rockbox. Ok so I just checked and yes sansa has rockboy already. you just need to click on a rom file.
Logged

Offline neoAKiRAz

  • Member
  • *
  • Posts: 27
Re: New to Rockbox Development, Plugins?
« Reply #14 on: March 14, 2007, 06:39:20 PM »
Hi! :)
No, I'm not trying to make rockboy work :P I'll resume:
As from yesterday, develpers got audio working in Sansa. So I downloaded the lastest 'rockbox.zip' (with .rockbox folder and rockbox.e200 file) (that would be the lastest "already built" firmware for sansa?) and made it work with dual boot in my Sansa.
Now I'm interested in start developing something for rockbox, and I started with plugins. Based on an old version of a SNAKE C program for SDL which I wrote a couple of years ago I re-wrote a .C using the plugin API for rockbox. Now I just want to try to compile it (and fix possible errors), and then try it in my Sansa.
And for that I understood I have to compile the whole rockbox code with the addition of my plugin (is not enough (or just can't be done) to compile a my_plugin.rock file and just add it to the 'plugins' folder in my Sansa) so I'm trying, first, to compile the downloaded rockbox source alone. And then, in some way I still don't know about, add my plugin for the 'make' to compile it as well...
I hope I explained myself :P Thanks for all the help!
Logged

  • Print
Pages: [1] 2 3
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  New to Rockbox Development, Plugins?
 

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

Page created in 0.075 seconds with 14 queries.