分享
 
 
 

将文件放入设备中的方法

王朝other·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

将文件让入Nk.bin

在project.bin文件中,在关键词“FILE”下面,按Name, Path, Memory Type格式添加。

其中:

Name: 所添加的文件在Target文件系统中的文件名,在\windows目录下。

Path: 所要添加的文件在host中的文件名(含路径)

Memory Type: 存储类型,一般写NK。

例如添加如下:

test.exe d:\evcpro\mytest\rel\mytest.exe nk

则将host上的mytest.exe加入nk.bin, 在Target上会在\windows目录下有个文件test.exe.

将文件放入指定的目录

A file system (.dat) file defines the directory and file locations for the initial settings on a target device. When you cold boot your platform on the target device, Filesys.exe uses these .dat files to create the directories, links, and files in the RAM file system on the target device.

When updating the Project.dat file to define directory and file locations, you can specify any root directory name other than the Windows directory and its subdirectories. In addition, you can copy or link to a file in the ROM Windows directory.

The file or link is created in the RAM file system that is part of the object store in the directory specified by the .dat file.

The following code example shows typical entries in a Project.dat file.

root:-Directory("My Documents")

root:-Directory("Program Files")

Directory("\Program Files"):-Directory("My Projects")

Directory("\Program Files"):-Directory("Accessories")

Directory("\Program Files"):-Directory("Communication")

Directory("\Program Files\My Projects"):-File("My Project Program", "\Windows\Myproj.exe")

root:-File("\control.lnk", "\Windows\control.lnk")

The root: statement defines the root directories for the OS image. The root: statement is used to create any subdirectories that must be the first entry in the file.

Two directories, My Documents and Program Files, are located below the root directory. In addition, three subdirectories — My Projects, Accessories, and Communication — are located in the Program Files directory.

The -File parameter copies the file Myproj.exe from ROM, as defined by the Windows directory, into the My Projects directory with the My Project Program file name.

When updating the .dat files, you can use IF and ENDIF conditional blocks and, optionally, the NOT (!) operator. Use the semicolon (;) to start a line of comments.

The following code example shows how the subdirectory locations for the Program Files directory could be rewritten.

IF IMGINCLUDEAPPS

Directory("\Program Files"):-Directory("My Projects")

ENDIF

IF IMGNOACC !

Directory("\Program Files"):-Directory("Accessories")

ENDIF

Directory("\Program Files"):-Directory("Communication")

In this example, Makeimg.exe includes the My Projects directory if the user-defined environment variable IMGINCLUDEAPPS has been set before running Makeimg.exe.

If the environment variable IMGNOACC was not set, the Accessories directory is included.

Regardless of environment variable settings, the Communication directory is included in the OS image.

Items placed in the ROM image appear in the Windows directory automatically.

At boot time, the OS parses the information that was in the .dat file and creates a more robust file system by creating other directories and copying files to their appropriate locations. This process uses RAM to store the files that were copied. Items listed in the .dat file are then copied, not moved.

Shortcut(.lnk) files make up the majority of the items in the .dat file, because .lnk files are very small and are not symbolic links.

The only way to make a file appear outside the Windows directory is through the .dat file.

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有