Hi, Dialog
我正在使用DA14583,当我使用智能片段下载我的十六进制文件时,它显示从文件xx.hex中读取0个字节,xxx字节已被忽略',因为它们的记录地址大于或等于0x8000'。
This blocks my development, Could you help me please? Thanks a lot.
Keywords:
设备:
Hi caiziee,
你能给我一些信息,你想要做什么?烧掉闪光灯,OTP,通过UART下载?当您尝试做什么究竟是什么时候出现此消息?浏览到“选择文件以下载”字段,刻录内存?您使用的是哪个接口(UART,JTAG)?您正在使用的.hex文件,如何生成它以及它有多大?您使用的是哪个版本的智能赛段工作室?
谢谢mt_dialog.
对不起,我的错,我应该提供更多信息。
我正在使用JTAG接口刻录内部1MB闪光灯。当我浏览到下载文件时,无法打开,然后我收到了此错误消息。HEX文件由Keil 5构建。我们将自己的应用程序添加到BLE_Example项目中。十六进制文件大小为103KB。我正在使用智能片段3.9。
The generated map file is as below:
==============================================================================
Code (inc. data) RO Data RW Data ZI Data Debug
31936 3532 4656 584 11152 972004 Grand Totals
31936 3532 4656 584 11152 972004 ELF图像总数
31936 3532 4656 584 0 0 ROM总数
==============================================================================
总RO尺寸(代码+ RO数据)36592(35.73KB)
Total RW Size (RW Data + ZI Data) 11736 ( 11.46kB)
Total ROM Size (Code + RO Data + RW Data) 37176 ( 36.30kB)
嗨Caizee,
由于您试图在583中刻录一个相当大的文件,因此在浏览大于某个默认值的情况下,似乎在智能片段中检查了智能片段。尝试将您的.hex文件转换为.bin文件后,在执行智能片段后会接受它,然后尝试将其刻录到583的闪光灯。
谢谢mt_dialog.
Thanks for your reply.
But I have tried this and get the bin files using fromelf.exe. But what I got is not one bin file, but several bin files. They are
ER_IROM1 1KB
ER_IROM2 1KB.
ER_IROM3 1KB.
ER_IROM4 1KB
ER_IROM5 36KB
ZI_RET20 1KB
I do not know how to burn these bin files into flash at the exact addresses?
Hi caiziee,
在以前的SDK发布中,您应该能够在线查找(在“软件和工具”的“先前的软件版本”部分中,我们包含一个HEX2BIN实用程序,即它应该能够将您的.hex文件转换为适当的.bin文件向您置于智能片段中。例如,在SDK5.0.3中,您将能够在实用程序/ flash_programmer文件夹中找到Hex2bin。此外,您还可以在教程中的教程中找到它,在教程6:Suota工具Zip文件中。
谢谢mt_dialog.
Hi, Dialog
感谢您的快速回复。
I have tried this, but it failed.
因为在我们的应用程序中,存在许多分布配置文件中定义的部分。地址不连续。当我使用hex2bin.exe时,我得到了这个输出:
最低地址= 00000000
最高地址= 00080857
Pad Byte = FF
8-bit Checksum = 9C
当我用智能片段闪烁时,我收到了一个错误,所以所选文件加偏移量的数据大小超过SPI闪存大小(131072字节)“。
Could you please give me more hints about this? Thank you in advance.
Hi caiziee,
早上没有与智能片段相关的东西,我假设.bin那是.hex的,如果你的.hex适用填充,那么.bin达到非常大的尺寸,散射文件达到了一些问题或者您已经在FW中的某处应用了固定的初始化值,即链接器无法正常处理(添加一些代码以初始化它)因此导致非常大的.bin文件以便应用value将其写入二进制中的相应地址,而不是使用额外的代码来应用它。
谢谢mt_dialog.
Thanks, Dialog.
The scatter config file defines several spaces, and I did a little change based on the sdk 5.0.5 ble_example project. In order to get more ram space for code RO and Data RO, I rearrange the ram setting. Could you help check it please? Before I added some new features in our project, this can work well using .hex flashing. But after the size gets larger, I was stuck by this problem.
For some big array initialization, I declare them as '__attribute__((section("retention_mem_area0"),zero_init)); ' to put them in the retention ram.
-----------------------------------------------------------------------------------------------------------------------------
# !armcc - e -我,\。\..,.\..\src\config,.\..\..\sdk\common_project_files\ --cpu Cortex-M0
#include "da1458x_config_basic.h"
#include "da1458x_config_advanced.h"
#include“da1458x_scatter_config.h”
;*************************************************************
;***Scatter-Loading Description File generated by uVision ***
;*************************************************************
;
;该分散文件设置为EM_MAP == 23!
;如果应用程序使用不同的内存布局,那么它必须
;use a customized scatter file.
; **************************************************************
LR_IROM1 0x20000000 0x160 { ; load region size_region
ER_IROM1 0x20000000 0x160 {;加载地址=执行地址
* .o(重置,+第一个)
}
}
LR_IROM2 0x20000160 0x160 {
ER_IROM2 0x20000160 0x160 {
*(Jump_Table_Mem_area)
}
}
LR_IROM3 0x200002C0 0x80 {
ER_IROM3 0x200002C0 0x80 {
*(timeout_table_area)
}
}
LR_IROM4 0x20000340 0x100 {
ER_IROM4 0x20000340 0x100 {
*(nvds_data_storage_area)
}
}
lr_irom5 0x20000440 0x93c0 {
er_irom5 0x20000440 0x8dc0 {
*(InRoot$$Sections) ; All library sections that must be in a
;root region, for example, __main.o,
;__散射* .o,__dc * .o,和*区域$$表
boot_vectors.o (+RO)
system_armcm0.o(+ ro)
;*armlib* (+RO)
.any(+ Ro)
.ANY (+ RW)
}
RW_IRAM54 0x20009200 UNINIT 0x600 { ; Stack
。ANY (STACK)
}
}
LR_RETENTION_RAM2 0x00080768 0x2898 {
;延长睡眠模式
;延长潮流:0x80000 - 0x83000
ZI_RET20 0x00080768 UNINIT 0x22b8 { ; 0x80768 is the last address used by the ROM code
#if(ble_connection_max_user> 4)
ARCH_SYSTEM.O(CS_AREA)
#endif
jump_table.o (heap_env_area)
jump_table.o (heap_db_area)
jump_table.o (heap_msg_area)
。ANY (retention_mem_area0) ; application data
。ANY (+ZI)
#if定义(spotar_patch_area)&&(spotar_patch_area == 1)
app_spotar.o (spotar_patch_area) ; Placed in the SysRAM when SPOTAR_PATCH_SYSRAM is 1
#endif
}
zi_ret21 exchange_memory_base exchange_memory_size {
arch_main.o (BLE_exchange_memory)
}
}
#endif
;LR_GUARD_RAM 0x50000000 0x0 {
;RW_GRAM0 0x50000000 0x0 { ; Make sure that nothing has been placed in here!
; *。o(exchange_mem_case1)
;}
;}
嗨Caizee,
What i can see in the scatter that you have provided is that you have ommited some areas from the original scatter file as illustrated in this post (https://support.dialog-semicondiondiondum/how-build-program-code-larger-32kb.)但是,您也没有建议的rw_iram52和rw_iram53,也没有提出,也不是通过上一篇文章所示的替换区域。我无法讲述Keil如何在您附加的分散文件中反应。如果通过使用此散点文件,FW用于运行,但在添加一些附加代码之后,生成的二进制文件太大,那么也许您初始化您放置在保留RAM中的某些变量,并导致.bin文件是那么大的。如果您可以提供项目的地图文件和.hex文件,则会有帮助。
谢谢mt_dialog.
Hi, Dialog
感谢您的回复。
当您提到时,我声明了一个常量数组,初始化号码,但我将其放在保留RAM区域0中。这会导致问题吗?我还仔细阅读了UM-B-011文件,它说
“0x80000至0x82FFF应该被声明为包含不必初始化的数据(uninit)的区域。
Hi, Dialog
One more question, the OTP is 32KB. And after booting up, OTP mirror the application code to ram. But I would like to know that what kind of data will OTP mirror? Code RO or Code RO+DATA RO, or something else?
非常感谢。
Hi caiziee,
Yes that might cause the problem that you are facing and the linker produces a large .hex file, regarding the reference that you ve made in the UM-B-011, yes it mentions that the specifiic area remains UNINIT since the specified area is zero initialized by the SDK it self upon starting.
Regarding the OTP and what is mirrored, the entire image is mirrored from the OTP in the sysram, there is no interaction between the image section and the OTP while the fw is running.
谢谢mt_dialog.
Thanks, I have done a quick experiment to approve this. Yes, when I put all const value out of retention ram, the binary changes to be small.
Then when I use case 23, what is the limitation for Code RO + DATA RO +RW RO?
非常感谢您的回复。
Hi caiziee,
The sysram when case 23 mapping is used is 38KB.
谢谢mt_dialog.
非常感谢,对话。你真的对我的问题做了很大的帮助。从你身边那么精彩的支持是非常好的。;-)