请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:MCU-PLUS-SDK-AM243X 执行 SBL 后、如何使用应用程序中的存储器、否则会浪费 SBL 的存储器?
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.
执行 SBL 后、如何使用应用程序中的存储器、否则会浪费 SBL 的存储器?
您好!
通过将 SBL 存储器分配给未初始化的段(空载)段、您可以在主 R5的应用中使用它。
执行该操作的步骤-
1.在主 R5F 应用中定义 MSRAM_SBL 部分
/* SBL used memory, use only for uninitalized sections */ MSRAM_SBL : ORIGIN = 0x70000000 , LENGTH = 0x60000
2. 将未初始化的/NoLoad 段(如.bss、.stack)分配给这个新创建的段
/* This is rest of uninitialized data. This can be placed in DDR if DDR is available and needed */
GROUP {
.bss: {} palign(8) /* This is where uninitialized globals go */
RUN_START(__BSS_START)
RUN_END(__BSS_END)
.sysmem: {} palign(8) /* This is where the malloc heap goes */
.stack: {} palign(8) /* This is where the main() stack goes */
} > MSRAM_SBL
3.从存储器映射文件中确认未初始化段的分配。 检查开头的 UNINITILIADED 段属性。
.bss 0 70000000 00001498 UNINITIALIZED
70000000 00001008 (.common:gHwiCtrl)
70001008 00000280 ti_drivers_config.o (.bss.gUartObjects)
70001288 00000120 libsysbm.a : trgmsg.c.obj (.bss:_CIOBUF_)
700013a8 000000a0 (.common:__TI_tmpnams)
70001448 00000038 (.common:gClockCtrl)
70001480 00000008 (.common:parmbuf)
70001488 00000004 nortos.am243x.r5f.ti-arm-clang.debug.lib : HwiP_armv7r_vim.obj (.bss.gdummy)
7000148c 00000004 libc.a : memory.c.obj (.bss.sys_free)
70001490 00000004 (.common:gUartHandle)
70001494 00000004 --HOLE--
.sysmem 0 70001498 00008000 UNINITIALIZED
70001498 00000010 libc.a : memory.c.obj (.sysmem)
700014a8 00007ff0 --HOLE--
.stack 0 70009498 00004000 UNINITIALIZED
70009498 00000004 nortos.am243x.r5f.ti-arm-clang.debug.lib : boot_armv7r_asm.obj (.stack)
7000949c 00003ffc --HOLE--
需要注意的一些要点:
希望这对您有所帮助!
此致、
Prasad