diff options
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/audiohw.h | 2 | ||||
-rw-r--r-- | firmware/export/config.h | 14 | ||||
-rw-r--r-- | firmware/export/config/application.h | 28 | ||||
-rw-r--r-- | firmware/export/config/sim.h | 3 | ||||
-rw-r--r-- | firmware/export/debug.h | 7 | ||||
-rw-r--r-- | firmware/export/thread.h | 14 |
6 files changed, 53 insertions, 15 deletions
diff --git a/firmware/export/audiohw.h b/firmware/export/audiohw.h index d4861aac5a..658dd1301c 100644 --- a/firmware/export/audiohw.h +++ b/firmware/export/audiohw.h | |||
@@ -66,7 +66,7 @@ | |||
66 | #elif defined(HAVE_AK4537) | 66 | #elif defined(HAVE_AK4537) |
67 | #include "ak4537.h" | 67 | #include "ak4537.h" |
68 | #endif | 68 | #endif |
69 | #if defined(HAVE_SDL_AUDIO) | 69 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) |
70 | /* #include <SDL_audio.h> gives errors in other code areas, | 70 | /* #include <SDL_audio.h> gives errors in other code areas, |
71 | * we don't really need it here, so don't. but it should maybe be fixed */ | 71 | * we don't really need it here, so don't. but it should maybe be fixed */ |
72 | #ifndef SIMULATOR /* simulator gets values from the target .h files */ | 72 | #ifndef SIMULATOR /* simulator gets values from the target .h files */ |
diff --git a/firmware/export/config.h b/firmware/export/config.h index 1b8a782f39..3b59004549 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -78,8 +78,10 @@ | |||
78 | * bit fields to allow PLATFORM_HOSTED to be OR'ed e.g. with a | 78 | * bit fields to allow PLATFORM_HOSTED to be OR'ed e.g. with a |
79 | * possible future PLATFORM_ANDROID (some OSes might need totally different | 79 | * possible future PLATFORM_ANDROID (some OSes might need totally different |
80 | * handling to run on them than a stand-alone application) */ | 80 | * handling to run on them than a stand-alone application) */ |
81 | #define PLATFORM_NATIVE (1<<0) | 81 | #define PLATFORM_NATIVE (1<<0) |
82 | #define PLATFORM_HOSTED (1<<1) | 82 | #define PLATFORM_HOSTED (1<<1) |
83 | #define PLATFORM_ANDROID (1<<2) | ||
84 | #define PLATFORM_SDL (1<<3) | ||
83 | 85 | ||
84 | /* CONFIG_KEYPAD */ | 86 | /* CONFIG_KEYPAD */ |
85 | #define PLAYER_PAD 1 | 87 | #define PLAYER_PAD 1 |
@@ -427,6 +429,8 @@ Lyre prototype 1 */ | |||
427 | 429 | ||
428 | #elif defined(APPLICATION) | 430 | #elif defined(APPLICATION) |
429 | #include "config/application.h" | 431 | #include "config/application.h" |
432 | #define CONFIG_CPU 0 | ||
433 | #define CONFIG_STORAGE 0 | ||
430 | #else | 434 | #else |
431 | /* no known platform */ | 435 | /* no known platform */ |
432 | #endif | 436 | #endif |
@@ -689,11 +693,17 @@ Lyre prototype 1 */ | |||
689 | #define HAVE_EXTENDED_MESSAGING_AND_NAME | 693 | #define HAVE_EXTENDED_MESSAGING_AND_NAME |
690 | #define HAVE_WAKEUP_EXT_CB | 694 | #define HAVE_WAKEUP_EXT_CB |
691 | 695 | ||
696 | |||
697 | #if (CONFIG_PLATFORM & PLATFORM_ANDROID) | ||
698 | #define HAVE_PRIORITY_SCHEDULING | ||
699 | #endif | ||
700 | |||
692 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) | 701 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
693 | #define HAVE_PRIORITY_SCHEDULING | 702 | #define HAVE_PRIORITY_SCHEDULING |
694 | #define HAVE_SCHEDULER_BOOSTCTRL | 703 | #define HAVE_SCHEDULER_BOOSTCTRL |
695 | #endif /* PLATFORM_NATIVE */ | 704 | #endif /* PLATFORM_NATIVE */ |
696 | 705 | ||
706 | |||
697 | #define HAVE_SEMAPHORE_OBJECTS | 707 | #define HAVE_SEMAPHORE_OBJECTS |
698 | 708 | ||
699 | #if defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_ARC | 709 | #if defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_ARC |
diff --git a/firmware/export/config/application.h b/firmware/export/config/application.h index a5583ded75..988f0d51ac 100644 --- a/firmware/export/config/application.h +++ b/firmware/export/config/application.h | |||
@@ -4,11 +4,13 @@ | |||
4 | #define TARGET_TREE /* this target is using the target tree system */ | 4 | #define TARGET_TREE /* this target is using the target tree system */ |
5 | 5 | ||
6 | /* We don't run on hardware directly */ | 6 | /* We don't run on hardware directly */ |
7 | #define CONFIG_PLATFORM PLATFORM_HOSTED | 7 | #ifdef ANDROID |
8 | #define CONFIG_PLATFORM (PLATFORM_HOSTED|PLATFORM_ANDROID) | ||
9 | #else | ||
10 | #define CONFIG_PLATFORM (PLATFORM_HOSTED|PLATFORM_SDL) | ||
11 | #endif | ||
8 | /* For Rolo and boot loader */ | 12 | /* For Rolo and boot loader */ |
9 | /* | 13 | #define MODEL_NUMBER 100 |
10 | #define MODEL_NUMBER 24 | ||
11 | */ | ||
12 | 14 | ||
13 | #define MODEL_NAME "Rockbox" | 15 | #define MODEL_NAME "Rockbox" |
14 | 16 | ||
@@ -37,9 +39,17 @@ | |||
37 | /* define this if you would like tagcache to build on this target */ | 39 | /* define this if you would like tagcache to build on this target */ |
38 | #define HAVE_TAGCACHE | 40 | #define HAVE_TAGCACHE |
39 | 41 | ||
40 | /* LCD dimensions */ | 42 | /* LCD dimensions |
43 | * | ||
44 | * overriden by configure for application builds */ | ||
45 | #ifndef LCD_WIDTH | ||
41 | #define LCD_WIDTH 320 | 46 | #define LCD_WIDTH 320 |
42 | #define LCD_HEIGHT 240 | 47 | #endif |
48 | |||
49 | #ifndef LCD_HEIGHT | ||
50 | #define LCD_HEIGHT 480 | ||
51 | #endif | ||
52 | |||
43 | #define LCD_DEPTH 16 | 53 | #define LCD_DEPTH 16 |
44 | #define LCD_PIXELFORMAT 565 | 54 | #define LCD_PIXELFORMAT 565 |
45 | 55 | ||
@@ -62,10 +72,10 @@ | |||
62 | #define CONFIG_CODEC SWCODEC | 72 | #define CONFIG_CODEC SWCODEC |
63 | 73 | ||
64 | #define CONFIG_KEYPAD COWON_D2_PAD | 74 | #define CONFIG_KEYPAD COWON_D2_PAD |
75 | |||
76 | #if (CONFIG_PLATFORM & PLATFORM_SDL) | ||
65 | /* Use SDL audio/pcm in a SDL app build */ | 77 | /* Use SDL audio/pcm in a SDL app build */ |
66 | #define HAVE_SDL | 78 | #define HAVE_SDL |
67 | |||
68 | #ifdef HAVE_SDL | ||
69 | #define HAVE_SDL_AUDIO | 79 | #define HAVE_SDL_AUDIO |
70 | #endif | 80 | #endif |
71 | 81 | ||
@@ -92,3 +102,5 @@ | |||
92 | 102 | ||
93 | /* Define this if a programmable hotkey is mapped */ | 103 | /* Define this if a programmable hotkey is mapped */ |
94 | //#define HAVE_HOTKEY | 104 | //#define HAVE_HOTKEY |
105 | |||
106 | #define BOOTDIR "/.rockbox" | ||
diff --git a/firmware/export/config/sim.h b/firmware/export/config/sim.h index 5dcb4f6f2d..066201ad08 100644 --- a/firmware/export/config/sim.h +++ b/firmware/export/config/sim.h | |||
@@ -99,7 +99,8 @@ | |||
99 | #define DEFAULT_BRIGHTNESS_SETTING MAX_BRIGHTNESS_SETTING | 99 | #define DEFAULT_BRIGHTNESS_SETTING MAX_BRIGHTNESS_SETTING |
100 | #endif | 100 | #endif |
101 | 101 | ||
102 | #define CONFIG_PLATFORM (PLATFORM_HOSTED|PLATFORM_SDL) | ||
102 | #define HAVE_SDL | 103 | #define HAVE_SDL |
103 | #define HAVE_SDL_AUDIO | 104 | #define HAVE_SDL_AUDIO |
104 | #define CONFIG_PLATFORM PLATFORM_HOSTED | 105 | |
105 | #define _ISOC99_SOURCE 1 | 106 | #define _ISOC99_SOURCE 1 |
diff --git a/firmware/export/debug.h b/firmware/export/debug.h index f7f0f32426..f19a96c526 100644 --- a/firmware/export/debug.h +++ b/firmware/export/debug.h | |||
@@ -21,6 +21,7 @@ | |||
21 | #ifndef DEBUG_H | 21 | #ifndef DEBUG_H |
22 | #define DEBUG_H | 22 | #define DEBUG_H |
23 | 23 | ||
24 | #include "config.h" | ||
24 | #include "gcc_extensions.h" | 25 | #include "gcc_extensions.h" |
25 | 26 | ||
26 | extern void debug_init(void); | 27 | extern void debug_init(void); |
@@ -34,7 +35,11 @@ extern void ldebugf(const char* file, int line, const char *fmt, ...) | |||
34 | /* */ | 35 | /* */ |
35 | #if defined(SIMULATOR) && !defined(__PCTOOL__) | 36 | #if defined(SIMULATOR) && !defined(__PCTOOL__) |
36 | #define DEBUGF debugf | 37 | #define DEBUGF debugf |
37 | #define LDEBUGF(...) ldebugf(__FILE__, __LINE__, __VA_ARGS__) | 38 | #define LDEBUGF(...) ldebugf(__FILE__, __LINE__, __VA_ARGS__) && defined(DEBUG) |
39 | #elif (CONFIG_PLATFORM & PLATFORM_ANDROID) | ||
40 | #include "system-target.h" | ||
41 | #define DEBUGF LOG | ||
42 | #define LDEBUGF(...) | ||
38 | #else | 43 | #else |
39 | #if defined(DEBUG) | 44 | #if defined(DEBUG) |
40 | 45 | ||
diff --git a/firmware/export/thread.h b/firmware/export/thread.h index c4b7d1fa22..2853c0b121 100644 --- a/firmware/export/thread.h +++ b/firmware/export/thread.h | |||
@@ -79,9 +79,19 @@ | |||
79 | 79 | ||
80 | #define MAXTHREADS (BASETHREADS+TARGET_EXTRA_THREADS) | 80 | #define MAXTHREADS (BASETHREADS+TARGET_EXTRA_THREADS) |
81 | 81 | ||
82 | /* | ||
83 | * We need more stack when we run under a host | ||
84 | * maybe more expensive C lib functions? | ||
85 | * | ||
86 | * simulator doesn't simulate stack usage anyway but well ... */ | ||
87 | #if ((CONFIG_PLATFORM & PLATFORM_NATIVE) || defined(SIMULATOR)) | ||
82 | #define DEFAULT_STACK_SIZE 0x400 /* Bytes */ | 88 | #define DEFAULT_STACK_SIZE 0x400 /* Bytes */ |
89 | #else | ||
90 | #define DEFAULT_STACK_SIZE 0x1000 /* Bytes */ | ||
91 | #endif | ||
92 | |||
83 | 93 | ||
84 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) | 94 | #if (CONFIG_PLATFORM & (PLATFORM_NATIVE|PLATFORM_ANDROID)) |
85 | /* Need to keep structures inside the header file because debug_menu | 95 | /* Need to keep structures inside the header file because debug_menu |
86 | * needs them. */ | 96 | * needs them. */ |
87 | #ifdef CPU_COLDFIRE | 97 | #ifdef CPU_COLDFIRE |
@@ -101,7 +111,7 @@ struct regs | |||
101 | uint32_t pr; /* 32 - Procedure register */ | 111 | uint32_t pr; /* 32 - Procedure register */ |
102 | uint32_t start; /* 36 - Thread start address, or NULL when started */ | 112 | uint32_t start; /* 36 - Thread start address, or NULL when started */ |
103 | }; | 113 | }; |
104 | #elif defined(CPU_ARM) | 114 | #elif defined(CPU_ARM) || (CONFIG_PLATFORM & PLATFORM_ANDROID) |
105 | struct regs | 115 | struct regs |
106 | { | 116 | { |
107 | uint32_t r[8]; /* 0-28 - Registers r4-r11 */ | 117 | uint32_t r[8]; /* 0-28 - Registers r4-r11 */ |