Skip to content
Archive of entries posted on July 2009

MinGW Symbian OS Build Chain: Debugging

I have been developing the MinGW build chain to make the embedded open source porting easier since last spring. Now after my holidays I had some time to develop it even further. I added debugging with Carbide and TRK to the build system.

At first we have are going to need to symbol files for debuggin. This is actually quite easy. Just add “-g” for the compiler, and it will compile a debug version. Then the linker will produce the .exe file with the symbols. A funny thing is that the Symbian OS Post-linker elf2e32 will rip off all debug symbols, so we have to make a copy from that executable before that. The symbol file is actually the pure .exe before the evil Symbian OS post-linker put it hands on it.

The next step is to copy .sym .exe and .map files under EPOC32\release\GCCE\UDEB folder so the Carbide can use them for debugging.

Here is the updated Makefile for debug support: Makefile

You have to be able to take the source files into your workspace in carbide, so you have to make a standard Symbian OS project from them. It does not have to compile, we just need to get the files into the workspace. Just make a standard bld.inf file and mmp-file where you list all the source files for the project.

We are not going to build the project so we have to undo the building. Go to Window > Preferences > Run/Debug > Launching
and then untick “Build (if required) before launching”.

Continue reading ‘MinGW Symbian OS Build Chain: Debugging’ »

Symbian Debuggin: memory & register fump from exception

I made my own Exception handler to make the memory dump into a file. The memory dumps can be used for debugging purposes.

See what to do with the memory dump from NewLC article aobut tracking down the Hardware exceptions.

_LIT(KTestFile, "C:\\Data\\myExcepption.txt");

_LIT( KStackInfo, "StackInfo: ");

void ExceptionHandler(TExcType)
RFs fs;
RFile file;


RDebug::Print(_L("Exception handler"));

HBufC8* buf = HBufC8::NewLC(1000);
TPtr8 ptr = buf->Des();


//save register info into a file
RDebug::Printf( "%S", buf );



Continue reading ‘Symbian Debuggin: memory & register fump from exception’ »

Fixing self-signed certificate related problems

Currently there isn’t any freeware signing process in the Symbian signed, and I really don’t want to pay for the signing process, so that leaves only self-signing for me. The AntSnes is signed with self-signed certificate, so the user must grant the capabilities for the application (it requires none). This should all work very well with the standard installation process. The installer will ask if user allows the application to be installed etc.

However sometimes there might be issues with the certificate. Then the installer will give you errors like “can not install”, or “certificate error” etc. One possibility is that your phone’s clock is set on wrong time. If the current time is less than the time was when the certificate was created, then the installer can not install the application, since the certificate does not make any sense.

Fixing the time

Go to settings ->General Settings ->Date And Time settings and then set the current time right. See the images below. The menu structure is from N96, so it might be a little different in you phone.

Online certificate check

Another common problem seems to be that you have “Online certificate check” in use. The online cerificate check will only accept symbian signed certificates, which I don want to pay for. To install AntSnes or any other apps with self-signed certificate (usually freeware) you must turn it off. Go to Settings -> Applications -> App Manager -> Online certificate check -> Off.  See the images below.