FS#12027 - Add the Zipit Z2 as an build target.

Attached to Project: Rockbox
Opened by Don Heyse (dheyse) - Thursday, 24 March 2011, 18:36 GMT
Task Type Patches
Category Configuration
Status Unconfirmed
Assigned To No-one
Operating System Another
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


Here's a patch to version r29143M-110324 that adds the Zipit Z2 as a build target. It requires one new file (also attached) firmware/target/hosted/zipit/powermgmt-zipit-z2.c to monitor the battery.

This is mostly a generic SDL app with a few tweaks for the Zipit buttons and battery monitoring. The patch also includes a few small bug fixes for SDL app builds. I had to fix the labels in the asm section of lcd-16bit.c. There were some missing parenthesis on an #ifdef in button-application.c. And the apps/SOURCES file needs an #ifdef to handle an SDL app build without touchscreen support.
This task depends upon

Comment by Don Heyse (dheyse) - Thursday, 24 March 2011, 19:11 GMT
Oops. Forgot to include firmware/export/config/zipit_z2.h

This includes a solution for the long (and getting longer) #ifdef lines for various SDL app targets. If you include PLATFORM_SDL with your PLATFORM_X in your CONFIG_PLATFORM setting then you only need CONFIG_SDL on most of the long #ifdef lines. Actually I currently want ALL of the PLATFORM_SDL code for the zipit.
Comment by Don Heyse (dheyse) - Thursday, 24 March 2011, 20:31 GMT
Here's another try with the 2 new files included in the patch.
Comment by Don Heyse (dheyse) - Friday, 25 March 2011, 14:27 GMT
Here's another try with the 2 new files included in the patch.
Comment by Don Heyse (dheyse) - Wednesday, 30 March 2011, 01:57 GMT
Since it came up on IRC, i believe I started needing the assember fix for lcd-16bit.c when I enabled optimization for gcc. I suspect the optimizer inlined the assembler code multiple times, resulting in an error when it encountered the two assembler lables (rowstart and nextrow?) in multiple places. The fix just adds changes the label names slightly so each inlined occurance is numbered, and thus different, preventing the conflict.
Comment by Bertrik Sikken (bertrik) - Saturday, 04 June 2011, 12:08 GMT
Resync against current SVN. I doesn't seem to compile though... (problems in asm statements)
Comment by Don Heyse (dheyse) - Sunday, 05 June 2011, 15:12 GMT
Hey, thanks for the update. I'm a bit behind, still trying to track down what happened to dim the the high frequency sound sometime around February.

Anyhow, the old fracmul.h code (with macros instead of the inline functions) still works. So here's a small additional patch to get the zipit code to compile. Looks like I also need to replace the HAVE_SIGALTSTACK_THREADS with HAVE_SDL_THREADS in the configure script since I couldn't get that to work with the uclibc on either zipit userland.