Rockbox Technical Forums
Rockbox Development => Starting Development and Compiling => Topic started by: PaulF on November 20, 2016, 10:19:47 PM
-
I had good luck compiling for the Raspberry Pi and am trying another platform the uses pulseaudio for the pcm daemon. All the menus and themes work, but each file in my playlist only lasts a second when played. I use the fail safe theme and it shows the duration correctly for each file.
Any ideas?
I'm looking at firmware/target/hosted/sdl/pcm_sdl.c. How do I turn on the debug so I can see what's happening? For instance if the audio device doesn't open there is:
DEBUGF("Unable to open audio: %s\n", SDL_GetError());
-
How do I turn on the debug so I can see what's happening?
The DEBUG flag is passed as an additional build parameter during the configure stage.
- - First, make sure that your $OUT/build directory is clean by either running the configure script from a new directory or by running 'make veryclean' from your $OUT directory.
- - Then run the configure wizard, and select the numeric target identifier that corresponds to the target you wish to compile for. Presumably '200 SDL'.
- - You will then be prompted to select which build type you would like to compile, enter the 'A' switch to select an advanced build.
- - Now enter the 'D' switch to select a DEBUG build,
- - Some additional verbosity can be gained by additionally selecting the 'L' flag for a LOGF1 build.
- - Press Enter only when you are finished adding additional build switch flags.
- - Finish the compile by running 'make'2 as you normally would.
Note:
- - If you wish to debug a very particular section of code that does not have LOGF wrappers you will need to add these to the source yourself, a LOGF build alone is not sufficient in and of itself in order know if a given section of code has been run as only a very small percentage of the source is wrapped in LOGF statements.
- - Optionally make can be run with the '-j N' flag where N is the number of physical cores available on the host you are compiling on, multiplied by a factor of two. This is a general rule of thumb considered safe for speeding up compilation by running parallel threads. By default make will only run a single thread, even on multi-core hosts.
Suggestion:
- - If you do not already have the 'ccache (https://ccache.samba.org/)' package installed on your development host, you should consider doing so to speed up the build significantly. This package greatly reduces compile times of projects that deploy C/C++ heavily throughout their source code (like Rockbox) by way of caching compiled objects for reuse and retrieval if those objects are not modified instead of recompiling them each time needlessly. This can speed up the compile time of Rockbox by many orders of magnitude. There are no additional steps to perform to get the Rockbox build system to make use of ccache, if ccache is detected on the host system it will be used automatically.
If you have any additional queries or run afoul at any stage during this procedure, please don't hesitate to seek further assistance from myself or other developers or volunteers either here in this thread or via our Freenode IRC channel (https://webchat.freenode.net/?channels=rockbox). My username on this channel is '[Saint]' if you would prefer to deal with me personally.
[Saint]
-
Thanks, that worked great. I made a new build directory so I now have a normal and debug versions.
It turns out it had nothing to do with pulseaudio. I copied the .rockbox directory from the Raspberry PI dev environment to the PocketCHIP using scp. They both use the same ARM platform version. The debug message simply told me that I needed to also copy the codecs into a separate directory. duh
-
Listening to a LeBatard podcast
-
It would have been nice if "full screem" was a configure option, like LCD size.
A patch for this functionality against /rockbox/tools/configure (https://github.com/Rockbox/rockbox/blob/master/tools/configure) would be welcomed, providing it was sufficiently well written and thought out.
You seem to be aware of the fact but what you have there is most definitely a hack, looking at some areas of the code is it hard to reconcile with sometimes, but Rockbox has a "Do It Right" philosophy. This fullscreen option would need to be special cased so that it doesn't apply globally to all SDL CONFIG_PLATFORM targets but isn't able to be removed from PLATFORM_MAEMO and PLATFORM_PANDORA.
[Saint]
-
You seem to be aware of the fact but what you have there is most definitely a hack
I removed the hack from my post. It was years ago when I first tried the Raspberry PI. I am starting to recall what happened. I was really excited to see Rockbox on the PI, but when I clicked fullscreen in the window bar it filled the screen, but the bar took up some of the screen. I grepped fullscreem and found where some platforms did a fullscreen and did a temporary hack. Someone asked for the hack so I posted it not remembering it was a temp kludge. I now know how to start the Rockbox with command line screen parameters that can do fullscreen without decorations and new size.
About the configure: Entering LCD size was confusing to me. It has nothing to do with hardware. It is the default window size. IMHO "configure" should say "default window" instead of "LCD". Hardware is done with "platforms", like you said.
-
About the configure: Entering LCD size was confusing to me. It has nothing to do with hardware. It is the default window size. IMHO "configure" should say "default window" instead of "LCD". Hardware is done with "platforms", like you said.
While I see your point, it really isn't worth it for us to special case the wording in configure so that someone doesn't get triggered by it.
I mean, if one really wants to get pedantic about this type of thing in regards to terminology, there's a couple of targets that don't actually have LCD displays at all and instead have OLED/AMOLED displays. If you want to get really really pedantic, pretty much all of this falls over with the charcell displays.
Using 'LCD size' is somewhat of an obvious hand-me-down, because the overwhelming majority of the supported devices have a fixed display size. As you may well know, configure isn't building this list of configurable targets dynamically, and is instead taking defined devices and platforms from a list in configure that has been appended to for what is now almost the better part of two decades.
Of course you're welcome to make a submission against configure that ensures that we correctly list the display technology for any given target, and whether or not this is a hosted platform and actually refer to the Rockbox internal framebuffer...but I suspect you have more important things to do.
[Saint]
-
Actually I am feeling like I should submit something since I use Rockbox a lot. I could start with your idea, but I want try some other things, too. I am house bound after hip replacement. I tried building an SDL manual because I got stuck in menu and couldn't get out of it and needed menu descriptions. My dev system crashed loading LaTex. I am going to build a new system first. I think the SD card finally gave out so I need a hard drive system instead of the Raspberry PI.
-
My dev system now consists of banana pi M3 with a 500 gigabyte hard drive. The 8 cores does wonders for "make -j 16"
I knew how get the raspberry pi into full screen using the windows manager. I couldn't figure out how to go full screen on the PocketChip. I decided to add a command line flag to the SDLAPP. I hope this isn't a hack.
git diff firmware/target/hosted/sdl/system-sdl.c
diff --git a/firmware/target/hosted/sdl/system-sdl.c b/firmware/target/hosted/sdl/system-sdl.c
index 37580ed..dbab8fb 100644
--- a/firmware/target/hosted/sdl/system-sdl.c
+++ b/firmware/target/hosted/sdl/system-sdl.c
@@ -56,6 +56,7 @@
SDL_Surface *gui_surface;
bool background = true; /* use backgrounds by default */
+bool fullscreen = false;
#ifdef HAVE_REMOTE_LCD
bool showremote = true; /* include remote by default */
#endif
@@ -137,6 +138,9 @@ static int sdl_event_thread(void * param)
/* Fullscreen mode for maemo app */
flags |= SDL_FULLSCREEN;
#endif
+ if(fullscreen){
+ flags |= SDL_FULLSCREEN;
+ }
SDL_WM_SetCaption(UI_TITLE, NULL);
@@ -338,6 +342,11 @@ void sys_handle_argv(int argc, char *argv[])
printf("Disabling remote image.\n");
}
#endif
+ else if (!strcmp("--fullscreen", argv[x]))
+ {
+ fullscreen = true;
+ printf("Using Full Screen Mode.\n");
+ }
else if (!strcmp("--old_lcd", argv[x]))
{
having_new_lcd = false;
@@ -391,6 +400,7 @@ void sys_handle_argv(int argc, char *argv[])
printf(" --old_lcd \t [Player] simulate old playermodel (ROM version<4.51)\n");
printf(" --zoom [VAL]\t Window zoom (will disable backgrounds)\n");
printf(" --alarm \t Simulate a wake-up on alarm\n");
+ printf(" --fullscreen \t Use fullscreen mode\n");
printf(" --root [DIR]\t Set root directory\n");
printf(" --mapping \t Output coordinates and radius for mapping backgrounds\n");
exit(0);
When I do a build only a few plugins are built. How I get more plugins? I really want frotz because I have the 3 Zork z5 files.