嗨,对话
I am using DA14583, and when I use Smart Snippets to download my hex file, it shows that Read 0 bytes from file XX.hex, XXX bytes have been ignored 'because their record address was greater or equal to 0x8000'.
这会阻止我的发展,你能帮我吗?非常感谢。
关键词:
Device:
嗨caiziee,
你能给我一些信息,你想要做什么?烧掉闪光灯,OTP,通过UART下载?当您尝试做什么究竟是什么时候出现此消息?浏览到“选择文件以下载”字段,刻录内存?您使用的是哪个接口(UART,JTAG)?您正在使用的.hex文件,如何生成它以及它有多大?您使用的是哪个版本的智能赛段工作室?
Thanks MT_dialog
Sorry, my fault, I should provide more information.
I am using Jtag interface to burn the internal 1MB flash. When I brows to the download file, it cannot be opened then I got this error message. The hex file is build by Keil 5. We add our own application into the ble_example project. The hex file size is 103KB. I am using Smart Snippets 3.9.
生成的地图文件如下:
==============================================================================.
代码(INC。DATA)RO数据RW数据ZI数据调试
31936 3532 4656 584 11152 972004大总计
31936 3532 4656 584 11152 972004 ELF Image Totals
31936 3532 4656 584 0 0 ROM Totals
==============================================================================.
Total RO Size (Code + RO Data) 36592 ( 35.73kB)
总RW尺寸(RW Data + Zi数据)11736(11.46KB)
总rom大小(代码+ RO数据+ RW数据)37176(36.30KB)
Hi caizee,
Since you are trying to burn a fairly large file in the 583, there seems to be a check in Smart Snippets when you are browsing a .hex file that is larger than a certain default value, try converting your .hex file into a .bin file, after doing that Smart Snippets will accept it, then try to burn it to the flash of the 583.
Thanks MT_dialog
感谢您的回复。
但是我已经尝试过这个并使用fromelf.exe获取bin文件。但是我得到的不是一个垃圾箱文件,而是几个垃圾箱文件。他们是
ER_IROM1 1KB.
ER_IROM2 1KB
ER_IROM3 1KB
ER_IROM4 1KB.
ER_IROM5 36KB.
zi_ret20 1kb.
我不知道如何在确切地址刻录这些垃圾邮件到闪存?
嗨caiziee,
In a previous SDK release that you should be able to find online (in the Previous Software Releases section of the Software and tools tab) we include a hex2bin utility that it should be able to convert you .hex file into an appropriate .bin file in order to you to place it in Smart Snippets. For example in the SDK5.0.3, you will be able to find the hex2bin in the utilities/flash_programmer folder. Also you will be able to find it, in the tutorials section in the Tutorial 6: SUOTA TOOL ZIP FILE.
Thanks MT_dialog
嗨,对话
Thanks for your quick reply.
我已经尝试过这个,但它失败了。
因为在我们的应用程序中,存在许多分布配置文件中定义的部分。地址不连续。当我使用hex2bin.exe时,我得到了这个输出:
Lowest address = 00000000
Highest address = 00080857
PAD BYTE = FF
8位校验和= 9c
当我用智能片段闪过,我得到了一个error "Size of data of selected file plus offset exceeds SPI FLASH memory size (131072 bytes)".
你能给我更多关于这个的提示吗?先感谢您。
嗨caiziee,
Apparenty its not something related with Smart Snippets, i assume that the .bin that the .hex produces is very large for the flash, if your .hex applies a padding and the .bin reaches a very large size there is something wrong with the scatterfile or you have applied a fixed initialized value somewhere in your fw that the linker isn't able to handle properly (add some code in order to initialize it) hence it results in a very large .bin file since in order to apply the value it writes it in the corresponding address in the binary instead of applying it by using extra code.
Thanks MT_dialog
谢谢,对话。
分散配置文件定义了几个空格,我基于SDK 5.0.5 BLE_Example项目进行了一点更改。为了获得更多用于代码RO和数据RO的RAM空间,我重新排列RAM设置。你能帮忙检查吗?在我在我们的项目中添加了一些新功能之前,这可以使用.hex闪烁。但大小变得更大后,我被这个问题困住了。
对于一些大数组初始化,我将它们声明为'__Attribute __((部分(“保留_mem_area0”),ZERO_INIT));“将它们放入保留RAM中。
--------------------------------------------------------------------------------------------------------------------------------------------------------
#!armcc -e -i。\,。\ ..,。\ .. \ .. \ .. \ src \ config,。\ .. \ .. \ sdk \ common_project_files \ --cpu cortex-m0
#include“da1458x_config_basic.h”
#include“da1458x_config_advanced.h”
#include "da1458x_scatter_config.h"
;*************************************************************
;***由UVISION生成的分散加载描述文件***
;*************************************************************
;
;This scatter file is set up for EM_MAP == 23!
;If an application uses a different memory layout then it must
;使用自定义的分散文件。
; **************************************************************
lr_irom1 0x20000000 0x160 {;加载区域size_region.
ER_IROM1 0x20000000 0x160 { ; load address = execution address
* .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 $$部分);必须处于一个库部分
;根区域,例如,__main.o,
;__scatter*.o, __dc*.o, and * Region$$Table
boot_vectors.o(+ RO)
system_ARMCM0.o (+RO)
; * ARMLIB *(+ RO)
.any(+ Ro)
.any(+ RW)
}
rw_iram54 0x20009200 uninit 0x600 {;堆
.any(堆栈)
}
}
lr_retention_ram2 0x00080768 0x2898 {
;Extended Sleep mode
;Extended RetRAM : 0x80000 - 0x83000
zi_ret20 0x00080768 uninit 0x22b8 {;0x80768是ROM代码使用的最后一个地址
#if(ble_connection_max_user> 4)
arch_system.o (cs_area)
#万一
jump_table.o(heap_env_area)
jump_table.o(heap_db_area)
jump_table.o(heap_msg_area)
.any(Retention_mem_area0);应用程序数据
.any(+ zi)
#if defined(SPOTAR_PATCH_AREA) && (SPOTAR_PATCH_AREA == 1)
app_spotar.o(spotar_patch_area);当Spotar_Patch_Sysram为1时放置在Sysram中
#万一
}
ZI_RET21 EXCHANGE_MEMORY_BASE EXCHANGE_MEMORY_SIZE {
Arch_main.o(ble_exchange_memory)
}
}
#万一
; lr_guard_ram 0x50000000 0x0 {
; rw_gram0 0x50000000 0x0 {;确保这里没有任何东西!
;*.o (exchange_mem_case1)
;}
;}
Hi caizee,
我所提供的散射中可以看到的是,您已经从原始分散文件中进行了一些区域,如本帖子所示(https://support.dialog-semicondiondiondum/how-build-program-code-larger-32kb.) but you also ommited RW_IRAM52 and RW_IRAM53 which is not suggested and also by ommiting the RW_IRAM51 area you dont indicate the area of replacement as indicated by the previous post. I am not able to tell how the keil will react in the scatter file that you have attached. If via using this scatterfile the fw used to run but after adding some additional code the binary produced is too large then perhaps you initialize some variables that you have placed in the retention ram, and that causes the .bin file to be that large. Also it will be helpfull if you could provide the map file of the project and the .hex file to have a look.
Thanks MT_dialog
嗨,对话
Thanks for your reply so much.
And as you mentioned, I declare a constant array with initialization numbers, but I put it in retention ram area 0. Will this cause the problem? I also read carefully UM-B-011 file, it said that
'The area 0x80000 to 0x82FFF should be declared as one that contains data that do not have to be initialized (UNINIT).'
嗨,对话
另一个问题,OTP是32KB。启动后,OTP将应用程序代码镜像为RAM。但我想知道OTP镜子是什么样的数据?代码RO或代码RO +数据RO,或其他内容?
非常感谢。
嗨caiziee,
是的,可能导致您面临的问题,链接器产生一个大的.hex文件,就UM-B-011中的参考文献,是的,因此,由于指定的区域为零,因此特定区域保持unquit的提及在开始时由SDK初始化。
关于OTP和镜像的内容,整个图像从Sysram中的OTP镜像,图像部分与OTP之间没有相互作用,而FW正在运行。
Thanks MT_dialog
谢谢,我做了一个快速的实验来批准这一点。是的,当我将所有const值放出保留RAM时,二进制更改为小。
然后,当我使用案例23时,代码RO +数据RO + RW RO的限制是什么?
Thanks a lot for your reply.
嗨caiziee,
使用案例23映射时的SYSRAM是38KB。
Thanks MT_dialog
非常感谢,对话。You really did a great help for my issue. It is quite nice to get so wonderful support from your side. ;-)