Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Making Symbian Development Easier

Introducing fshell: A Console


Environment for the Symbian Platform

Tom Sutcliffe
Accenture Embedded Software Services

1
Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are trademarks of Accenture.
What is fshell?

• An interactive command-line shell for Symbian


OS

• Supporting remote connections to the device

• Plus a suite of command-line tools

© 2010 Accenture All Rights Reserved.


3
Why should I care?
(As a developer, that is!)

• Command lines are quicker to debug on, and


work with, than GUIs

• Doing it remotely from your PC is quicker still

• All the included tools are really useful

© 2010 Accenture All Rights Reserved.


4
Dependencies, Dependencies,
Dependencies!

• The more you have...


...the more difficult things become

• Fshell has very few fixed dependencies


• Meaning it can work on almost any setup
• Production handset, prototype, textshell dev board...

© 2010 Accenture All Rights Reserved.


5
Examples
• Restart a process
c:\>kill --match myapp*
c:\>myapp.exe&

• Check your app‟s vital statistics


c:\>kerninfo thread --match myapp* --verbose

• Upload files, move files around, install SIS files


c:\>ymodem send mylog.txt
c:\>cp mylogs* e:\logs
c:\>swi install myapp.sis

• And a hundred other commands...

© 2010 Accenture All Rights Reserved.


6
Demo

7
Examples (2) - ECOM
# Test if ECOM can load it
c:\>ecom create 0x12345678
Error: Couldn't instantiate plugin 0x12345678 : KErrNotFound (-1)

# Try loading the DLL manually, see if it's a


# linkage problem or an ECOM-specific problem
c:\>load myplugin.dll
Error: Unable to load "myplugin.dll" : KErrNotFound (-1)

# See if chkdeps reports any DLL dependencies missing


c:\>chkdeps c:\sys\bin\myplugin.dll
Number of dependencies checked = 10
2: mymissingdependency.dll Uid3: [12340000] --- File was not found

© 2010 Accenture All Rights Reserved.


8
Tips & Tricks (1) - ymodem
• The „ymodem‟ command can be used to upload
new code live onto the device
(PlatSec permitting! Also some other caveats)

c:\>ymodem receive --overwrite c:\sys\bin\


Please start the file transfer in your terminal...
Successfully received "c:\sys\bin\myapp.exe".
c:\>
c:\>kill --match myapp*
Killed myapp.exe[e0286b46]0001 (id=388) with 0
c:\>myapp.exe &

© 2010 Accenture All Rights Reserved.


9
Tips & Tricks (2) - Scripting
• Fshell supports scripting, to automate repetitive
tasks
• Syntax is fairly similar to DOS or sh
• Decent error handling, environment variables,
conditional execution...
• The fshell smoke tests themselves are written
as fshell scripts
• As is Autometric

© 2010 Accenture All Rights Reserved.


10
Writing fshell-based tools
• Very quick to develop new command-line apps
• For anything from a quick hack or test app, to additions to the
fshell tool suite itself

• Example: the “showdebug” command


• Writing code for initial version: 23 minutes
• Adding to build system, compilation errors etc: 8 mins
• Deploying to device & running for first time: 1 minute

© 2010 Accenture All Rights Reserved.


11
For more information

http://developer.symbian.org/wiki/index.php/Fshell

Forums Kernel and Hardware Adaptation

© 2010 Accenture All Rights Reserved.


12
13

You might also like