Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
bin文件大
IMX.RT1052
30
关于imxrt1052 增加sdio链接生成bin文件的问题,
发布于 2022-04-24 16:56:24 浏览:451
订阅该版
bin文件550MB为何呢? 1.官方仓库`E:\opensource\rt-thread\bsp\imxrt\imxrt1052-nxp-evk` 增加了sdio驱动配置选项改动文件:  然后编译链接:   链接脚本: ```c /* ** ################################################################### ** Processors: MIMXRT1052CVL5A ** MIMXRT1052DVL6A ** ** Compiler: GNU C Compiler ** Reference manual: IMXRT1050RM Rev.C, 08/2017 ** Version: rev. 0.1, 2017-01-10 ** Build: b170927 ** ** Abstract: ** Linker file for the GNU C Compiler ** ** Copyright 2016 Freescale Semiconductor, Inc. ** Copyright 2016-2017 NXP ** Redistribution and use in source and binary forms, with or without modification, ** are permitted provided that the following conditions are met: ** ** 1. Redistributions of source code must retain the above copyright notice, this list ** of conditions and the following disclaimer. ** ** 2. Redistributions in binary form must reproduce the above copyright notice, this ** list of conditions and the following disclaimer in the documentation and/or ** other materials provided with the distribution. ** ** 3. Neither the name of the copyright holder nor the names of its ** contributors may be used to endorse or promote products derived from this ** software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** ** http: www.nxp.com ** mail: support@nxp.com ** ** ################################################################### */ /* Entry Point */ ENTRY(Reset_Handler) HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x0400; STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x0400; /* Specify the memory areas */ MEMORY { m_boot_data (RX) : ORIGIN = 0x60000000, LENGTH = 0x00001000 m_image_vertor_table (RX) : ORIGIN = 0x60001000, LENGTH = 0x00001000 m_interrupts (RX) : ORIGIN = 0x60002000, LENGTH = 0x00000400 m_text (RX) : ORIGIN = 0x60002400, LENGTH = 0x1F7FDC00 m_itcm (RW) : ORIGIN = 0x00000000, LENGTH = 0x00020000 m_dtcm (RW) : ORIGIN = 0x20000000, LENGTH = 0x00020000 m_ocram (RW) : ORIGIN = 0x20200000, LENGTH = 0x00040000 m_sdram (RW) : ORIGIN = 0x80000000, LENGTH = 0x01E00000 m_nocache (RW) : ORIGIN = 0x81E00000, LENGTH = 0x00200000 } /* Define output sections */ SECTIONS { .boot_data : { KEEP(*(.boot_hdr.conf)) } > m_boot_data .image_vertor_table : { KEEP(*(.boot_hdr.ivt)) KEEP(*(.boot_hdr.boot_data)) KEEP(*(.boot_hdr.dcd_data)) } > m_image_vertor_table /* The startup code goes first into internal RAM */ .interrupts : { __VECTOR_TABLE = .; . = ALIGN(4); KEEP(*(.isr_vector)) /* Startup code */ . = ALIGN(4); } > m_interrupts __VECTOR_RAM = __VECTOR_TABLE; __RAM_VECTOR_TABLE_SIZE_BYTES = 0x0; /* The program code and other data goes into internal RAM */ .text : { . = ALIGN(4); *(.text) /* .text sections (code) */ *(.text*) /* .text* sections (code) */ *(.rodata) /* .rodata sections (constants, strings, etc.) */ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ *(.glue_7) /* glue arm to thumb code */ *(.glue_7t) /* glue thumb to arm code */ *(.eh_frame) KEEP (*(.init)) KEEP (*(.fini)) . = ALIGN(4); /* section information for finsh shell */ . = ALIGN(4); __fsymtab_start = .; KEEP(*(FSymTab)) __fsymtab_end = .; . = ALIGN(4); __vsymtab_start = .; KEEP(*(VSymTab)) __vsymtab_end = .; . = ALIGN(4); /* section information for initial. */ . = ALIGN(4); __rt_init_start = .; KEEP(*(SORT(.rti_fn*))) __rt_init_end = .; } > m_text .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } > m_text .ARM : { __exidx_start = .; *(.ARM.exidx*) __exidx_end = .; } > m_text .ctors : { PROVIDE(__ctors_start__ = .); /* __CTOR_LIST__ = .; */ /* gcc uses crtbegin.o to find the start of the constructors, so we make sure it is first. Because this is a wildcard, it doesn't matter if the user does not actually link against crtbegin.o; the linker won't look for a file to match a wildcard. The wildcard also means that it doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) KEEP (*crtbegin?.o(.ctors)) /* We don't want to include the .ctor section from from the crtend.o file until after the sorted ctors. The .ctor section from the crtend file contains the end of ctors marker and it must be last */ KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)) KEEP (*(SORT(.ctors.*))) KEEP (*(.ctors)) /* __CTOR_END__ = .; */ PROVIDE(__ctors_end__ = .); } > m_text .dtors : { PROVIDE(__dtors_start__ = .); /* __DTOR_LIST__ = .; */ KEEP (*crtbegin.o(.dtors)) KEEP (*crtbegin?.o(.dtors)) KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) /* __DTOR_END__ = .; */ PROVIDE(__dtors_end__ = .); } > m_text .preinit_array : { PROVIDE_HIDDEN (__preinit_array_start = .); KEEP (*(.preinit_array*)) PROVIDE_HIDDEN (__preinit_array_end = .); } > m_text .init_array : { PROVIDE_HIDDEN (__init_array_start = .); KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array*)) PROVIDE_HIDDEN (__init_array_end = .); } > m_text .fini_array : { PROVIDE_HIDDEN (__fini_array_start = .); KEEP (*(SORT(.fini_array.*))) KEEP (*(.fini_array*)) PROVIDE_HIDDEN (__fini_array_end = .); } > m_text __etext = .; /* define a global symbol at end of code */ __DATA_ROM = .; /* Symbol is used by startup for data initialization */ .data : AT(__DATA_ROM) { . = ALIGN(4); __DATA_RAM = .; __data_start__ = .; /* create a global symbol at data start */ *(m_usb_dma_init_data) *(.data) /* .data sections */ *(.data*) /* .data* sections */ KEEP(*(.jcr*)) . = ALIGN(4); __data_end__ = .; /* define a global symbol at data end */ } > m_dtcm __NDATA_ROM = __DATA_ROM + (__data_end__ - __data_start__); .ncache.init : AT(__NDATA_ROM) { __noncachedata_start__ = .; /* create a global symbol at ncache data start */ *(NonCacheable.init) . = ALIGN(4); __noncachedata_init_end__ = .; /* create a global symbol at initialized ncache data end */ } > m_nocache . = __noncachedata_init_end__; .ncache : { *(NonCacheable) . = ALIGN(4); __noncachedata_end__ = .; /* define a global symbol at ncache data end */ } > m_nocache __DATA_END = __NDATA_ROM + (__noncachedata_init_end__ - __noncachedata_start__); text_end = ORIGIN(m_text) + LENGTH(m_text); ASSERT(__DATA_END <= text_end, "region m_text overflowed with text and data") /* Uninitialized data section */ .bss : { /* This is used by the startup in order to initialize the .bss section */ . = ALIGN(4); __START_BSS = .; __bss_start__ = .; *(m_usb_dma_noninit_data) *(.bss) *(.bss*) *(COMMON) . = ALIGN(4); __bss_end__ = .; __END_BSS = .; } > m_dtcm .stack : { . = ALIGN(8); stack_start = .; . += STACK_SIZE; stack_end = .; __StackTop = .; } > m_dtcm .RTT_HEAP : { heap_start = .; . = ALIGN(8); } > m_dtcm PROVIDE(heap_end = ORIGIN(m_dtcm) + LENGTH(m_dtcm)); .ARM.attributes 0 : { *(.ARM.attributes) } } ``` map文件  用到ncache section的地方:  
查看更多
lchnu
2022-04-24
Witness, Understand, Skill
看了你的帖子,有几个地方不明白: `截图中给出的结果是用gcc编译的,但是,提供的图和链接脚本却是mdk形式的工程、mdk中的scatter文件。` 若是用gcc编译,bin文件太大,你可以找到真实的lds文件,将.data段做一些简单修改,然后你的noncache section使用NOLOAD关键词。 这是我前几天写的一篇短文,总体想法是正确的,文章中的第三种方法有一点点小问题,还没有来得及修改。 https://club.rt-thread.org/ask/article/3677.html bin文件是没有所谓地址的,如aozima大佬所说的,会填充很多数据的,比如0x0000~0x80000000就会很大。
3
个回答
默认排序
按发布时间排序
aozima
2022-04-24
调网络不抓包,调I2C等时序不上逻辑分析仪,就像电工不用万用表!
你新加的功能,有添加新的section,生成bin的时候又没指定只要某个section,所以就一股脑了。 请指定你要输出的section,不然你在0地址有数据,在3.9GB地址有数据,生成的BIN就有4GB了,要是64位更恐怖。 要么改代码,直接在代码直接引用地址,这样就不用改。
xiaoyu
2022-04-24
这家伙很懒,什么也没写!
困扰
撰写答案
登录
注册新账号
关注者
0
被浏览
451
关于作者
xiaoyu
这家伙很懒,什么也没写!
提问
27
回答
27
被采纳
1
关注TA
发私信
相关问题
1
gcc交叉编译器编译stm32项目代码,bin文件比keil编译的大很多。
2
rtthread studio生成hex文件正常,bin文件太大
3
RT1061/1052 带 RTT + LWIP和LPSPI,有什么坑要注意吗?
4
SFUD无法探测到flash
5
rt1052 bootloader跳转需要注意啥
6
RTthread在RT1052上的文件系统挂载与卸载
7
microPython移植到正点原子RT1052开发板出现问题
8
rt1052能支持ap6181的驱动吗
9
rt1052+rt_thread移植lwip一直ping不通
10
rt1052 移植cm_backtrace库,无法定位错误
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
五分钟玩转RT-Thread新社区
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
6
国产MCU移植系列教程汇总,欢迎查看!
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
RS485驱动包的使用
2
当做一件事,坚持到第二十年 ——Open-SkyEye强势回归!
3
stm32f407zgt6新建工程
4
【github】rt-thread BSP 目录所有支持开发板整理展示
5
使用 D1s (RDC2022 纪念版) 连接 thingspeak
热门标签
RT-Thread Studio
串口
LWIP
SPI
Env
AT
FinSH
ART-Pi
Bootloader
CAN总线
Hardfault
文件系统
USB
DMA
RT-Thread
线程
stm32
RT-Thread Nano
SCons
MQTT
ESP8266
ota
packages_软件包
UART
rtthread
RTC
freemodbus
I2C
flash
cubemx
W5500
rt-smart
定时器
FAL
PWM
ADC
BSP
SDIO
msh
AB32VG1
Debug
C++_cpp
socket
SFUD
中断
编译报错
MicroPython
keil
LVGL
dfs
本月问答贡献
出出啊
1424
个答案
315
次被采纳
小小李sunny
1327
个答案
262
次被采纳
crystal266
490
个答案
144
次被采纳
whj467467222
1210
个答案
141
次被采纳
张世争
581
个答案
131
次被采纳
本月文章贡献
出出啊
4
篇文章
4
次点赞
小小李sunny
1
篇文章
1
次点赞
crystal266
1
篇文章
1
次点赞
whj467467222
2
篇文章
2
次点赞
张世争
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部