Old blogs

Further deciphering of debugging with TRK for advanced users

On-device debugging - May 2nd, 2008 - Written by Vasili Prikhodko

We always try to improve and/or simplify debugging experience for our users and there was quite a few entries about this subject already. But the topic of ROM vs RAM debugging wasn’t covered yet.
You will get the most benefits when debugging with TRK by downloading your program in RAM or installing .sis file onto the phone. This is because the typical development cycle - modify code, build project, download binaries to the phone via TRK - is very short. Some power users however prefer to debug their binaries from ROM. Usually this is only available to OEM developers and contractors - people who can flash their phone with the OS image. In this case the development cycle is longer, since after modifying and building their program users need to build the phone image as well as flash it on the phone, not to mention make sure that the symbolics files on the PC is matching the binary that they are going to flash on the phone.


When you create a TRK configuration panel by default your System TRK launch configuration will be configured to debug from RAM. If your project binaries are already in ROM, there are couple things that you can do, since it is likely that you will have problems downloading/launching the same program from RAM when it exists in ROM. One of the problems is when your program has dlls and you try to load them when launching the executable on target, for some dlls it is not certain whether they will be loaded from ROM or from RAM. There are other issues as well. So you either have to remove the program from ROM and then default settings in your System TRK launch configuration will work or configure the launch configuration for debugging from ROM. Here are the steps you need to take successfully debug from ROM.

1. Change your “Remote process to launch” in the “Main” tab of launch configuration from RAM to ROM:
Exe_from_Z.png

2. “Deselect All” binaries in “File Transfer” tab of your launch configuration:
downloadExes.png

3. In some cases specify “Symbian Rom log file” and “Epoc32 directory” in “ROM log” tab
ROM Log.png

This needed to debug dlls that are loaded by the processes other that the one, specified in “Main tab”

We should improve this whole experience in the next release. One way to improve it is to ask a user when he creates the launch configuration if he wants to debug from ROM or from RAM and configure launch configuration accordingly. I.e. if user specifies debugging from ROM, execute items 1 and 2 described above and prompt users for the items in item 3. Also, I believe that we can get rid of “ROM log” tab altogether for debugging with TRK and get the addresses for dlls in ROM from the OS.

About the author Vasili Prikhodko

  • Number of posts: 15

Comments are closed.