Windows CE Binary Image Data Format

來源:互聯網
上載者:User
Platform Builder for Microsoft Windows CE 5.0 Windows CE Binary Image Data Format

Send Feedback

The binary image (.bin) file format organizes data by sections. Each section contains a section header that specifies the starting address, length, and checksum for that section.

Romimage.exe writes data organized by logical sections, such as an application's text or .data region, to the .bin file. The run-time image terminates with a run-time image record header with the physical address and checksum set to zero.

A configuration file formatted as a .bin file is small and fast. A .bin file is about half the size of an .sre file. This smaller size allows a .bin file to download faster than an .sre file.

The following table shows the .bin file format.

Field Length (bytes) Description
Sync bytes (optional) 7 Byte 0 is B, indicating a .bin file format.

Bytes 1-6 are reserved and set to 0, 0, 0, F, F, /n.

Run-time image header, consisting of the following:    

Run-time image address

4 Physical starting address of the run-time image.

Run-time image length

4 Physical length, in bytes, of the run-time image.
One or more records, consisting of the following:    

Record Address

4 Physical starting address of data record.

If this value is zero, the Record Address is the end of the file, and record length contains the starting address of the run-time image.

Record length

4 Length of record data, in bytes.

Record checksum

4 Signed 32-bit sum of record data bytes.

Record data

Record length Record data.

The following code example shows a .bin file format definition.

Copy Code
IMAGE HEADER 15 Bytes:4230303046460A - 7 byte sync record000000A0 - 4 byte starting physical address of image00004000 - 4 byte physical length of imageIMAGE RECORD HEADER 12 Bytes:4 byte physical address of record4 byte length of record4 byte checksum of recordImage Record Data - Length specified in length of record
——————————————————————————————————————————————————————
 

我對這個bin檔案格式有疑問:Run-time image address是指什麼的物理地址?真的不明白什麼麼樣的格式才能在記憶體中運行。

在PB協助中有

At   the   end   of   the   boot   loader   development   process   described   in   the   topic   How   to   Develop   a   Boot   Loader,   you   will   have   two   different   binary   images   for   the   boot   loader:   a   .bin   file   and   an   .nb0   file.   The   Microsoft   Windows®   CE   binary   image   data   format   (.bin)   file   is   the   most   common   format   for   Windows   CE   binary   images.   It   is   a   binary   file   that   consists   of   a   number   of   individual   records   with   associated   per-record   bookkeeping   data.   The   format   is   convenient   for   minimizing   the   amount   of   data   to   be   downloaded   to   the   target   device   by   removing   the   need   to   pad   between   records.   For   more   information   about   the   .bin   file   format,   see   Windows   CE   Binary   Image   Data   Format   (.bin).  
   
  The   .nb0   file   format   is   a   raw   binary   image   of   the   boot   loader.   The   image   is   as   it   appears   in   the   memory   on   the   target   device   and   does   not   contain   the   header   information   that   the   .bin   file   includes.   The   .nb0   file   is   typically   larger   than   the   .bin   file.   The   .nb0   file   is   useful   for   placing   the   initial   boot   loader   image   on   the   target   device.   This   is   usually   done   with   a   built-in   monitor   program   provided   by   the   board   manufacturer.   You   can   also   place   the   initial   boot   loader   image   on   the   target   device   through   a   JTAG   connection   using   a   JTAG   probe.   Once   the   .nb0   image   is   stored   on   the   device,   it   should   be   able   to   download   and   update   itself   using   the   .bin   file   format   from   then   on.  

我使用的是ADS開發的bootloader,這個bin檔案不存在什麼段的問題吧,應該和微軟不一樣的,全域變數的問題在哪裡呢?但是現在造成偶爾不能啟動是什麼原因呢?最後發現又回到了原點。看來ADS下的bin檔案格式也要搞清楚才行哦。

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.