Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: d3nn1as on July 28, 2007, 04:33:33 PM

Title: Compiling Plugins
Post by: d3nn1as on July 28, 2007, 04:33:33 PM
Hey

I'm developing a little basic interpreter plugin for rockbox. It's converted from one
of my old projects.

Is there a way to compile just this plugin (not the whole rockbox source code along with it)? It still compiles the full thing even if only one plugin source has changed.

I'm not really familiar with the rockbox source (or cygwin), but I thought it would be fun to make a little scripting engine for mp3 players.

This is what gave me the idea: http://www.ipodlinux.org/LET_BASIC (I'm stealing some code from there aswell)

EDIT: When I'm compiling the plugin files they're all corrupt (half the size of the ones from the daily build) and they won't run. Maybe something I forgot? (I just compiled it simple  ./tools/configure; make; make zip)
Title: Re: Compiling Plugins
Post by: bascule on July 29, 2007, 12:49:15 AM
Is there a way to compile just this plugin (not the whole rockbox source code along with it)? It still compiles the full thing even if only one plugin source has changed.
No. If you do, then you will get an 'Incompatible version' error when trying to run the plugin.

EDIT: When I'm compiling the plugin files they're all corrupt (half the size of the ones from the daily build) and they won't run. Maybe something I forgot? (I just compiled it simple  ./tools/configure; make; make zip)
Have you managed to compile a completely clean version of the source? If so, then it must be your code that's causing the problem.
Title: Re: Compiling Plugins
Post by: pixelma on July 29, 2007, 09:30:04 AM
Is there a way to compile just this plugin (not the whole rockbox source code along with it)? It still compiles the full thing even if only one plugin source has changed.
No. If you do, then you will get an 'Incompatible version' error when trying to run the plugin.
This is not true as long as you really only change the code of your plugin. You'll only get an "incompatible version" if you have to add new functions to the plugin API, so that the one your installed build "provides" doesn't match that anymore (don't know all the details).

There is the option to "make rocks" for building the plugins seperately but that'll only work once you compiled a full build.

I'm not sure about your other problem but if they are significantly smaller - maybe you "configured" for a different target?

Title: Re: Compiling Plugins
Post by: d3nn1as on August 01, 2007, 04:20:15 PM
I chose to compile for the sansa e200 -> normal build, and if builds without any errors.

But the plugins get very small. I attached a image to show you:

http://i9.tinypic.com/4vrd8gh

Any ideas?
Title: Re: Compiling Plugins
Post by: Bagder on August 01, 2007, 04:32:08 PM
Plugins are small, that's not a problem!
Title: Re: Compiling Plugins
Post by: d3nn1as on August 02, 2007, 03:46:59 AM
Yes, but if you compare them with the plugin sizes in the daily builds, they are too small.
And they don't work which is the actual problem.

When I run any of them in my sansa I get an error, same thing in the simulator (Bad image file). The files are completely up to date, I haven't changed anything at all.
Title: Re: Compiling Plugins
Post by: Bagder on August 02, 2007, 04:36:42 AM
Yes, but if you compare them with the plugin sizes in the daily builds, they are too small.
And they don't work which is the actual problem.

I did, and no they're not smaller as far as I could see.

Quote
When I run any of them in my sansa I get an error

What error is that?
Title: Re: Compiling Plugins
Post by: d3nn1as on August 02, 2007, 12:35:43 PM
I get an "Incompatible Version" error.
Title: Re: Compiling Plugins
Post by: Llorean on August 02, 2007, 12:43:27 PM
How are you installing your build?
Title: Re: Compiling Plugins
Post by: d3nn1as on August 02, 2007, 01:01:31 PM
Found the problem. I was using an older version of rockbox and I just moved the rock files, not the whole firmware.

EDIT: Are there any plugin documentation that I can use (functions etc.)?. I never find anything in the wiki :/

EDIT: You should fix the code error at: http://www.rockbox.org/twiki/bin/view/Main/UsingTheMenuAPI -> "Examples"

Thank you for your help!
Title: Re: Compiling Plugins
Post by: Llorean on August 02, 2007, 01:50:16 PM
Being a wiki page, anyone can fix it...
Title: Re: Compiling Plugins
Post by: dionoea on August 08, 2007, 09:22:32 AM
EDIT: Are there any plugin documentation that I can use (functions etc.)?. I never find anything in the wiki :/

I wrote a plugin api doc a long time ago (it's located in the source code's documentation folder). This is likely to be outdated ... but it can help if you're really lost (updates to that doc are of course welcome, or you could even move it to the wiki I guess and update it there).

The other source of documentation is the apps/plugin.h file where the plugin_api structure is defined. (well ... at least it lists what's available)