kernel/eka/euser/epoc/win32/uc_epoc.cpp
author Stephane Lenclud <tortoisehg@lenclud.com>
Tue, 27 Apr 2010 17:12:11 +0200
branchanywhere
changeset 94 f36eb4948686
parent 93 7c26c0978cbf
child 95 f561f9ae805b
permissions -rw-r--r--
Basic process initialisation and shutdown working. Using small fixed heap for now. Fixing missing global Symbian C++ new operators. Panics on Win32 now display error message.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     1
// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     2
// All rights reserved.
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     3
// This component and the accompanying materials are made available
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     4
// under the terms of the License "Eclipse Public License v1.0"
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     5
// which accompanies this distribution, and is available
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     7
//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     8
// Initial Contributors:
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    10
//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    11
// Contributors:
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    12
//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    13
// Description:
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    14
// e32\euser\epoc\win32\uc_epoc.cpp
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    15
// 
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    16
//
28
9642313072c3 Can't get the kernel start-up code to work using VC8 compiler. It crashes while trying to run constructStatics. Maybe I will try my luck with GCC from MinGW, that should also make the Linux port much easier.
Slion
parents: 25
diff changeset
    17
25
57330c35d3d7 Adding epoc target. Tried to define our own entry point but it fails at runtime trying to load msvcr80d.dll. Try using /NODEFAULTLIB for all targets maybe. Must somehow export ekern.dll for it to be loadable by epoc.exe.
Slion
parents: 0
diff changeset
    18
#include <e32std.h>
57330c35d3d7 Adding epoc target. Tried to define our own entry point but it fails at runtime trying to load msvcr80d.dll. Try using /NODEFAULTLIB for all targets maybe. Must somehow export ekern.dll for it to be loadable by epoc.exe.
Slion
parents: 0
diff changeset
    19
#include <e32std_private.h>
57330c35d3d7 Adding epoc target. Tried to define our own entry point but it fails at runtime trying to load msvcr80d.dll. Try using /NODEFAULTLIB for all targets maybe. Must somehow export ekern.dll for it to be loadable by epoc.exe.
Slion
parents: 0
diff changeset
    20
#include <e32wins.h>
57330c35d3d7 Adding epoc target. Tried to define our own entry point but it fails at runtime trying to load msvcr80d.dll. Try using /NODEFAULTLIB for all targets maybe. Must somehow export ekern.dll for it to be loadable by epoc.exe.
Slion
parents: 0
diff changeset
    21
94
f36eb4948686 Basic process initialisation and shutdown working. Using small fixed heap for now. Fixing missing global Symbian C++ new operators. Panics on Win32 now display error message.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 93
diff changeset
    22
//#include <e32cmn.h>
f36eb4948686 Basic process initialisation and shutdown working. Using small fixed heap for now. Fixing missing global Symbian C++ new operators. Panics on Win32 now display error message.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 93
diff changeset
    23
#include <nwdl.h>
f36eb4948686 Basic process initialisation and shutdown working. Using small fixed heap for now. Fixing missing global Symbian C++ new operators. Panics on Win32 now display error message.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 93
diff changeset
    24
50
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 48
diff changeset
    25
#if defined __SYMC__
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 48
diff changeset
    26
28
9642313072c3 Can't get the kernel start-up code to work using VC8 compiler. It crashes while trying to run constructStatics. Maybe I will try my luck with GCC from MinGW, that should also make the Linux port much easier.
Slion
parents: 25
diff changeset
    27
//SL: Empty on FCL ?
25
57330c35d3d7 Adding epoc target. Tried to define our own entry point but it fails at runtime trying to load msvcr80d.dll. Try using /NODEFAULTLIB for all targets maybe. Must somehow export ekern.dll for it to be loadable by epoc.exe.
Slion
parents: 0
diff changeset
    28
50
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 48
diff changeset
    29
28
9642313072c3 Can't get the kernel start-up code to work using VC8 compiler. It crashes while trying to run constructStatics. Maybe I will try my luck with GCC from MinGW, that should also make the Linux port much easier.
Slion
parents: 25
diff changeset
    30
GLDEF_C TInt E32Main()
25
57330c35d3d7 Adding epoc target. Tried to define our own entry point but it fails at runtime trying to load msvcr80d.dll. Try using /NODEFAULTLIB for all targets maybe. Must somehow export ekern.dll for it to be loadable by epoc.exe.
Slion
parents: 0
diff changeset
    31
	{
28
9642313072c3 Can't get the kernel start-up code to work using VC8 compiler. It crashes while trying to run constructStatics. Maybe I will try my luck with GCC from MinGW, that should also make the Linux port much easier.
Slion
parents: 25
diff changeset
    32
	//What do we do then
94
f36eb4948686 Basic process initialisation and shutdown working. Using small fixed heap for now. Fixing missing global Symbian C++ new operators. Panics on Win32 now display error message.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 93
diff changeset
    33
	
f36eb4948686 Basic process initialisation and shutdown working. Using small fixed heap for now. Fixing missing global Symbian C++ new operators. Panics on Win32 now display error message.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 93
diff changeset
    34
	__UHEAP_MARK;
25
57330c35d3d7 Adding epoc target. Tried to define our own entry point but it fails at runtime trying to load msvcr80d.dll. Try using /NODEFAULTLIB for all targets maybe. Must somehow export ekern.dll for it to be loadable by epoc.exe.
Slion
parents: 0
diff changeset
    35
93
7c26c0978cbf Adding includes to project. Slow progress on the process init sequence.
Slion
parents: 50
diff changeset
    36
	//CBase* base=new(ELeave) CBase();
7c26c0978cbf Adding includes to project. Slow progress on the process init sequence.
Slion
parents: 50
diff changeset
    37
	CBase* base=new CBase();
48
10816385149a Enabling kernel build without funky entry points. Turning genexec into empty command and using dogenexec manually to workaround constant rebuilding due to sistematic regeneration of exec enums.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 28
diff changeset
    38
	delete base;
10816385149a Enabling kernel build without funky entry points. Turning genexec into empty command and using dogenexec manually to workaround constant rebuilding due to sistematic regeneration of exec enums.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 28
diff changeset
    39
94
f36eb4948686 Basic process initialisation and shutdown working. Using small fixed heap for now. Fixing missing global Symbian C++ new operators. Panics on Win32 now display error message.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 93
diff changeset
    40
	TUint8* test=new TUint8[1024*9];
f36eb4948686 Basic process initialisation and shutdown working. Using small fixed heap for now. Fixing missing global Symbian C++ new operators. Panics on Win32 now display error message.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 93
diff changeset
    41
	delete[] test;
f36eb4948686 Basic process initialisation and shutdown working. Using small fixed heap for now. Fixing missing global Symbian C++ new operators. Panics on Win32 now display error message.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 93
diff changeset
    42
f36eb4948686 Basic process initialisation and shutdown working. Using small fixed heap for now. Fixing missing global Symbian C++ new operators. Panics on Win32 now display error message.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 93
diff changeset
    43
	__UHEAP_MARKEND;
f36eb4948686 Basic process initialisation and shutdown working. Using small fixed heap for now. Fixing missing global Symbian C++ new operators. Panics on Win32 now display error message.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 93
diff changeset
    44
28
9642313072c3 Can't get the kernel start-up code to work using VC8 compiler. It crashes while trying to run constructStatics. Maybe I will try my luck with GCC from MinGW, that should also make the Linux port much easier.
Slion
parents: 25
diff changeset
    45
	return KErrNone;
48
10816385149a Enabling kernel build without funky entry points. Turning genexec into empty command and using dogenexec manually to workaround constant rebuilding due to sistematic regeneration of exec enums.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 28
diff changeset
    46
	}
10816385149a Enabling kernel build without funky entry points. Turning genexec into empty command and using dogenexec manually to workaround constant rebuilding due to sistematic regeneration of exec enums.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 28
diff changeset
    47
50
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 48
diff changeset
    48
48
10816385149a Enabling kernel build without funky entry points. Turning genexec into empty command and using dogenexec manually to workaround constant rebuilding due to sistematic regeneration of exec enums.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 28
diff changeset
    49
TInt main()
10816385149a Enabling kernel build without funky entry points. Turning genexec into empty command and using dogenexec manually to workaround constant rebuilding due to sistematic regeneration of exec enums.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 28
diff changeset
    50
	{
94
f36eb4948686 Basic process initialisation and shutdown working. Using small fixed heap for now. Fixing missing global Symbian C++ new operators. Panics on Win32 now display error message.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 93
diff changeset
    51
	User::InitProcess();
93
7c26c0978cbf Adding includes to project. Slow progress on the process init sequence.
Slion
parents: 50
diff changeset
    52
	//BootEpoc(ETrue);
7c26c0978cbf Adding includes to project. Slow progress on the process init sequence.
Slion
parents: 50
diff changeset
    53
	E32Main();
7c26c0978cbf Adding includes to project. Slow progress on the process init sequence.
Slion
parents: 50
diff changeset
    54
94
f36eb4948686 Basic process initialisation and shutdown working. Using small fixed heap for now. Fixing missing global Symbian C++ new operators. Panics on Win32 now display error message.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 93
diff changeset
    55
	User::Exit(0);
50
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 48
diff changeset
    56
	return 0;
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 48
diff changeset
    57
	}
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 48
diff changeset
    58
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 48
diff changeset
    59
#endif
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 48
diff changeset
    60