我已经被困了很多天,试图实现DS-5中的代码,目标是Cortex-A9和使用NEON SIMD本质。我设法通过调试器执行了一些小程序,但是当我试图分配大于256 to的内存时,总是会收到一条消息。
描述资源路径位置类型L6221E:执行范围为[0x80001674,0x800417d0]的执行区域ZI_DATA与执行区域ARM_LIB_HEAP重叠,执行范围为[0x800400000x80080000]。CPUTest2017RE C/C++问题
内存映射由一个分散文件调度,如下所示
;*******************************************************
; Copyright (c) 2011-2014 ARM Ltd. All rights reserved.
;*******************************************************
; Scatter-file for Cortex-A9 bare-metal example on Versatile Express
; This scatter-file places application code, data, stack and heap at suitable addresses in the memory map.
; Using a scatter-file with ARM_LIB_STACKHEAP eliminates the need to set stack-limit or heap-base in the debugger.
; Versatile Express with Cortex-A9 has 1GB SDRAM at 0x60000000 to 0x9FFFFFFF, which this scatter-file uses.
SDRAM 0x80000000 0x10000000
{
VECTORS +0
{
* (VECTORS, +FIRST) ; Vector table and other (assembler) startup code
* (InRoot$$Sections) ; All (library) code that must be in a root region
}
RO_CODE +0
{ * (+RO-CODE) } ; Application RO code (.text)
RO_DATA +0
{ * (+RO-DATA) } ; Application RO data (.constdata)
RW_DATA +0
{ * (+RW) } ; Application RW data (.data)
ZI_DATA +0
{ * (+ZI) } ; Application ZI data (.bss)
ARM_LIB_HEAP 0x80040000 EMPTY 0x00040000 ; Application heap
{ }
ARM_LIB_STACK 0x80090000 EMPTY -0x00010000 ; Application (SVC mode) stack
{ }
IRQ_STACK 0x800A0000 EMPTY -0x00010000 ; IRQ mode stack
{ }
TTB 0x80100000 EMPTY 0x4000 ; Level-1 Translation Table for MMU
{ }
}

因此,我的问题是,当我分配内存以传递512x512 (.bdat格式)映像时,这种分配发生在ZI_DATA中,而不是在空闲的SDRAM中。我尝试了几乎所有的配置,或者我得到了错误以上的调试器停留在挂起.这里有什么问题??
PS:相同的代码运行在Cortex-A8和更高版本的DS-5上,但出于某种原因,Cortex-A8调试器没有使用最新版本的DS-5。
发布于 2017-01-24 09:22:39
看来您的bss数据超出了范围,进入了堆部分。你可以尝试一些事情..。
1) Limit the maximum bss section so the error will be more clear
2) Move Heap section on a higher address
3) generate a map file which has all the section sizes. to see what is taking so much space in the bss section and maybe moving that to some other section.相同的代码适用于A8这一事实并没有多大帮助,因为库是不同的,代码部分也不一样.我去过那里,感觉不太好
https://stackoverflow.com/questions/41797050
复制相似问题