Project

General

Profile

Actions

To compile nuttx-bb with sercomm, do the following steps:

  • Clone osmocom-bb and nuttx-bb, they must reside in the same directory and you shouldn't change the name of the osmocom-bb directory.
    git clone https://gitea.osmocom.org/phone-side/osmocom-bb
    git clone https://gitea.osmocom.org/phone-side/nuttx-bb
    
  • Put the gnuarm(for 64bit) or the codesourcery(for 32bit)
    in your path(there is a problem with gnuarm for 32bit).
  • Compile osmocom-bb as usual
    cd osmocom-bb/src
    make
    cd ../../
    
  • Configure nuttx-bb:
    cd nuttx-bb/nuttx/tools/
    ./configure.sh compal_e88/nsh_highram #for compal_e88( gta02 and Motorola W220).
    ./configure.sh compal_e99/nsh_highram #for compal_e99( motorolla c155 )
    
  • Modify your configuration(nuttx/.config):
    -CONFIG_SERCOMM_CONSOLE=n
    +CONFIG_SERCOMM_CONSOLE=y
    -CONFIG_STDIO_LINE_BUFFER=y
    
  • compile nuttx-bb:
    cd ../
    make
    
  • nuttx.bin is ready for beeing loaded like any other firmware (Loading nuttx-bb is not different from loading osmocom-bb, refer to osmocon)

Running

Once you loaded nuttx-bb you should see the following appearing on sercomm:

[...]
Preparing block 61, block checksum is 0xda 
handle_write_block(): 1024 bytes (1024/1024)
handle_write_block(): Block 61 finished
Received block ack from phone
Preparing block 62, block checksum is 0xd8 
handle_write_block(): 1024 bytes (1024/1024)
handle_write_block(): Block 62 finished
Received block ack from phone
Preparing the last block, filling 386 bytes, block checksum is 0xaf 
handle_write_block(): 1024 bytes (1024/1024)
handle_write_block(): Block 63 finished
Finished, sent 63 blocks in total
Received block ack from phone
Sending checksum: 0x0e 
Checksum on phone side matches, let's branch to your code
Branching to 0x00820000
Received branch ack, your code is running now!

[[NuttShell]] (NSH)


To interact with it run the loadwriter.py script that can be found in nuttx/drivers/sercomm/loadwriter.py in the nuttx sources.
sudo ./loadwriter.py 
>help

will produce the following output on sercomm:
nsh> help
Builtin Apps: 
and type 'help' for more NSH commands.

NSH command forms:
  [nice [-d <niceness>>]] <cmd> [> <file>|>> <file>] [&]
OR
  if <cmd>
  then
    [sequence of <cmd>]
  else
    [sequence of <cmd>]
  fi
Where <cmd> is one of:
  [ <expression> ]
  cat <path> [<path> [<path> ...]]
  cp <source-path> <dest-path>
  dd if=<infile> of=<outfile> [bs=<sectsize>] [count=<sectors>] [skip=<sectors>]
  echo [<string> [<string>...]]
  exec <hex-address>
  exit
  free
  help
  kill -<signal> <pid>
  losetup [-d <dev-path>] | [[-o <offset>] [-r] <dev-path> <file-path>]
  ls [-lRs] <dir-path>
  mb <hex-address>[=<hex-value>][ <hex-byte-count>]
  mkfifo <path>
  mh <hex-address>[=<hex-value>][ <hex-byte-count>]
  mw <hex-address>[=<hex-value>][ <hex-byte-count>]
  ps
  sh <script-path>
  sleep <sec>
  test <expression>
  usleep <usec>
  xd <hex-address> <byte-count>
nsh> 

Files (0)

Updated by laforge 5 months ago · 10 revisions

Add picture from clipboard (Maximum size: 48.8 MB)