Skip to content
Archive of posts filed under the MinGW buidchain category.

Generic Makefile Build Chain for Symbian OS v. 1.1

The build chain was originally made by Harry Li. I just continued the project and added support for staticlibrary linking, debugging etc.

What’s new:

  • Support for QtCreator and Nokia QtSDK.
  • GCCE was updated into 4.x in QtSDK, and that’s now being used in new build scripts.

MOTIVATION

  • The C preprocessor can be used much better with makefile than with abld build. You can not compile a project relying heavily on c preprocessor with abld build, so the makefile build is really an essential tool for those projects.
  • It makes porting software from linux based systems easier. The GCCE is just a GCC build for Symbian  so now you can use GCC (hopefully almost same version) and same the build rules for the port in Symbian also.
  • You can create static libs from the code that is hard to port (you need some custom compiling tricks), and then link into it from mmp-files or from Qt project files.
  • The generic makefile build is also faster than the abld build. You could (hopefully) also make it faster with “-j” option with the future versions of GCCE

INSTALLATION

Here are the instructions to use this environment.

  1. Install MSYS
  2. The script should be executed from \gms directory. The script also expects to have \dist\gcce and \obj\gcce directories under the gms directory, so you should also make these folders.
  3. The OS_HRH part doesn’t seem to work in the defines.mk. I solved this my replacing the include statement in epoc32\gcce\gcce.h to
    #if defined(__PRODUCT_INCLUDE__)
     #include  //for MinGW
     //#include __PRODUCT_INCLUDE__ //quick hack
     #endif
    

    Continue reading ‘Generic Makefile Build Chain for Symbian OS v. 1.1’ »

Generic Makefile Build Chain for Symbian OS v. 1.0

The build chain was originally made by Harry Li. I just continued the project and added support for static library linking, debugging etc. The 1.0 version can also build static libs, which can easily be linked from Symbian .mmp files,or Qt’s .pro files. Now we should be able to use the old already ported symbian engines(gpsp etc) with Qt too, so the porting process from the old Avkon based UI system to the Qt’s UI should be more pleasant :)

MOTIVATION

  • The C preprocessor can be used much better with makefile than with abld build. You can not compile a project relying heavily on c preprocessor with abld build, so the makefile build is really an essential tool for those projects.
  • It makes porting software from linux based systems easier. The GCCE is just a GCC build for Symbian  so now you can use GCC (hopefully almost same version) and same the build rules for the port in Symbian also.
  • You can create static libs from the code that is hard to port (you need some custom compiling tricks), and then link into it from mmp-files or from Qt project files.
  • The generic makefile build is also faster than the abld build. You could (hopefully) also make it faster with “-j” option with the future versions of GCCE

INSTALLATION

Here are the instructions to use this environment.

  1. install SVG2SVGConvertter. The installation file can be found under EPOCROOT\S60tools\svg2svgt\installer\
  2. The script should be executed from \gms directory. The script also expects to have \dist\gcce and \obj\gcce directories under the gms directory, so you should also make these folders.
  3. The OS_HRH part doesn’t seem to work in the defines.mk. I solved this my replacing the include statement in epoc32\gcce\gcce.h to
    #if defined(__PRODUCT_INCLUDE__)
     #include  //for MinGW
     //#include __PRODUCT_INCLUDE__ //quick hack
     #endif
    

Continue reading ‘Generic Makefile Build Chain for Symbian OS v. 1.0’ »

Generic Makefile Build Chain for Symbian OS With GCCE and MinGW

The build chain was originally made by Harry Li. I just continued the project and added support for static library linking, debugging etc.

MOTIVATION

  • The generic makefile  gives you a better control of the build. You can define your own rules for each file, if you like. Therefore it’s also easier to fight against the compiler/build chain bugs.
  • The C preprocessor can be used much better with makefile, than with abld build. You can not compile a project relying heavily on c preprocessor with abld build, so the makefile build makes the porting a lot easier.
  • It makes porting software from linux based systems easier. The GCCE is just a GCC, build for Symbian  so now you can use GCC (hopefully almost same version) and same the build rules for the project in Symbian also.
  • The generic makefile build is also faster than the abld build.

INSTALLATION

Here are the instructions to use this environment.

  1. install SVG2SVGConvertter. The installation file can be found under EPOCROOT\S60tools\svg2svgt\installer\
  2. The script should be executed from \gms directory. The script also expects to have \dist\gcce and \obj\gcce directories under the gms directory, so you should also make these folders.
  3. The OS_HRH part doesn’t seem to work in the defines.mk. I solved this my replacing the include statement in epoc32\gcce\gcce.h to
    #if defined(__PRODUCT_INCLUDE__)
     #include  //for MinGW
     //#include __PRODUCT_INCLUDE__ //quick hack
     #endif

Continue reading ‘Generic Makefile Build Chain for Symbian OS With GCCE and MinGW’ »

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’ »

MinGW Symbian Build Chain

I saw harry Li’s blog post about generic symbian makefile, and I found it very interesting. The makefile seems to be a very good tool for porting software from other platforms into Symbian OS.

The MinGW in also nice build solution, since it doesn’t modifiy existing environment, so it can be used in parallel with old build setup. My version of the generic makefile is using newer GCCP and it supports assembly files and static libraries. This is a nice setup for building asm optimized sources in Symbian environment. If you also want to use newer version of GCCE you should see forum.nokia wiki page about the update process( changes in header files etc).

The MinGW makes it easy to modify the build, so we have a better control of the build process than mystical Symbian OS buildchain. It took less than 10 minutes to add the support for assembler. It’s also very fast to change between two GCCE versions with this.

I made some small modifications for my own purposes. Here are the instructions to use this environment.

  1. install SVG2SVGConvertter. The installation file can be found under EPOCROOT\S60tools\svg2svgt\installer\
  2. The script should be executed from \gms directory. The script also expects to have \dist\gcce and \obj\gcce directories under the gms directory, so you should also make these folders.
  3. The OS_HRH part doesn’t seem to work in the defines.mk. I solved this my replacing the include statement in epoc32\gcce\gcce.h to
    #if defined(__PRODUCT_INCLUDE__)
     #include  //for MinGW
     //#include __PRODUCT_INCLUDE__ //quick hack
     #endif
    

    Continue reading ‘MinGW Symbian Build Chain’ »