微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI蓝牙设计交流 > 关于cc2640的app的image和stack的image问题。

关于cc2640的app的image和stack的image问题。

时间:10-02 整理:3721RD 点击:

问题1:cc2640程序在烧录时iar中的app和stack两个模块都要烧录,最近看了下bim程序会引导进入app位置,那么stack的代码是由何时执行的?我的猜想是cc2640有两块mcu:m0和m3是不是m0在执行stack程序?

问题2:OAD的例程中有BIM工程生成的hex被拼接烧录到flash中,程序被引导执行,那么有一些工程没有BIM被连接到hex文件里,在flash中程序是怎么被引导执行的?

谁能替我解答下

有人解答我的问题吗?

1. 工程里面的stack也是在M3里跑的。

2.  你说的没有被拼接具体指的什么?

嗯 谢谢。我现在在做片内flash OAD 升级,还没有使用蓝牙去烧写数据,只是用flash programer2将image A烧写进flash发现程序执行正常,再将image B烧写到0x6000的位置发现BIM的crc检测也通过了,但是程序没有正常执行,这个能确定是哪里的问题吗?

按照OAD文档做。 hex文件带地址,如果你步骤正确,imageB可以直接烧。

正常是把BIM,imgA和stack 会形成一个整合的HEX. imgB是另一个单独的HEX.

你好,

我们最新的SDK中文章有说明OAD的流程。

OAD分为片上application代码空中升级和片外application+stack升级两种方式。

文章的位置在:

C:\ti\simplelink\ble_cc26xx_2_01_01_44627\Documents

CC2640 BLE OAD User's Guide.pdf

所以回答你的问题,BIM文件同样可以分为片上BIM和片外BIM。

所有的代码都是放在M3上,M0并不对外开放,mapping 的框图你可以参考如下图示:

你好,

还是先建议你看看我们的OAD文档,里面介绍的很详细。

BIM其流程图介绍如下:

The OAD solution requires that permanently resident boot code, the BIM, exists in order to provide a fail-safe mechanism for determining whether to run the existing application image or to copy a new image or images from off-chip flash to on-chip flash. It is assumed that a valid image exists either in off-chip flash ready to be copied or already placed in on-chip flash at any given time. Given this assumption, the initial image placed in internal flash which does not exist in external flash will have invalid external image metadata, and so the bootloader will choose to jump to the existing image’s entry point.
At startup, BIM checks if the application image metadata in off-chip flash has a status indicating that the image is to be copied to the on-chip flash. If it is, copies the image if a valid CRC and CRC Shadow are found. If not, assumes the application in the on-chip flash is valid to run. If a 2 byte value is found that is neither 0x0000 nor 0xFFFF, but a 0xFFFF shadow checksum is found, the BIM computes the CRC over the image. Image length is determined by the metadata that is also stored contiguous with the CRC in on-chip flash that was copied over during the original write of the image from the off-chip flash.
If off-chip flash contains a “bad” image to be downloaded, but this image is undesirable, BIM can be programmed with symbol NO_COPY to skip image checking and jump directly into the image already placed in on-chip flash; at which point the on-chip flash image could invalidate the bad image’s metadata or OAD a new image in its place. BIM will not be able to load any new images while NO_COPY is defined in the build.
BIM is only responsible for making an application image failsafe upon entry. This could mean an app and stack image, or just the application. BIM has exactly one entrance to the application image.
The BIM occupies the last flash page with CCFG and uses the interrupt vectors at the start of flash where the Reset Interrupt Vector calls the BIM startup routine to ensure its control of the system upon a device reset.

所以你可以看到,上电执行的application,只有当OAD结束之后才执行的BIM。

希望我的回答对你有帮助。

好的,谢谢你的回复

你好,

如果我的回答有帮到你。

请在我的回答方的按钮上点是

谢谢。

你好,我们采用的是片外flashOAD ,但是关于metadata部分的说明不是很清楚?我储存的imageinfo结构体里面的imagelen具体是怎么得到的?可以理解为升级固件的长度吗?这个值是否为编译完的升级固件.bin文件中首部字段的信息?手机应用端获得固件后怎么得知该信息并传递到设备的呢?谢谢。

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top