Compile-without-sercomm » History » Revision 9
« Previous |
Revision 9/12
(diff)
| Next »
Anonymous, 02/19/2016 10:49 PM
NuttX compilation was done using CodeSourcery arm-2010.09-51-arm-none-eabi.bin, other toolchain could fail.
NuttX can be configured differently depending on what we want.
The possible configs are:
* compal_e88/nsh_highram : for the gta02 using the osmocon for the romloader
* compal_e99/nsh_highram : for the c155 using osmocon + loader.compalram.bin as a loader
* compal_e99/nsh_compalram : for the c155 using osmocon to load it
nsh is the nuttx shell(nuttx can also run standalone apps without a shell).
standalone nuttxif you want a standalone nuttx(without linking to osmocombb for the drivers) do the following: {{{
make clean
make distclean
}}}
Remove sercomm directories:
{{{
$ rm -rf drivers/sercomm
$ rm -rf include/nuttx/sercomm
}}}
Remove sercomm reference at drivers/Makefile:
{{{
-include sercomm/Make.defs
}}}
Then configure nuttx:
{{{
$ cd nuttx/tools
$ ./configure.sh compal_e99/nsh_highram
}}}
Then apply manually the following pseudo-diff in nuttx/.config :
{{{
-CONFIG_SERCOMM_CONSOLE=y
+CONFIG_SERCOMM_CONSOLE=n
-CONFIG_DISABLE_ENVIRON=y
+CONFIG_DISABLE_ENVIRON=n
+CONFIG_STDIO_LINE_BUFFER=y
}}}
And then remove the following lines from nuttx/Make.defs:
{{{
OSMODIR = $(TOPDIR)/../../osmocom-bb
EXTRA_LIBS = $(OSMODIR)/src/target/firmware/comm/libcomm.a \
$(OSMODIR)/src/shared/libosmocore/build-target/src/.libs/libosmocore.a \
$(OSMODIR)/src/target/firmware/calypso/libcalypso.a \
$(OSMODIR)/src/target/firmware/comm/libcomm.a
# ^^^ Stupid hack! Why do I have to put it twice???
}}}
Compile NuttX:
{{{
$ cd nuttx
$ make
}}}
Load nuttx.bin into Motorola C155, because nuttx.bin is bigger than 64k, you should load chainload.compalram.bin together, use this command:
{{{
./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
}}}
After loading you will receive this message:
{{{
Checksum on phone side matches, let's branch to your code
Branching to 0x00820000
Received branch ack, your code is running now!
}}}
Then press Ctrl+C and use a serial console, use picocom or minicom:
{{{
picocom -b 115200 /dev/ttyUSB0
}}}}
For minicom execute:
{{{
$ minicom -s
}}}
{{{
---[configuration]------
| Filenames and paths |
| File transfer protocols |
| Serial port setup | <<-- Choose this option
| Modem and dialing |
| Screen and keyboard |
| Save setup as dfl |
| Save setup as.. |
| Exit |
| Exit from Minicom |
------------------------
}}}
Then:
{{{
---------------------------------------------------------------------
| A - Serial Device : /dev/ttyUSB0 |
| B - Lockfile Location : /var/lock |
| C - Callin Program : |
| D - Callout Program : |
| E - Bps/Par/Bits : 115200 8N1 |
| F - Hardware Flow Control : No |
| G - Software Flow Control : No |
| |
| Change which setting? |
---------------------------------------------------------------------
}}}
Updated by about 8 years ago · 9 revisions