yabo国际娱乐Dialog Semiconductor客户支持-连接器 https://support.dialog-semiconductor.com/resource-keywords/linker 从Keil移植到gcc https://support.dialog-semiconductor.com/porting-keil-gcc

Hi

我试图从Keil移植我的583项目的构建到GCC。

我已经取得了很大的进步,但还是卡在了一个点上。< / p > < p > 1。我得到了很多链接器错误,即:

./../../../../ sdk/ble_stack/profiles/prf_utils.o:(.rodata.cust_prf_funcs+0x0): ' cust_prf_funcs'的多个定义
./../../../../../sdk/platform/ main/arch_system.o:(.rodata.cust_prf_funcs+0x0):首先定义在这里
../../../../../ ../sdk/app_modules/src/app_sec/app_security.o:(.rodata.cust_prf_funcs+0x0):' cust_prf_funcs'的多个定义
./../../../../../ ../../ /sdk/platform/arch/main/arch_system.o:(.rodata.cust_prf_funcs+0x0):第一次定义在这里
./../../../../../ ../../sdk/platform/arch/main/arch_system.o:(.rodata. prf_funcs+0x0):第一次定义在这里

等等。我想是某个开关不对,但我找不到是什么开关。

我得到一个内存溢出错误

arm-none-eabi/bin/ld: out/ full_emb_syram。Axf截面'。constdata' will not fit in region ' RAM_IROM4'
arm-none-eabi/bin/ld: region RAM overflow with stack
arm-none-eabi/bin/ld: section ER_IROM5 loaded at [0000000020000440,0000000020006e33]重叠section .constdata loaded at [00000000200003e4,00000000200005eb]
collect2: error: ld returned 1 exit status

我怀疑这与内存设置不正确有关。是580。LDS文件还适用吗? Can you help me with a 583.lds file? Or how do I get started porting this ?
I have done the steps from the application note, but there is still some way to go to make my 583 work, as you can see :)

I intend to use the 583 in a mainstream commercial product, so this help will go a long way.

--
Best regards

Device: 
2016年7月29日星期五12:33:52 +0000 ankitdaf 4308在https://support.dialog-semiconductor.com https://support.dialog-semiconductor.com/porting-keil-gcc#comments
保留RAM区域的使用情况 https://support.dialog-semiconductor.com/usage-retention-ram-area

Hi all,

请让我问一下关于“保留内存”和“syram (page0,1)”的使用问题。
我们正在努力缩小代码大小。(内存区域(代码)比我们想象的要小…)
我已经阅读了UM-B-011文档,但我仍然没有信心使用这些区域。

=My condition=
- Use Extended Sleep
- BLE_CONNECTION_MAX_USER = 1

=My =
关于UM-B-011, ATT、ENV和MSG堆的大小为:
ATT 1036 Bytes
ENV 360 Bytes
MSG 1324 Bytes
,这些堆根据Scatter file分配给LR_RETENTION_RAM2。
(我也检查了真实的映射文件。)o (BLE_exchange_memory)”也被分配到LR_RETENTION_RAM2区域。

我列出地图文件如下:
————————
加载区域LR_RETENTION_RAM2(基数:0x00080768,大小:0x00000000,最大:0x00002898,绝对)

执行区域ZI_RET20(基数:0x00080768,大小:0x00000a8c,最大:0x000022b8,绝对,UNINIT)

基础Addr大小类型Attr Idx E节名对象

0x00080768 0x0000040c零RW 541 heap_db_area jump_table。o
0x00080b74 0x00000154零RW 542 heap_env_area跳表。heap_msg_area jump_table. o
0x00080cc8 0x0000052c Zero RW 544 heap_msg_area jump_table. oo

执行区域ZI_RET21 (Base: 0x00082a20, Size: 0x000005e0, Max: 0x000005e0, ABSOLUTE)

Base Addr Size Type Attr Idx E Section Name Object

0x00082a20 0x000005de Zero RW 287 BLE_exchange_memory arch_main. 0。o
————————
对于这个。map文件,0x82a20 - (0x80cc8 + 0x52c) = 0x182c (Bytes)似乎是空的。所以我们可以自由使用这个区域。
>问题1。对吗??

If question 1 is correct, we can use these area to book any variables as __attribute((section(“retention_mem_area0"),zero_init)). There are two places where retention_mem_area0 is defined in Scatter file. (When ext-sleep usage) And if first place(0x20008000) for retention_mem_area0 is not enough to allocate retentioned variables, those variables will be allocated to second place(0x80768-).
> Question 2. Is it correct?? (Actually, I tested and it seems to work…)

I could move some variables from 0x200000000 area to 0x80000 area, but I couldn’t move code like function() in some_file.c by just adding "some_file.o" to LR_RETENTION_RAM2 region. I got error while writing code to Flash Memory via SmartSnipetts… Is it proper behavior? I think this is proper because I had not defined "some_file.o" to scatter_file as “Executed Region”.
> Question 3. Is it possible to move function/codes (not variables) to this free Retention area (0x811f4 - 0x82a20) editing scatter file like Executed Region or something else??

If I could have any comment on this, it would be much appreciated.
Thank you very much for your supports in advance.

Best Regards,
CD

Device: 
2016年2月18日星期四13:38:55 +0000 CD 2705在https://support.dialog-semiconductor.com https://support.dialog-semiconductor.com/usage-retention-ram-area#comments