Hello all,
I am using the Mainstone BSP with WinCE 5.0, and when I use the debugger, it
hangs in the private code, in this file:
C:\WINCE500\PRIVATE\WINCEOS\COREOS\NK\KERNEL\schedule.c
in this line: " WaitForMultipleObjects(1,&hAlarmThreadWakeup,0,ONE_DAY);"
and here is the code section where it creates that thread:
--------------- begin code snippet -------------------
hAlarmThreadWakeup = CreateEvent(0,0,0,0);
DEBUGCHK(hAlarmThreadWakeup);
InitializeCriticalSection(&rtccs);
IntrEvents[SYSINTR_RTC_ALARM-SYSINTR_DEVICES] =
HandleToEvent(hAlarmThreadWakeup);
IntrEvents[SYSINTR_RTC_ALARM-SYSINTR_DEVICES]->pIntrProxy =
AllocMem(HEAP_PROXY);
DEBUGCHK(IntrEvents[SYSINTR_RTC_ALARM-SYSINTR_DEVICES]->pIntrProxy);
IntrEvents[SYSINTR_RTC_ALARM-SYSINTR_DEVICES]->onequeue = 1;
// Give the OEM a final chance to do a more full-featured init before any
// apps are started
OEMIoControl(IOCTL_HAL_POSTINIT, NULL, 0, NULL, 0, NULL);
InitWatchDog ();
// create the power handler event and guard thread
hEvtPwrHndlr = CreateEvent (NULL, FALSE, FALSE, NULL);
DEBUGCHK (hEvtPwrHndlr);
hTh = CreateKernelThread ((LPTHREAD_START_ROUTINE)PowerHandlerGuardThrd,
NULL, THREAD_PWR_GUARD_PRIORITY, 0);
CloseHandle (hTh);
// Auto-load shim engine from ROM if present (we wait until here so the
shim
// engine can use coredll).
LoadKernelLibrary(TEXT("shimeng.dll"));
hTh =
CreateKernelThread((LPTHREAD_START_ROUTINE)CleanDirtyPagesThread,0,THREAD_RT_PRIORITY_NORMAL,0);
CloseHandle(hTh);
CreateKernelThread((LPTHREAD_START_ROUTINE)RunApps,0,THREAD_RT_PRIORITY_NORMAL,0);
#define ONE_DAY 86400000
while (1) {
KCall((PKFN)SetThreadBasePrio, hCurThread, dwNKAlarmThrdPrio);
WaitForMultipleObjects(1,&hAlarmThreadWakeup,0,ONE_DAY);
--------------- end code snippet -------------------
and here is the debugger's output :
-------------- begin debugger output ----------------
Kernel debugger connected.
The Kernel Debugger connection has been established (Target CPU is ARM).
Target name: CE Device
Probe name: KdStub
Binary Image should be loaded at 0x80100000 / Data relocated at 0x81f46000
Loaded symbols for
'C:\WINCE500\PBWORKSPACES\1670IA\RELDIR\MAINSTONEII_ARMV4I_DEBUG\NK.EXE'
Loaded symbols for
'C:\WINCE500\PBWORKSPACES\1670IA\RELDIR\MAINSTONEII_ARMV4I_DEBUG\KD.DLL'
Loaded symbols for
'C:\WINCE500\PBWORKSPACES\1670IA\RELDIR\MAINSTONEII_ARMV4I_DEBUG\OSAXST1.DLL'
Loaded symbols for
'C:\WINCE500\PBWORKSPACES\1670IA\RELDIR\MAINSTONEII_ARMV4I_DEBUG\OSAXST0.DLL'
Loaded symbols for
'C:\WINCE500\PBWORKSPACES\1670IA\RELDIR\MAINSTONEII_ARMV4I_DEBUG\HD.DLL'
4294767315 PID:3fdf002 TID:3fdf266 0x83fdf024: first = 01ef0000, last =
02000000, SharedDllBase = 02140000
4294767340 PID:3fdf002 TID:3fdf266 0x83fdf024: >>> Loading module
coredll.dll at address 0x03F00000-0x03FF1000 (RW data at
0x01FFE000-0x01FFF7A5)
Loaded symbols for
'C:\WINCE500\PBWORKSPACES\1670IA\RELDIR\MAINSTONEII_ARMV4I_DEBUG\COREDLL.DLL'
4294767465 PID:c3fc44ee TID:c3fc44ca 0x83fc4288: >>> Loading module
coredll.dll at address 0x03F00000-0x03FF1000 (RW data at
0x01FFE000-0x01FFF7A5)
4294767466 PID:c3fc44ee TID:c3fc44ca 0x83fc4288: >>> Loading module
filesys.exe at address 0x04010000-0x0409C000
Loaded symbols for
'C:\WINCE500\PBWORKSPACES\1670IA\RELDIR\MAINSTONEII_ARMV4I_DEBUG\FILESYS.EXE'
4294767468 PID:c3fc44ee TID:c3fc44ca 0x83fc4288: CertMod.dll not found,
using old OEM Trust Model
4294767472 PID:c3fc44ee TID:c3fc44ca 0x83fc4288: FileSystem Starting -
starting with clean file system
4294767473 PID:c3fc44ee TID:c3fc44ca 0x83fc4288: FS: initializing ROM/RAM
file system
4294767474 PID:c3fc44ee TID:c3fc44ca 0x83fc4288: SC_CreateAPIHandle: pvData
== NULL
4294767474 PID:c3fc44ee TID:c3fc44ca 0x83fc4288: FS: Registering file system
ROM, index 2, flags 0x00000031
4294767474 PID:c3fc44ee TID:c3fc44ca 0x83fc4288: FS: Mount complete (ROM,
index 2, flags 0x00000031)
4294767476 PID:c3fc44ee TID:c3fc44ca 0x83fc4288: OEMIoControl: Unsupported
Code 0x101008c - device 0x0101 func 35
4294767636 PID:c3fc44ee TID:c3fc44ca 0x83fc4288: Succeeded on CheckFile
4294767636 PID:c3fc44ee TID:c3fc44ca 0x83fc4288: RestoreFile(0xa3fa9f6e)
called fDelete = TRUE
4294768491 PID:c3fc44ee TID:c3fc44ca 0x83fc4288: >>> Loading module
fsdmgr.dll at address 0x03CD0000-0x03CFE000 (RW data at 0x01FE4000-0x01FE4808)
Loaded symbols for
'C:\WINCE500\PBWORKSPACES\1670IA\RELDIR\MAINSTONEII_ARMV4I_DEBUG\FSDMGR.DLL'
4294768492 PID:c3fc44ee TID:c3fc44ca 0x83fc4288: FS: Registering file system
StoreMgr, index 3, flags 0x00000001
4294768494 PID:c3fc44ee TID:c3fc44ca 0x83fc4288: InitSharedHeap: 46000000
10000 c
4294768494 PID:c3fc44ee TID:c3fc44ca 0x83fc4288: InitSharedHeap: return
46000060
4294768501 PID:c3fc44ee TID:c3fc44ca 0x83fc4288: >>> Loading module
relfsd.dll at address 0x03E60000-0x03E6B000 (RW data at 0x01FF2000-0x01FF2ADC)
Loaded symbols for
'C:\WINCE500\PBWORKSPACES\1670IA\RELDIR\MAINSTONEII_ARMV4I_DEBUG\RELFSD.DLL'
4294768504 PID:c3fc44ee TID:c3fc44ca 0x83fc4288: RELFSD!DllMain:
DLL_PROCESS_ATTACH
4294768506 PID:c3fc44ee TID:c3fc44ca 0x83fc4288: ReleaseFSD: FSD_MountDisk
-------------- end debugger output ----------------
Of course I'm not considering changing the private code, but I was hoping
somebody call tell me what is going wrong. Appreciate it!