我怎么可以填写两个字节值起始于偶地址边界的S-记录? [英] How can I fill an S-record with two byte values starting on even address boundaries?

查看:192
本文介绍了我怎么可以填写两个字节值起始于偶地址边界的S-记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我编译我的code我最终得到的Motorola S记录 a.mot )与间隙(整个地址范围是不包括code和数据)。

When I compile my code I eventually get Motorola S records (a.mot) with gaps (the whole address range is not covered by code and data).

我要填写与模式 0×01 0x80的这些差距。然而,所有的两个字节对必须在偶数地址开始是很重要的。 0x0180处是我的微运算code,我想,如果PC到达未使用的Flash区域的地址将被执行。

I want to fill those gaps with the pattern 0x01 0x80. However, it is important that all of the two-byte pairs must start at even addresses. 0x0180 is an opcode from my micro that I want to be executed if the PC reaches an address of unused flash area.

在开始回答之前,我想告诉你,在 -repeat数据 srec_cat 有一些问题:

Before you start answering I'd like to tell you that -repeat-data in srec_cat has an issue:


  • 鉴于两节如 C D 把一个接一个( D 之后的 C )的地址空间。

  • 鉴于部分的最后一个字节的 C 上的地址结尾 0x76 和部分的第一个字节的 D 在地址 0x78 。换句话说有地址1字节长的缝隙 0x77 之间。

  • Given two sections e.g. C and D put one after another (D after C) in address space.
  • Given that last byte of section C ends on address 0x76 and first byte of section D is on address 0x78. In other words there is 1 byte long gap at address 0x77 between them.

在这种情况下,如果我使用 -repeat数据 0×01 0x80的 选项,SREC猫将填补与<$ C $一个字节C> 0×01 ,并开始从下面填充缝隙 0x80的

Under such conditions, if I use -repeat-data 0x01 0x80 option, srec cat will fill that one byte with 0x01 and start filling following gap from 0x80.

我不知道这些部分的尺寸,因为链接器处理它。

I do not know sizes of those sections because linker handles it.

推荐答案

使用 srec_cat 来创建一个覆盖文件您所需的地址范围内根据需要对齐为0x01 0x80的顺序完全充满。

Use srec_cat to create a file covering your required address range filled entirely with the 0x01 0x80 sequence aligned as required.

然后,使用srec_cat的 -multiple -disable序列预警选项合并的填充物的文件与应用程序的映像文件。因此,它是由应用程序数据中指定第二覆盖应该指定填料文件作为第一文件

Then use srec_cat with the -multiple and −disable-sequence-warning options to "merge" the "filler" file with your application image file. You should specify the filler file as the first file so that it is overwritten by the application data specified second.

它会发出的警告,但它应该工作。

It will issue many warnings, but it should work.

这篇关于我怎么可以填写两个字节值起始于偶地址边界的S-记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆