Wince6.0 AT91SAM9261的BSP错误

1 WINCE600\PLATFORM\COMMON\SRC\SOC\ATMEL\COMMON\BOOTLOADER

GernericEBOOT\utils.c文件报error C2220: warning treated as error - no 'object' file generated错误

解决办法:将该文件另存为unicode编译格式

 

2 WINCE600\PLATFORM\AT91SAM9261EK\SRC\BOOTLOADER\FirstBoot\dbgu.h文件里的#define TIME_OUT_CHAR '?error C2001: newline in constant错误

解决办法:将#define TIME_OUT_CHAR '?改为#define TIME_OUT_CHAR '?'


3 开机花屏

原因:在LCD驱动中只申请了地址空间,没有对显存进行初始化,代码在E:\WINCE600\PLATFORM\AT91SAM9261EK\src\DRIVERS\AT91SAM9261Display\Graphic.cpp

GPE* GetGPE()函数的以下代码中

if ( RegQryValEx(hKey, L"VRAMAddress", 0, &dwType, (LPBYTE)&dwVideoMemStartAddress, &dwBLen) != ERROR_S?SS )

{

// Allocate a bfer in common SDRAM

dwVideoMemSize = dwVideoMemWidth * dwVideoMemHeight * dwBpp/8;

VA_VideoMem = HalAllocateCommonBfer(&myDmaAdapter, dwVideoMemSize, &PA_VideoMem, false);

dwVideoMemStartAddress = PA_VideoMem.LowPart;

DEBUGMSG(GPE_ZONE_HW, (TEXT("Video memory %d kB in SDRAM"), dwVideoMemSize /1024));

}

解决办法:

1)将if条件注掉,在大括号内初始化系统分配的显存

{

// Allocate a bfer in common SDRAM

dwVideoMemSize = dwVideoMemWidth * dwVideoMemHeight * dwBpp/8;

VA_VideoMem = HalAllocateCommonBfer(&myDmaAdapter, dwVideoMemSize, &PA_VideoMem, false);

dwVideoMemStartAddress = PA_VideoMem.LowPart;

DEBUGMSG(GPE_ZONE_HW, (TEXT("Video memory %d kB in SDRAM"), dwVideoMemSize /1024));

unsigned int cnt;

for(cnt=0;cnt<dwVideoMemSize;cnt++)

{

*(unsigned char*)((unsigned int)VA_VideoMem+cnt) = 0;

}

}

2)将注册表中的物理地址映射成虚拟地址,再初始化。我用的是方法1,方法2一定可以,但我没试过。

你可能感兴趣的:(c,object,video,File,WinCE,newline)