主题中讨论的其他器件:UNIFLASH
工具与软件:
您好、TI 团队:
我们最近注意到、当我们的映像大小略高于400KB 时、将256KB 用作 bootloader_UNIFLASH_BUF_SIZE 会无法将应用映像编程到闪存中。
我们在尝试使用8 MB 映像时也发现了默认1024 KB 的问题。
对于 bootloader_UNIFLASH_BUF_SIZE、有什么限制?
谢谢!
Hong
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
工具与软件:
您好、TI 团队:
我们最近注意到、当我们的映像大小略高于400KB 时、将256KB 用作 bootloader_UNIFLASH_BUF_SIZE 会无法将应用映像编程到闪存中。
我们在尝试使用8 MB 映像时也发现了默认1024 KB 的问题。
对于 bootloader_UNIFLASH_BUF_SIZE、有什么限制?
谢谢!
Hong
您好、Hong:
[报价 userid="542779" url="~/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1459494/am2432-uart_uniflash-py-failed-with-buffer-of-256-kb-as-well-as-1024-kb "]我们最近注意到、当我们的映像大小略高于400KB 时、将256KB 用作 bootloader_UNIFLASH_BUF_SIZE 将无法将应用程序映像编程到闪存中。 [报价]请详细说明您看到的是哪种失败。 请帮助我粘贴/附加日志。
您所讨论的宏也应该是如此
此致、
Vaibhav
但是在下次上电时、我们检查了散列、即应用程序映像的 SBL 报告的散列不匹配。
上电完成后、引导成功、或者流程卡在某处。
SBL 报告的应用程序映像哈希不匹配。 [报价]您是如何通过连接到内核来确认该信息的?
此致、
Vaibhav
尊敬的 Vaibhav:
UniFlash 命令行工具看上去运行良好。 但某些图像大小和缓冲区大小和/或图像/缓冲区大小组合除外。 客户对其 UART 接口可靠、准确且稳定充满信心。 您能否请 UniFlash 工具团队的相关人员在 TI 重现此问题、以便我们了解问题并针对最大缓冲区大小、最大图像大小和缓冲区/图像大小组合提供建议。 您还可以确认 UART 波特率(推荐/最大)吗? 否则、客户对可靠地使用该工具没有信心。
谢谢、Merril
您好、Hong:
默认值当然是推荐值。 但是、如有需要、您可以将该值更改为256KB 的倍数、也在注释中指出:
BOOTLOADER_UNIFLASH_BUF_SIZE_BYTES = CONST_MB # This has to be a 256 KB aligned value, because flash writes will be block oriented
对于您报告的问题、您能否分享刷写日志以确认刷写是否至少成功进行。 那么、该问题可能仅与引导有关、这可能是由于闪存读取不正确。
还请分享启动日志。
此致、
Prashant
您好 Prashant:
我们仅使用了256KB 和1024KB 大小的 bootloader_UNIFLASH_BUF_SIZE_BYTES、并且我们看到了每个大小有不同的故障情况(256KB 和1024KB)。
对于最新的测试用例、我们将256 KB 设置为缓冲区大小、当失败时、映像大小略大于400 KB。 uart_uniflash.py 报告成功。 但在下次重新启动时、我们的 SBL 报告了哈希不匹配。 对于此故障情况、我们将缓冲区增加到1024KB、这样便会一次性发送应用映像、并且我们不会再次看到相同的问题。
我不确定哪些引导日志信息可以帮助我们更好地了解这种情况。 如果可以、我可以为调试会议准备日志。
谢谢!
Hong
您好 Prashant:
TI 是否也可以尝试在 TI EVM 上重现相同问题?
从 SDK 9.0发行版重新编译的步骤:
1) 1)使用 SBL_UART_UNIFLASH
2) 2)使用 SBL_OSPI
3) 3)对于 hello_world 应用程序映像=>创建大约409,608个字节的大小
在 uart_uniflash.py 处、将引导加载程序_UNIFLASH_BUF_SIZE 更新 为256KB 而不是1024KB 默认值。
谢谢!
Hong
您好、Hong:
我已经尝试在 TI EVM 上重现该问题、但无法重现。 然后只要求在您的最后进行验证
如果没问题、我将列出的步骤与以下补丁集成、但在 TI EVM 上仍未发现问题。
diff --git a/examples/hello_world/am243x-evm/r5fss0-0_nortos/ti-arm-clang/linker.cmd b/examples/hello_world/am243x-evm/r5fss0-0_nortos/ti-arm-clang/linker.cmd
index 69640f4..dad5934 100644
--- a/examples/hello_world/am243x-evm/r5fss0-0_nortos/ti-arm-clang/linker.cmd
+++ b/examples/hello_world/am243x-evm/r5fss0-0_nortos/ti-arm-clang/linker.cmd
@@ -131,7 +131,7 @@ MEMORY
/* when using multi-core application's i.e more than one R5F/M4F active, make sure
* this memory does not overlap with other R5F's
*/
- MSRAM : ORIGIN = 0x70080000 , LENGTH = 0x40000
+ MSRAM : ORIGIN = 0x70080000 , LENGTH = 0x80000
/* This section can be used to put XIP section of the application in flash, make sure this does not overlap with
* other CPUs. Also make sure to add a MPU entry for this section and mark it as cached and code executable
diff --git a/examples/hello_world/hello_world.c b/examples/hello_world/hello_world.c
index 276caaf..a39d6ab 100644
--- a/examples/hello_world/hello_world.c
+++ b/examples/hello_world/hello_world.c
@@ -37,6 +37,8 @@
#include "ti_drivers_open_close.h"
#include "ti_board_open_close.h"
+uint8_t garr[0x60000] = {5};
+
void hello_world_main(void *args)
{
/* Open drivers to open the UART driver for console */
@@ -44,6 +46,7 @@ void hello_world_main(void *args)
Board_driversOpen();
DebugP_log("Hello World!\r\n");
+ DebugP_log("garr[0]: %d\r\n", garr[0]);
Board_driversClose();
Drivers_close();
diff --git a/tools/boot/uart_uniflash.py b/tools/boot/uart_uniflash.py
index 1b89644..d8a16d7 100644
--- a/tools/boot/uart_uniflash.py
+++ b/tools/boot/uart_uniflash.py
@@ -363,7 +363,8 @@ def main(argv):
args = my_parser.parse_args()
global BOOTLOADER_UNIFLASH_BUF_SIZE_BYTES
- BOOTLOADER_UNIFLASH_BUF_SIZE_BYTES = CONST_KB * int(args.chunk_size_kb)
+ # BOOTLOADER_UNIFLASH_BUF_SIZE_BYTES = CONST_KB * int(args.chunk_size_kb)
+ BOOTLOADER_UNIFLASH_BUF_SIZE_BYTES = 256 * 1024
serialport = args.serial_port
config_file = args.cfg
如果我在补丁中错过了什么、请告诉我。
此致、
Prashant
您好!
3)对于 hello_world 应用图像=>创建大约409,608字节的大小
这的确是后来的。
在该补丁中、hello world 示例经过修改、包含以下大小为384KB 的数组
uint8_t garr[0x60000] = {5};
而对于其他代码和数据、大小最终达到~430KB、如图所示
❯ /usr/bin/ls -l ./examples/hello_world/am243x-evm/r5fss0-0_nortos/ti-arm-clang/hello_world.debug.appimage.hs_fs -rw-r--r-- 1 p-shivhare p-shivhare 433551 Feb 14 17:38 ./examples/hello_world/am243x-evm/r5fss0-0_nortos/ti-arm-clang/hello_world.debug .appimage.hs_fs
此致、
Prashant