Osmocon » History » Version 2
laforge, 02/19/2016 10:49 PM
Add link to ram loader page
1 | 2 | laforge | [[PageOutline]] |
---|---|---|---|
2 | 1 | laforge | = compal_dnload = |
3 | |||
4 | Using compal_dnload on your (Linux) PC, you can download arbitrary object code into your Compal-made Calypso-based phone. |
||
5 | 2 | laforge | |
6 | It uses the protocol described at [wiki:CompalRamloader] to get object code downloaded and executed in your phone. |
||
7 | 1 | laforge | |
8 | == Usage == |
||
9 | |||
10 | * Connect your Compal phone to a serial port of your PC, using a [wiki:CalypsoSerialCable] (3.3V RS232 on 2.5mm headphone jack) |
||
11 | * Start the compal_dnload program like this |
||
12 | {{{ |
||
13 | $ ./compal_dnload /path/to/your/object_code [ /dev/ttyUSBn ] |
||
14 | }}} |
||
15 | * Push the power-on button of your phone (short push, not like a regular phone boot!) |
||
16 | * Observe the following output: |
||
17 | {{{ |
||
18 | got 1 bytes from modem, data looks like: 04 |
||
19 | got 1 bytes from modem, data looks like: 81 |
||
20 | got 1 bytes from modem, data looks like: 1b |
||
21 | got 1 bytes from modem, data looks like: f6 |
||
22 | got 1 bytes from modem, data looks like: 02 |
||
23 | got 1 bytes from modem, data looks like: 00 |
||
24 | got 1 bytes from modem, data looks like: 41 |
||
25 | got 1 bytes from modem, data looks like: 01 |
||
26 | got 1 bytes from modem, data looks like: 40 |
||
27 | Received PROMPT1 from phone, responding with CMD |
||
28 | got 1 bytes from modem, data looks like: 1b |
||
29 | got 1 bytes from modem, data looks like: f6 |
||
30 | got 1 bytes from modem, data looks like: 02 |
||
31 | got 1 bytes from modem, data looks like: 00 |
||
32 | got 1 bytes from modem, data looks like: 41 |
||
33 | got 1 bytes from modem, data looks like: 02 |
||
34 | got 1 bytes from modem, data looks like: 43 |
||
35 | Received PROMPT2 from phone, starting download |
||
36 | got 1 bytes from modem, data looks like: 1b |
||
37 | got 1 bytes from modem, data looks like: f6 |
||
38 | got 1 bytes from modem, data looks like: 02 |
||
39 | got 1 bytes from modem, data looks like: 00 |
||
40 | got 1 bytes from modem, data looks like: 41 |
||
41 | got 1 bytes from modem, data looks like: 03 |
||
42 | got 1 bytes from modem, data looks like: 42 |
||
43 | Received DOWNLOAD ACK from phone, your code is running now! |
||
44 | }}} |
||
45 | * Observe further output of the serial port generated by the code you have downloaded |
||
46 | {{{ |
||
47 | Hello World from C program code |
||
48 | ====================================================================== |
||
49 | Device ID code: B4FB |
||
50 | Device Version code: 0000 |
||
51 | ARM ID code: FFF3 |
||
52 | cDSP ID code: 0128 |
||
53 | Die ID code: 6397191EFA039BE7 |
||
54 | ====================================================================== |
||
55 | REG_DPLL=2002 |
||
56 | CNTL_ARM_CLK=F081 |
||
57 | CNTL_CLK=FF51 |
||
58 | CNTL_RST=FFF7 |
||
59 | CNTL_ARM_DIV=FFF9 |
||
60 | ====================================================================== |
||
61 | REG_DPLL=2193 |
||
62 | CNTL_ARM_CLK=F081 |
||
63 | CNTL_CLK=FF51 |
||
64 | CNTL_RST=FFF7 |
||
65 | CNTL_ARM_DIV=FFF9 |
||
66 | ====================================================================== |
||
67 | Releasing DSP from Reset |
||
68 | Loading initial DSP bootcode |
||
69 | Releasing DSP from Reset |
||
70 | Setting some api_ndb values |
||
71 | Setting API NDB parameters |
||
72 | DSP Download Status: 0001 |
||
73 | DSP API Version: 0DC4 6308 |
||
74 | Finishing download phase |
||
75 | DSP Download Status: 0002 |
||
76 | DSP API Version: 3606 0000 |
||
77 | }}} |
||
78 | |||
79 | == Known Problems == |
||
80 | |||
81 | Somehow we're not always getting the timing quite right. If you never get the PROMPT2 or DOWNLOAD ACK, you might |
||
82 | be affected by this bug. |
||
83 | |||
84 | The bug seems to resolve around the following line in the source. Try to comment it out and recompile: |
||
85 | {{{ |
||
86 | /* write some dummy character that is not used */ |
||
87 | write(serial_fd, &running_xor, 1); |
||
88 | }}} |
||
89 | |||
90 | Any additional help to resolve this bug is mostly welcome! |