Setting up the S60 SDK for Development

Ever had a problem where your application was running fine on the emulator, but failed to run on hardware? Ran an application on the emulator, but the application exited, without showing any reason? Or perhaps, you expected to see the emulator logs in the debugger window, but they never appeared?

That’s because of rather aggressive approach taken by the S60 SDK installer in terms of disabling emulator diagnostics (most annoyingly, platform security violations, which go unchecked on the emulator by default) and results in unexpected behavior from applications when run on real hardware.

If you already have the S60 SDK installed, its worth checking if the diagnostics are enabled and even if you don’t want them, at least know what options affects which bits of diagnostics.

Before we begin, its worth nothing that the settings discussed below can be enabled through both the emulator GUI (Tools -> Preferences -> C++ Debug/Platform Security) and by modifying the epoc.ini file (epoc32\data\epoc.ini).

C++ Debug Settings

  • Log to Debugger – Enables logging debug output from application and emulator, i.e. RDebug::Printf/RTest to Carbide.c++ debug console window. Set LogToDebugger 1 to enable or LogToDebugger 0 to disable using epoc.ini. Personally, I leave it disabled in favor of epocwind.out logging (see below).
  • Just in Time – Enables automatically invoking the debugger if a panic/assertion is hit. Set JustInTime query to enable or JustInTime 0 to disable using epoc.ini
  • Enable epocwind.out Logging – Writes the debug logs (see Log to Debugger) to epocwind.out (%temp%epocwind.out). Invaluable, since likes of panic and platform security exceptions are logged if enabled. Set LogToFile 1 to enable and LogToFile 0 to disable using epoc.ini

Platform Security Settings

  • Panic|Leave on Insecure API calls – Enables process isolation, which prevents invoking operations on a thread in a different process that’s deemed insecure. For example, calling RThread::Kill to terminate another arbitrary process without appropriate platform security capability. Set PlatSecProcessIsolation ON to enable or PlatSecProcessIsolation OFF to disable using epoc.ini
  • Perform capability checks – Enables platform security capability checking. Set PlatSecEnforcement ON to enable and PlatSecEnforcement OFF to disable using epoc.ini. By default, this is disabled which is baffling, since platform security is one of the main features of Symbian OS 9.1 and above and its easy to fall into issues like this

Starting the Emulator Faster
The S60 emulator start-up time has always been a pain in the neck for developers. Thankfully, Nokia has addressed this with the release of S60 3.2 SDK and there’s a handy option to boot the emulator up faster. This is done by starting up a minimal set of application servers during start-up, dramatically increasing boot up. A nice side effect is the cache penalty seems to be significantly less and re-starting the emulator after the initial boot is super fast! To configure the emulator start up mode, boot up the emulator, go to Tools -> Preferences -> General Settings -> Emulator Start Up Mode -> Start minimal set of services. You can always revert back to the full set of services startup mode, if you find working with minimal boot is troublesome by choosing the Start all services option.

And Finally
Some of the settings described above is described in detail in Where’s my console output? and the epoc.ini reference documentation in Symbian Developer Library (Symbian OS Tools And Utilities » Emulator » Emulator reference » Emulator configuration file: epoc.ini).

Happy coding!

One thought on “Setting up the S60 SDK for Development

  1. Thank you for a very helpful post, especially the link to “Where’s my console output?”, a problem which had me stumped all day.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s