编译WinCE时,经常会出现这样的问题,选择Release的版本,编译没有问题,编译Debug的时候报错:Ram start overlaps rom binary。
原因:因为编译Debug版本时文件太大,超过29M时就会报错,原因是ROM和RAM空间的冲突。
国外网站找到的解决方法:
When I build my Windows CE image in Platform Builder I get the following error:
Error: Ram start overlaps rom binary
Rom end : 0x81217d4c
Ram start: 0x8105c000
NK
physfirst 800e0000
physlast 81217d4c
How can I fix this?
Problem:
This error is given because you're image size is bigger than the allowed size contained in the XXXXX_XX_config_bib.h file. The specific file for your card engine can be found at the following path:
WINCE500PLATFORMLoCEsrcinccard_engine
Resolution:
There are two options to resolving this:
1) Decrease your image size by removing components that are taking up a lot of space. If you have unecessary features you can take them out and Re-Sysgen your platform.
2) If you require a larger image than the default size of 15MB you can edit the config_bib.h file. Please refer to the RAM build memory map for an explanation on how memory is broken down while Windows CE is running.
Specifically these lines are what you will need to edit.
#define RAM_BUILD_RAM_START 0x81000000
#define RAM_BUILD_RAM_SIZE 0x00C00000
#define RAM_BUILD_IMAGE_START 0x800E0000
#define RAM_BUILD_IMAGE_SIZE 0x00F00000
For example, the edited configuration below will allow for a 16MB image to be built.
#define RAM_BUILD_RAM_START 0x82000000
#define RAM_BUILD_RAM_SIZE 0x00B00000
#define RAM_BUILD_IMAGE_START 0x800E0000
#define RAM_BUILD_IMAGE_SIZE 0x01000000
我的解决方法:
使用环境WinCE4.2,打开开发环境,打开config.bib文件,改一下下面这句话:
;;; Tarzan Debug mode
NK 8C200000 02600000 RAMIMAGE
; NK 80040000 01E00000 RAMIMAGE
; CHAIN 81E40000 00001000 RESERVED
; DRIVERS 81E41000 001BF000 RAMIMAGE
; RESERVE 8df00000 00080000
; RAM 8c200000 01D00000 RAM
RAM 8F800000 01700000 RAM//就是这一句,原来是8E800000,现在改为8F800000
重新编译之后问题解决。
引自: http://blog.csdn.net/hyalbert8084/archive/2007/09/19/1790791.aspx