CHDK_DE Vorschauversion  Trunk Rev. 5426
 Alle Datenstrukturen Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Makrodefinitionen
boot.c-Dateireferenz
#include "lolevel.h"
#include "platform.h"
#include "core.h"
#include "dryos31.h"
+ Include-Abhängigkeitsdiagramm für boot.c:

gehe zum Quellcode dieser Datei

Makrodefinitionen

#define offsetof(TYPE, MEMBER)   ((int) &((TYPE *)0)->MEMBER)
 
#define DEBUG_LED   ((unsigned volatile *)0xC0220130)
 
#define GREEN_LED   ((unsigned volatile *)0xC0220134)
 

Funktionen

void CreateTask_spytask ()
 
void boot ()
 
void task_CaptSeqTask_my ()
 
void task_CaptSeq ()
 
void task_InitFileModules ()
 
void task_MovieRecord ()
 
void task_ExpDrv ()
 
void task_FileWrite ()
 
void taskHook (context_t **context)
 
void __attribute__ ((naked, noinline))
 
void CreateTask_blinker ()
 

Variablen

const char *const new_sa = &_end
 
long wrs_kernel_bss_start
 
long wrs_kernel_bss_end
 

Makro-Dokumentation

#define DEBUG_LED   ((unsigned volatile *)0xC0220130)

Definiert in Zeile 40 der Datei boot.c.

#define GREEN_LED   ((unsigned volatile *)0xC0220134)

Definiert in Zeile 41 der Datei boot.c.

#define offsetof (   TYPE,
  MEMBER 
)    ((int) &((TYPE *)0)->MEMBER)

Definiert in Zeile 6 der Datei boot.c.

Dokumentation der Funktionen

void __attribute__ ( (naked, noinline)  )

!!

Definiert in Zeile 147 der Datei boot.c.

147  {
148  asm volatile (
149 " LDR R0, =0xFF810218\n" // exception handler code
150 " MOV R1, #0\n"
151 " LDR R3, =0xFF810250\n"
152 "loc_FF8101AC:\n"
153 " CMP R0, R3\n" // load exception vector
154 " LDRCC R2, [R0],#4\n"
155 " STRCC R2, [R1],#4\n"
156 " BCC loc_FF8101AC\n"
157 " LDR R0, =0xFF810250\n"
158 " MOV R1, #0x4B0\n"
159 " LDR R3, =0xFF810464\n"
160 "loc_FF8101C8:\n"
161 " CMP R0, R3\n" // copy IRQ handler to ITCM starting at 0x4b0, 532 bytes up to 0x6C4
162 " LDRCC R2, [R0],#4\n"
163 " STRCC R2, [R1],#4\n"
164 " BCC loc_FF8101C8\n"
165 " MOV R0, #0xD2\n"
166 " MSR CPSR_cxsf, R0\n" // set CPSR mode = IRQ, ints disabled
167 " MOV SP, #0x1000\n" // irq mode SP
168 " MOV R0, #0xD3\n"
169 " MSR CPSR_cxsf, R0\n" // set CPSR mode = Super, ints disabled
170 " MOV SP, #0x1000\n" // super mode SP
171 " LDR R0, =0x6C4\n"
172 " LDR R2, =0xEEEEEEEE\n"
173 " MOV R3, #0x1000\n"
174 "loc_FF8101FC:\n"
175 " CMP R0, R3\n" // clear ITCM 0x6C4-end with EEEEEEEE
176 " STRCC R2, [R0],#4\n"
177 " BCC loc_FF8101FC\n"
178 " BL sub_FF810FC4_my\n" //->
179  );
180 }
void boot ( )

Definiert in Zeile 38 der Datei boot.c.

38  { //#fs
39  long *canon_data_src = (void*)0xFFEBFB4C;
40  long *canon_data_dst = (void*)0x1900;
41  long canon_data_len = 0xD700 - 0x1900; // data_end - data_start
42  long *canon_bss_start = (void*)0xD700; // just after data
43  long canon_bss_len = 0xA47E0 - 0xD700;
44 
45  long i;
46 
47 
48  // Code taken from VxWorks CHDK. Changes CPU speed?
49  asm volatile (
50  "MRC p15, 0, R0,c1,c0\n"
51  "ORR R0, R0, #0x1000\n"
52  "ORR R0, R0, #4\n"
53  "ORR R0, R0, #1\n"
54  "MCR p15, 0, R0,c1,c0\n"
55  :::"r0");
56 
57  for(i=0;i<canon_data_len/4;i++)
58  canon_data_dst[i]=canon_data_src[i];
59 
60  for(i=0;i<canon_bss_len/4;i++)
61  canon_bss_start[i]=0;
62 
63 /* asm volatile (
64  "MRC p15, 0, R0,c1,c0\n"
65  "ORR R0, R0, #0x1000\n"
66  "BIC R0, R0, #4\n"
67  "ORR R0, R0, #1\n"
68  "MCR p15, 0, R0,c1,c0\n"
69  :::"r0");
70 */
71 
72  *(int*)0x1930=(int)taskCreateHook;
73  *(int*)0x1934=(int)taskCreateHook;
74  *(int*)0x1938=(int)taskCreateHook2;
75 
76  // jump to init-sequence that follows the data-copy-routine
77  asm volatile ("B sub_FFC001A4_my\n");
78 }; //#fe
void CreateTask_blinker ( )

Definiert in Zeile 624 der Datei boot.c.

624  {
625  _CreateTask("Blinker", 0x1, 0x200, task_blinker, 0);
626 };
void CreateTask_spytask ( )

Definiert in Zeile 34 der Datei boot.c.

34  {
35  _CreateTask("SpyTask", 0x19, 0x2000, core_spytask, 0);
36 };
void task_CaptSeq ( )
void task_CaptSeqTask_my ( )
void task_ExpDrv ( )
void task_FileWrite ( )
void task_InitFileModules ( )
void task_MovieRecord ( )
void taskHook ( context_t **  context)

Definiert in Zeile 25 der Datei boot.c.

25  {
26  task_t *tcb=(task_t*)((char*)context-offsetof(task_t, context));
27 
28 // physw is done directly to avoid wasting stack space
29 // if(!_strcmp(tcb->name, "PhySw")) tcb->entry = (void*)mykbd_task;
30  if(tcb->entry == task_CaptSeq) tcb->entry = (void*)task_CaptSeqTask_my;
31  if(tcb->entry == task_InitFileModules) tcb->entry = (void*)init_file_modules_task;
32  if(tcb->entry == task_MovieRecord) tcb->entry = (void*)movie_record_task;
33  if(tcb->entry == task_ExpDrv) tcb->entry = (void*)exp_drv_task;
34 // for development testing with/without, not be needed once development is complete
35 #ifdef CAM_HAS_FILEWRITETASK_HOOK
36  if(tcb->entry == task_FileWrite) tcb->entry = (void*)filewritetask;
37 #endif
38 }

Variablen-Dokumentation

const char* const new_sa = &_end

Definiert in Zeile 8 der Datei boot.c.

long wrs_kernel_bss_end
long wrs_kernel_bss_start