我将config.bib中添加了 IF IMGFLASH
修改后如下:
; Memory Map
; ----------
;
; 8000.0000 -+
; | Bootloader Stack (64KB)
; 8001.0000 -+
; | Bootloader RAM (64KB)
; 8002.0000 -+
; | Bootloader Code (256KB)
; 8006.0000 -+
; | GAP (reserved for future)
; 800F.F000 -+
; | ARGS (4KB)
; 8010.0000 -+
; |
; | OS (NK) Code (DEBUG: 37MB, RELEASE: 32MB)
; |
; 8260.0000 -+ **auto-size**
; |
; | OS (NK) RAM (DEBUG: 23MB, RELEASE: 32MB)
; |
; 8400.0000 -+
;---------------------------------------------------------------------------------------
MEMORY
;--------------------------------------------------------
; NK name
;--------------------------------------------------------
IF IMGFLASH !
#define NKSTART 80100000
#define NKLEN 01B00000
#define RAMSTART 81F00000
#define RAMLEN 02100000
ELSE ;IMGFLASH
#define NKSTART 9CB00000 因为我在settings中的builder option中选上了最后一项
所以IMGFLASH = 1,所以肯定这段定义有效
#define NKLEN 01B00000
#define RAMSTART 81F00000
#define RAMLEN 02100000
ENDIF ;IMGFLASH
;--------------------------------------------------------------
; Name Start Size Type
; ------- -------- -------- ----
RSVD 80000000 000FF000 RESERVED
ARGS 800FF000 00001000 RESERVED //这两段是什么意思?看不懂
NK $(NKSTART) $(NKLEN) RAMIMAGE
RAM $(RAMSTART) $(RAMLEN) RAM
; Reserve ZBANK virtual block (No physical memory
; is required to back this virtual range).
;
ZBANK 96500000 00100000 RESERVED
;-----------------------------------------------------------------------------
CONFIG
AUTOSIZE=ON
KERNELFIXUPS=ON
; @CESYSGEN IF !NK_NKNOCOMP
COMPRESSION=ON
; @CESYSGEN ENDIF !NK_NKNOCOMP
; @CESYSGEN IF NK_NKNOCOMP
COMPRESSION=OFF
; @CESYSGEN ENDIF NK_NKNOCOMP
IF IMGPROFILER
PROFILE=ON
ELSE
PROFILE=OFF
ENDIF
IF IMGFLASH //这里定义ROMSTART = 9CB00000
ROMSTART = 9CB00000
ROMSIZE = 01B00000
ROMWIDTH = 16
ELSE
AUTOSIZE = ON
ENDIF
;---------------------------------------------------------------------
; ROMFLAGS is a bitmask of options for the kernel
; ROMFLAGS 0x0001 Disallow Paging
; ROMFLAGS 0x0002 Not all KMode
; ROMFLAGS 0x0010 Trust Module only
;---------------------------------------------------------------------
IF IMGTRUSTROMONLY
IF IMGNOTALLKMODE
ROMFLAGS=12
ELSE
ROMFLAGS=10
ENDIF
ELSE
IF IMGNOTALLKMODE
ROMFLAGS=02
ELSE
ROMFLAGS=00
ENDIF
ENDIF
没找到跟其他的BSP中config.bib有什么不一样的地方
但是编译内核sysgen报错
还没报具体的错误:
makeimg: FATAL ERROR: Command returned non-zero exit code 3 (dec).
makeimg: FATAL ERROR: Command returned non-zero exit code 3 (dec).
指到FLASH?你的FLASH能够像RAM一样跑程序?
没有内存吗?
现有的文件系统支持NOR 吗?比如 RAM文件系统,
没有做过,仅仅猜测。
具体的报错如下:
Unfilled ROM holes (address, length):一个没定义的ROM洞???
82ef9008 4088 820b9008 4088 82ef000c 4084 8246d010 4080
82efb010 4080 821af010 4080 82eba010 4080 82eb6010 4080
8249f028 4056 83040030 4048 82d8b030 4048 820c3038 4040
81f4e040 4032 82fda040 4032 82e6c040 4032 82eee058 4008
82f91058 4008 8228d058 4008 81f51060 4000 82f97060 4000
82ed1068 3992 8254b078 3976 82546078 3976 81f46080 3968
82f79080 3968 82523088 3960 82f7f088 3960 82f75088 3960
82f77088 3960 82548088 3960 82174090 3952 822cf090 3952
82e68098 3944 821a40a0 3936 822530a0 3936 82ef70a0 3936
82f7c0a0 3936 82c150a4 3932 820090a4 3932 830ad0b8 3912
822d20b8 3912 822360c0 3904 821fa0d0 3888 822e80d0 3888
830330d0 3888 82ef60d0 3888 82f720e0 3872 8303b0e0 3872
82f900e0 3872 82f380e0 3872 82f6a0ec 3860 8254f0f0 3856
8224e0f0 3856 81f4b0f8 3848 820dc0f8 3848 820b8100 3840
821da108 3832 825c0138 3784 82ddc140 3776 82534140 3776
826cc144 3772 8300e148 3768 82bb316c 3732 82f7b16c 3732
82519174 3724 82f5d180 3712 82dd1190 3696 821df198 3688
825041b0 3664 8228b1b8 3656 821b01e4 3612 82cd81f8 3592
82f5e1f8 3592 82d41210 3568 830aa244 3516 8216f270 3472
83032274 3468 822d127c 3460 82ed0294 3436 8303a29c 3428
82f5c2a0 3424 82bae2ac 3412 822aa2c8 3384 820082e8 3352
82ef82ec 3348 82ef32ec 3348 82d75308 3320 822e7318 3304
8250231c 3300 82214320 3296 820fc324 3292 82330324 3292
82f63324 3292 8262232c 3284 82fd933c 3268 8253e340 3264
82eb5358 3240 8215f36c 3220 821f9384 3196 82eb9388 3192
82c30388 3192 81f48394 3180 82eb0398 3176 822f83bc 3140
823b13bc 3140 82c913bc 3140 825453d4 3116 830653d8 3112
827e7418 3048 8222e418 3048 8254a424 3036 82829430 3024
826f1438 3016 821aa438 3016 82fdb480 2944 8227749c 2916
83041bbc 1092 82dcbc4c 948 81f4dc98 872 82eb8ce4 796
82fbfd00 768 82efafd8 40 82d36fe8 24 82722fec 20
8250eff0 16 821b4ff4 12 82d8aff4 12 821eeff4 12
82f7eff8 8 821adff8 8 82242ff8 8 822c8ff8 8
82173ff8 8 82d42ff8 8 82191ff8 8 8280dff8 8
82543ff8 8 81fd2ff8 8 82eebff8 8 8261bff8 8
82fb0ff8 8 82ff9ff8 8 82fd8ff8 8 82213ff8 8
82eedff8 8 82233ff8 8 82217ff8 8 82eceff8 8
822f3ff8 8 821c0ff8 8 8244fff8 8 83042ff8 8
82cd4ff8 8 82610ff8 8 8225dff8 8 8224dff8 8
82eddff8 8 8245eff8 8 8225aff8 8 82554ff8 8
82819ff8 8 82e1eff8 8 821ecff8 8 82dd0ff8 8
820d8ff8 8 8265fff8 8 82fa9ff8 8 82105ff8 8
82f2aff8 8 82ba5ff8 8 826eaffc 4 822cdffc 4
82f71ffc 4 822fdffc 4 82d83ffc 4 82f74ffc 4
82496ffc 4 8252fffc 4 82dc9ffc 4 820c6ffc 4
82c97ffc 4 82f8fffc 4 82310ffc 4 82f96ffc 4
826b1ffc 4 826f2ffc 4 82476ffc 4 83038ffc 4
8251dffc 4 82657ffc 4 82560ffc 4 83039ffc 4
82ee8ffc 4 825b1ffc 4 82ef5ffc 4 82182ffc 4
823b9ffc 4 82f0affc 4 82e0dffc 4 82243ffc 4
821acffc 4 82d89ffc 4 82f83ffc 4 821c8ffc 4
820c2ffc 4 825c4ffc 4 82dceffc 4 82f95ffc 4
82514ffc 4 82f8dffc 4 82f22ffc 4 8265dffc 4
8302cffc 4 8300cffc 4 820c1ffc 4 82e63ffc 4
82177ffc 4 82404ffc 4 82d3affc 4 82e67ffc 4
82235ffc 4 821a0ffc 4 82d90ffc 4 82224ffc 4
total space 429876 in 224 ranges
Writing C:\WINCE500\PBWorkspaces\SMDK270Test\RelDir\SMDKPXA270_ARMV4I_Release\NK.bin向NK.bin写的时候出错
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
makeimg: FATAL ERROR: Command returned non-zero exit code 3 (dec).
makeimg: FATAL ERROR: Command returned non-zero exit code 3 (dec).两个错误
驱动器C中的卷没有标签
卷的序列号是AC2D-DB30
C:\WINCE500\PBWorkspaces\SMDK270Test\RelDir\SMDKPXA270_ARMV4I_Release 的目录
2009-06-05 17:05 24,743,059 NK.bin
2009-06-05 17:05 24,743,059 NK.bin
1 个文件 24,743,059 字节
0 个目录 4,929,306,624 可用字节
BLDDEMO: SMDK270Test build complete.
SMDK270Test - 2 error(s), 66 warning(s)
如果把所有9CB00000改成80100000就不会报错,但是我是想把FLASH的虚拟地址写到配置文件中
而且很多BSP都是这么写的啊!!
FLASH的虚拟起始地址是9CA0_0000 , +100000是根据80100000来的(8000_0000是SDRAM的虚拟起始地址 + 100000是EBOOT和其他文件的大小)
如下:
; Memory Map
; ----------
;
; 8000.0000 -+
; | Bootloader Stack (64KB)
; 8001.0000 -+
; | Bootloader RAM (64KB)
; 8002.0000 -+
; | Bootloader Code (256KB)
; 8006.0000 -+
; | GAP (reserved for future)
; 800F.F000 -+
; | ARGS (4KB)
; 8010.0000 -+
; |
; | OS (NK) Code (48MB)
; |
; 8310.0000 -+ **auto-size**
; |
; | OS (NK) RAM (15MB)
; |
; 8400.0000 -+
;
IF IMGFLASH !
#define NK_START 80100000
#define NK_SIZE 01A00000
#define NKRAM_START 83100000
#define NKRAM_SIZE 00F00000 ;
ELSE ;IMGFLASH
#define NK_START 9CA80000
#define NK_SIZE 01A00000 ;
#define NKRAM_START 83100000
#define NKRAM_SIZE 00F00000 ;
ENDIF ;IMGFLASH
MEMORY
; Name Start Size Type
; ------- -------- -------- ----
RSVD 80000000 000FF000 RESERVED
ARGS 800FF000 00001000 RESERVED
IF IMGFLASH !
NK 80100000 1A00000 RAMIMAGE
RAM 83100000 F00000 RAM
ELSE
NK 9CA80000 1A00000 RAMIMAGE
RAM 83100000 F00000 RAM
ENDIF
; Reserve ZBANK virtual block (No physical memory
; is required to back this virtual range).
;
ZBANK 96500000 00100000 RESERVED
CONFIG
IF IMGFLASH
ROMSTART = 9CA80000
ROMSIZE = 01A00000
ROMWIDTH = 32
ELSE
AUTOSIZE = ON
ENDIF
KERNELFIXUPS=ON
; @CESYSGEN IF !NK_NKNOCOMP
COMPRESSION=ON
; @CESYSGEN ENDIF !NK_NKNOCOMP
; @CESYSGEN IF NK_NKNOCOMP
COMPRESSION=OFF
; @CESYSGEN ENDIF NK_NKNOCOMP
IF IMGPROFILER
PROFILE=ON
ELSE
PROFILE=OFF
ENDIF
;
; ROMFLAGS is a bitmask of options for the kernel
; ROMFLAGS 0x0001 Disallow Paging
; ROMFLAGS 0x0002 Not all KMode
; ROMFLAGS 0x0010 Trust Module only
;
IF IMGTRUSTROMONLY
IF IMGNOTALLKMODE
ROMFLAGS=12
ELSE
ROMFLAGS=10
ENDIF
ELSE
IF IMGNOTALLKMODE
ROMFLAGS=02
ELSE
ROMFLAGS=00
ENDIF
ENDIF