Project

General

Profile

Compile-without-sercomm » History » Version 12

gnutoo, 02/19/2016 10:49 PM
we don't use sercomm anymore for serial by default....

1 12 gnutoo
NuttX compilation was done using [[CodeSourcery]] arm-2010.09-51-arm-none-eabi.bin, other toolchain could fail.
2 8 gnutoo
3
NuttX can be configured differently depending on what we want.
4 1 gnutoo
The possible configs are:
5 12 gnutoo
* compal_e88/nsh_highram : for the gta02 using the osmocon for the romloader
6
* compal_e99/nsh_highram : for the c155 using osmocon + loader.compalram.bin as a loader
7
* compal_e99/nsh_compalram : for the c155 using osmocon to load it
8 1 gnutoo
9
nsh is the nuttx shell(nuttx can also run standalone apps without a shell).
10
11 12 gnutoo
12
h2. standalone nuttx
13
14 1 gnutoo
if you want a standalone nuttx(without linking to osmocombb for the drivers) do the following:
15 8 gnutoo
configure nuttx:
16 12 gnutoo
<pre>
17 1 gnutoo
$ cd nuttx/tools
18
$ ./configure.sh compal_e99/nsh_highram
19 12 gnutoo
</pre>
20 8 gnutoo
21 1 gnutoo
Compile NuttX:
22 12 gnutoo
<pre>
23 8 gnutoo
$ cd nuttx
24 1 gnutoo
$ make
25 12 gnutoo
</pre>
26 8 gnutoo
27
Load nuttx.bin into Motorola C155, because nuttx.bin is bigger than 64k, you should load chainload.compalram.bin together, use this command:
28 12 gnutoo
<pre>
29 1 gnutoo
./osmocom-bb/src/host/osmocon/osmocon -p /dev/ttyUSB0 -m c155 /osmocom-bb/src/target/firmware/board/compal_e99/chainload.compalram.bin -c nuttx.bin
30 12 gnutoo
</pre>
31 1 gnutoo
32
After loading you will receive this message:
33 12 gnutoo
<pre>
34 9 gnutoo
Checksum on phone side matches, let's branch to your code
35
Branching to 0x00820000
36
Received branch ack, your code is running now!
37 12 gnutoo
</pre>
38 9 gnutoo
39 10 gnutoo
Then press Ctrl+C and use a serial terminal of your preference, i.e:
40
41
Picocom:
42 12 gnutoo
<pre>
43 1 gnutoo
picocom -b 115200 /dev/ttyUSB0
44 12 gnutoo
</pre>
45 1 gnutoo
46 10 gnutoo
Minicom:
47 12 gnutoo
<pre>
48 1 gnutoo
$ minicom -s
49 12 gnutoo
</pre>
50 9 gnutoo
51 12 gnutoo
<pre>
52 9 gnutoo
                                                                             
53
            +-----[configuration]------+                                     
54
            | Filenames and paths      |                                     
55
            | File transfer protocols  |                                     
56
            | Serial port setup        | <<-- Choose this option                                     
57
            | Modem and dialing        |                                     
58
            | Screen and keyboard      |
59 1 gnutoo
            | Save setup as dfl        |
60 9 gnutoo
            | Save setup as..          |
61
            | Exit                     |
62
            | Exit from Minicom        |
63
            +--------------------------+
64 12 gnutoo
</pre>
65 9 gnutoo
66
Then:
67
68 12 gnutoo
<pre>
69 9 gnutoo
    +-----------------------------------------------------------------------+
70
    | A -    Serial Device      : /dev/ttyUSB0                              |
71
    | B - Lockfile Location     : /var/lock                                 |
72
    | C -   Callin Program      :                                           |
73
    | D -  Callout Program      :                                           |
74
    | E -    Bps/Par/Bits       : 115200 8N1                                |
75
    | F - Hardware Flow Control : No                                        |
76
    | G - Software Flow Control : No                                        |
77
    |                                                                       |
78
    |    Change which setting?                                              |
79
    +-----------------------------------------------------------------------+
80 12 gnutoo
</pre>
Add picture from clipboard (Maximum size: 48.8 MB)