Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
lds
SRAM
汇编
20
bsp 1052 外部所用sram以及lds文件以及启动文件的疑问
发布于 2022-04-25 17:57:33 浏览:751
订阅该版
先上lds 链接文件 ``` /* ** ################################################################### ** 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(NOLOAD): { *(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) } } ``` 下面是启动文件 ``` /* ------------------------------------------------------------------------- */ /* @file: startup_MIMXRT1052.s */ /* @purpose: CMSIS Cortex-M7 Core Device Startup File */ /* MIMXRT1052 */ /* @version: 1.0 */ /* @date: 2018-9-21 */ /* @build: b180921 */ /* ------------------------------------------------------------------------- */ /* */ /* Copyright 1997-2016 Freescale Semiconductor, Inc. */ /* Copyright 2016-2018 NXP */ /* All rights reserved. */ /* */ /* SPDX-License-Identifier: BSD-3-Clause */ /*****************************************************************************/ /* Version: GCC for ARM Embedded Processors */ /*****************************************************************************/ .syntax unified .arch armv7-m .section .isr_vector, "a" .align 2 .globl __isr_vector __isr_vector: .long __StackTop /* Top of Stack */ .long Reset_Handler /* Reset Handler */ .long NMI_Handler /* NMI Handler*/ .long HardFault_Handler /* Hard Fault Handler*/ .long MemManage_Handler /* MPU Fault Handler*/ .long BusFault_Handler /* Bus Fault Handler*/ .long UsageFault_Handler /* Usage Fault Handler*/ .long 0 /* Reserved*/ .long 0 /* Reserved*/ .long 0 /* Reserved*/ .long 0 /* Reserved*/ .long SVC_Handler /* SVCall Handler*/ .long DebugMon_Handler /* Debug Monitor Handler*/ .long 0 /* Reserved*/ .long PendSV_Handler /* PendSV Handler*/ .long SysTick_Handler /* SysTick Handler*/ /* External Interrupts*/ .long DMA0_DMA16_IRQHandler /* DMA channel 0/16 transfer complete*/ .long DMA1_DMA17_IRQHandler /* DMA channel 1/17 transfer complete*/ .long DMA2_DMA18_IRQHandler /* DMA channel 2/18 transfer complete*/ .long DMA3_DMA19_IRQHandler /* DMA channel 3/19 transfer complete*/ .long DMA4_DMA20_IRQHandler /* DMA channel 4/20 transfer complete*/ .long DMA5_DMA21_IRQHandler /* DMA channel 5/21 transfer complete*/ .long DMA6_DMA22_IRQHandler /* DMA channel 6/22 transfer complete*/ .long DMA7_DMA23_IRQHandler /* DMA channel 7/23 transfer complete*/ .long DMA8_DMA24_IRQHandler /* DMA channel 8/24 transfer complete*/ .long DMA9_DMA25_IRQHandler /* DMA channel 9/25 transfer complete*/ .long DMA10_DMA26_IRQHandler /* DMA channel 10/26 transfer complete*/ .long DMA11_DMA27_IRQHandler /* DMA channel 11/27 transfer complete*/ .long DMA12_DMA28_IRQHandler /* DMA channel 12/28 transfer complete*/ .long DMA13_DMA29_IRQHandler /* DMA channel 13/29 transfer complete*/ .long DMA14_DMA30_IRQHandler /* DMA channel 14/30 transfer complete*/ .long DMA15_DMA31_IRQHandler /* DMA channel 15/31 transfer complete*/ .long DMA_ERROR_IRQHandler /* DMA error interrupt channels 0-15 / 16-31*/ .long CTI0_ERROR_IRQHandler /* CTI0_Error*/ .long CTI1_ERROR_IRQHandler /* CTI1_Error*/ .long CORE_IRQHandler /* CorePlatform exception IRQ*/ .long LPUART1_IRQHandler /* LPUART1 TX interrupt and RX interrupt*/ .long LPUART2_IRQHandler /* LPUART2 TX interrupt and RX interrupt*/ .long LPUART3_IRQHandler /* LPUART3 TX interrupt and RX interrupt*/ .long LPUART4_IRQHandler /* LPUART4 TX interrupt and RX interrupt*/ .long LPUART5_IRQHandler /* LPUART5 TX interrupt and RX interrupt*/ .long LPUART6_IRQHandler /* LPUART6 TX interrupt and RX interrupt*/ .long LPUART7_IRQHandler /* LPUART7 TX interrupt and RX interrupt*/ .long LPUART8_IRQHandler /* LPUART8 TX interrupt and RX interrupt*/ .long LPI2C1_IRQHandler /* LPI2C1 interrupt*/ .long LPI2C2_IRQHandler /* LPI2C2 interrupt*/ .long LPI2C3_IRQHandler /* LPI2C3 interrupt*/ .long LPI2C4_IRQHandler /* LPI2C4 interrupt*/ .long LPSPI1_IRQHandler /* LPSPI1 single interrupt vector for all sources*/ .long LPSPI2_IRQHandler /* LPSPI2 single interrupt vector for all sources*/ .long LPSPI3_IRQHandler /* LPSPI3 single interrupt vector for all sources*/ .long LPSPI4_IRQHandler /* LPSPI4 single interrupt vector for all sources*/ .long CAN1_IRQHandler /* CAN1 interrupt*/ .long CAN2_IRQHandler /* CAN2 interrupt*/ .long FLEXRAM_IRQHandler /* FlexRAM address out of range Or access hit IRQ*/ .long KPP_IRQHandler /* Keypad nterrupt*/ .long TSC_DIG_IRQHandler /* TSC interrupt*/ .long GPR_IRQ_IRQHandler /* GPR interrupt*/ .long LCDIF_IRQHandler /* LCDIF interrupt*/ .long CSI_IRQHandler /* CSI interrupt*/ .long PXP_IRQHandler /* PXP interrupt*/ .long WDOG2_IRQHandler /* WDOG2 interrupt*/ .long SNVS_HP_WRAPPER_IRQHandler /* SRTC Consolidated Interrupt. Non TZ*/ .long SNVS_HP_WRAPPER_TZ_IRQHandler /* SRTC Security Interrupt. TZ*/ .long SNVS_LP_WRAPPER_IRQHandler /* ON-OFF button press shorter than 5 secs (pulse event)*/ .long CSU_IRQHandler /* CSU interrupt*/ .long DCP_IRQHandler /* DCP_IRQ interrupt*/ .long DCP_VMI_IRQHandler /* DCP_VMI_IRQ interrupt*/ .long Reserved68_IRQHandler /* Reserved interrupt*/ .long TRNG_IRQHandler /* TRNG interrupt*/ .long SJC_IRQHandler /* SJC interrupt*/ .long BEE_IRQHandler /* BEE interrupt*/ .long SAI1_IRQHandler /* SAI1 interrupt*/ .long SAI2_IRQHandler /* SAI1 interrupt*/ .long SAI3_RX_IRQHandler /* SAI3 interrupt*/ .long SAI3_TX_IRQHandler /* SAI3 interrupt*/ .long SPDIF_IRQHandler /* SPDIF interrupt*/ .long PMU_EVENT_IRQHandler /* Brown-out event interrupt*/ .long Reserved78_IRQHandler /* Reserved interrupt*/ .long TEMP_LOW_HIGH_IRQHandler /* TempSensor low/high interrupt*/ .long TEMP_PANIC_IRQHandler /* TempSensor panic interrupt*/ .long USB_PHY1_IRQHandler /* USBPHY (UTMI0), Interrupt*/ .long USB_PHY2_IRQHandler /* USBPHY (UTMI0), Interrupt*/ .long ADC1_IRQHandler /* ADC1 interrupt*/ .long ADC2_IRQHandler /* ADC2 interrupt*/ .long DCDC_IRQHandler /* DCDC interrupt*/ .long Reserved86_IRQHandler /* Reserved interrupt*/ .long Reserved87_IRQHandler /* Reserved interrupt*/ .long GPIO1_INT0_IRQHandler /* Active HIGH Interrupt from INT0 from GPIO*/ .long GPIO1_INT1_IRQHandler /* Active HIGH Interrupt from INT1 from GPIO*/ .long GPIO1_INT2_IRQHandler /* Active HIGH Interrupt from INT2 from GPIO*/ .long GPIO1_INT3_IRQHandler /* Active HIGH Interrupt from INT3 from GPIO*/ .long GPIO1_INT4_IRQHandler /* Active HIGH Interrupt from INT4 from GPIO*/ .long GPIO1_INT5_IRQHandler /* Active HIGH Interrupt from INT5 from GPIO*/ .long GPIO1_INT6_IRQHandler /* Active HIGH Interrupt from INT6 from GPIO*/ .long GPIO1_INT7_IRQHandler /* Active HIGH Interrupt from INT7 from GPIO*/ .long GPIO1_Combined_0_15_IRQHandler /* Combined interrupt indication for GPIO1 signal 0 throughout 15*/ .long GPIO1_Combined_16_31_IRQHandler /* Combined interrupt indication for GPIO1 signal 16 throughout 31*/ .long GPIO2_Combined_0_15_IRQHandler /* Combined interrupt indication for GPIO2 signal 0 throughout 15*/ .long GPIO2_Combined_16_31_IRQHandler /* Combined interrupt indication for GPIO2 signal 16 throughout 31*/ .long GPIO3_Combined_0_15_IRQHandler /* Combined interrupt indication for GPIO3 signal 0 throughout 15*/ .long GPIO3_Combined_16_31_IRQHandler /* Combined interrupt indication for GPIO3 signal 16 throughout 31*/ .long GPIO4_Combined_0_15_IRQHandler /* Combined interrupt indication for GPIO4 signal 0 throughout 15*/ .long GPIO4_Combined_16_31_IRQHandler /* Combined interrupt indication for GPIO4 signal 16 throughout 31*/ .long GPIO5_Combined_0_15_IRQHandler /* Combined interrupt indication for GPIO5 signal 0 throughout 15*/ .long GPIO5_Combined_16_31_IRQHandler /* Combined interrupt indication for GPIO5 signal 16 throughout 31*/ .long FLEXIO1_IRQHandler /* FLEXIO1 interrupt*/ .long FLEXIO2_IRQHandler /* FLEXIO2 interrupt*/ .long WDOG1_IRQHandler /* WDOG1 interrupt*/ .long RTWDOG_IRQHandler /* RTWDOG interrupt*/ .long EWM_IRQHandler /* EWM interrupt*/ .long CCM_1_IRQHandler /* CCM IRQ1 interrupt*/ .long CCM_2_IRQHandler /* CCM IRQ2 interrupt*/ .long GPC_IRQHandler /* GPC interrupt*/ .long SRC_IRQHandler /* SRC interrupt*/ .long Reserved115_IRQHandler /* Reserved interrupt*/ .long GPT1_IRQHandler /* GPT1 interrupt*/ .long GPT2_IRQHandler /* GPT2 interrupt*/ .long PWM1_0_IRQHandler /* PWM1 capture 0, compare 0, or reload 0 interrupt*/ .long PWM1_1_IRQHandler /* PWM1 capture 1, compare 1, or reload 0 interrupt*/ .long PWM1_2_IRQHandler /* PWM1 capture 2, compare 2, or reload 0 interrupt*/ .long PWM1_3_IRQHandler /* PWM1 capture 3, compare 3, or reload 0 interrupt*/ .long PWM1_FAULT_IRQHandler /* PWM1 fault or reload error interrupt*/ .long Reserved123_IRQHandler /* Reserved interrupt*/ .long FLEXSPI_IRQHandler /* FlexSPI0 interrupt*/ .long SEMC_IRQHandler /* Reserved interrupt*/ .long USDHC1_IRQHandler /* USDHC1 interrupt*/ .long USDHC2_IRQHandler /* USDHC2 interrupt*/ .long USB_OTG2_IRQHandler /* USBO2 USB OTG2*/ .long USB_OTG1_IRQHandler /* USBO2 USB OTG1*/ .long ENET_IRQHandler /* ENET interrupt*/ .long ENET_1588_Timer_IRQHandler /* ENET_1588_Timer interrupt*/ .long XBAR1_IRQ_0_1_IRQHandler /* XBAR1 interrupt*/ .long XBAR1_IRQ_2_3_IRQHandler /* XBAR1 interrupt*/ .long ADC_ETC_IRQ0_IRQHandler /* ADCETC IRQ0 interrupt*/ .long ADC_ETC_IRQ1_IRQHandler /* ADCETC IRQ1 interrupt*/ .long ADC_ETC_IRQ2_IRQHandler /* ADCETC IRQ2 interrupt*/ .long ADC_ETC_ERROR_IRQ_IRQHandler /* ADCETC Error IRQ interrupt*/ .long PIT_IRQHandler /* PIT interrupt*/ .long ACMP1_IRQHandler /* ACMP interrupt*/ .long ACMP2_IRQHandler /* ACMP interrupt*/ .long ACMP3_IRQHandler /* ACMP interrupt*/ .long ACMP4_IRQHandler /* ACMP interrupt*/ .long Reserved143_IRQHandler /* Reserved interrupt*/ .long Reserved144_IRQHandler /* Reserved interrupt*/ .long ENC1_IRQHandler /* ENC1 interrupt*/ .long ENC2_IRQHandler /* ENC2 interrupt*/ .long ENC3_IRQHandler /* ENC3 interrupt*/ .long ENC4_IRQHandler /* ENC4 interrupt*/ .long TMR1_IRQHandler /* TMR1 interrupt*/ .long TMR2_IRQHandler /* TMR2 interrupt*/ .long TMR3_IRQHandler /* TMR3 interrupt*/ .long TMR4_IRQHandler /* TMR4 interrupt*/ .long PWM2_0_IRQHandler /* PWM2 capture 0, compare 0, or reload 0 interrupt*/ .long PWM2_1_IRQHandler /* PWM2 capture 1, compare 1, or reload 0 interrupt*/ .long PWM2_2_IRQHandler /* PWM2 capture 2, compare 2, or reload 0 interrupt*/ .long PWM2_3_IRQHandler /* PWM2 capture 3, compare 3, or reload 0 interrupt*/ .long PWM2_FAULT_IRQHandler /* PWM2 fault or reload error interrupt*/ .long PWM3_0_IRQHandler /* PWM3 capture 0, compare 0, or reload 0 interrupt*/ .long PWM3_1_IRQHandler /* PWM3 capture 1, compare 1, or reload 0 interrupt*/ .long PWM3_2_IRQHandler /* PWM3 capture 2, compare 2, or reload 0 interrupt*/ .long PWM3_3_IRQHandler /* PWM3 capture 3, compare 3, or reload 0 interrupt*/ .long PWM3_FAULT_IRQHandler /* PWM3 fault or reload error interrupt*/ .long PWM4_0_IRQHandler /* PWM4 capture 0, compare 0, or reload 0 interrupt*/ .long PWM4_1_IRQHandler /* PWM4 capture 1, compare 1, or reload 0 interrupt*/ .long PWM4_2_IRQHandler /* PWM4 capture 2, compare 2, or reload 0 interrupt*/ .long PWM4_3_IRQHandler /* PWM4 capture 3, compare 3, or reload 0 interrupt*/ .long PWM4_FAULT_IRQHandler /* PWM4 fault or reload error interrupt*/ .long DefaultISR /* 168*/ .long DefaultISR /* 169*/ .long DefaultISR /* 170*/ .long DefaultISR /* 171*/ .long DefaultISR /* 172*/ .long DefaultISR /* 173*/ .long DefaultISR /* 174*/ .long DefaultISR /* 175*/ .long DefaultISR /* 176*/ .long DefaultISR /* 177*/ .long DefaultISR /* 178*/ .long DefaultISR /* 179*/ .long DefaultISR /* 180*/ .long DefaultISR /* 181*/ .long DefaultISR /* 182*/ .long DefaultISR /* 183*/ .long DefaultISR /* 184*/ .long DefaultISR /* 185*/ .long DefaultISR /* 186*/ .long DefaultISR /* 187*/ .long DefaultISR /* 188*/ .long DefaultISR /* 189*/ .long DefaultISR /* 190*/ .long DefaultISR /* 191*/ .long DefaultISR /* 192*/ .long DefaultISR /* 193*/ .long DefaultISR /* 194*/ .long DefaultISR /* 195*/ .long DefaultISR /* 196*/ .long DefaultISR /* 197*/ .long DefaultISR /* 198*/ .long DefaultISR /* 199*/ .long DefaultISR /* 200*/ .long DefaultISR /* 201*/ .long DefaultISR /* 202*/ .long DefaultISR /* 203*/ .long DefaultISR /* 204*/ .long DefaultISR /* 205*/ .long DefaultISR /* 206*/ .long DefaultISR /* 207*/ .long DefaultISR /* 208*/ .long DefaultISR /* 209*/ .long DefaultISR /* 210*/ .long DefaultISR /* 211*/ .long DefaultISR /* 212*/ .long DefaultISR /* 213*/ .long DefaultISR /* 214*/ .long DefaultISR /* 215*/ .long DefaultISR /* 216*/ .long DefaultISR /* 217*/ .long DefaultISR /* 218*/ .long DefaultISR /* 219*/ .long DefaultISR /* 220*/ .long DefaultISR /* 221*/ .long DefaultISR /* 222*/ .long DefaultISR /* 223*/ .long DefaultISR /* 224*/ .long DefaultISR /* 225*/ .long DefaultISR /* 226*/ .long DefaultISR /* 227*/ .long DefaultISR /* 228*/ .long DefaultISR /* 229*/ .long DefaultISR /* 230*/ .long DefaultISR /* 231*/ .long DefaultISR /* 232*/ .long DefaultISR /* 233*/ .long DefaultISR /* 234*/ .long DefaultISR /* 235*/ .long DefaultISR /* 236*/ .long DefaultISR /* 237*/ .long DefaultISR /* 238*/ .long DefaultISR /* 239*/ .long DefaultISR /* 240*/ .long DefaultISR /* 241*/ .long DefaultISR /* 242*/ .long DefaultISR /* 243*/ .long DefaultISR /* 244*/ .long DefaultISR /* 245*/ .long DefaultISR /* 246*/ .long DefaultISR /* 247*/ .long DefaultISR /* 248*/ .long DefaultISR /* 249*/ .long DefaultISR /* 250*/ .long DefaultISR /* 251*/ .long DefaultISR /* 252*/ .long DefaultISR /* 253*/ .long DefaultISR /* 254*/ .long 0xFFFFFFFF /* Reserved for user TRIM value*/ .size __isr_vector, . - __isr_vector .text .thumb /* Reset Handler */ .thumb_func .align 2 .globl Reset_Handler .weak Reset_Handler .type Reset_Handler, %function Reset_Handler: cpsid i /* Mask interrupts */ .equ VTOR, 0xE000ED08 ldr r0, =VTOR ldr r1, =__isr_vector str r1, [r0] ldr r2, [r1] msr msp, r2 #ifndef __NO_SYSTEM_INIT ldr r0,=SystemInit blx r0 #endif /* Loop to copy data from read only memory to RAM. The ranges * of copy from/to are specified by following symbols evaluated in * linker script. * __etext: End of code section, i.e., begin of data sections to copy from. * __data_start__/__data_end__: RAM address range that data should be * __noncachedata_start__/__noncachedata_end__ : none cachable region * copied to. Both must be aligned to 4 bytes boundary. */ ldr r1, =__etext ldr r2, =__data_start__ ldr r3, =__data_end__ #if 1 /* Here are two copies of loop implemenations. First one favors code size * and the second one favors performance. Default uses the first one. * Change to "#if 0" to use the second one */ .LC0: cmp r2, r3 ittt lt ldrlt r0, [r1], #4 strlt r0, [r2], #4 blt .LC0 #else subs r3, r2 ble .LC1 .LC0: subs r3, #4 ldr r0, [r1, r3] str r0, [r2, r3] bgt .LC0 .LC1: #endif #ifdef __STARTUP_INITIALIZE_NONCACHEDATA ldr r2, =__noncachedata_start__ ldr r3, =__noncachedata_init_end__ #if 1 .LC2: cmp r2, r3 ittt lt ldrlt r0, [r1], #4 strlt r0, [r2], #4 blt .LC2 #else subs r3, r2 ble .LC3 .LC2: subs r3, #4 ldr r0, [r1, r3] str r0, [r2, r3] bgt .LC2 .LC3: #endif /* zero inited ncache section initialization */ ldr r3, =__noncachedata_end__ movs r0,0 .LC4: cmp r2,r3 itt lt strlt r0,[r2],#4 blt .LC4 #endif /* __STARTUP_INITIALIZE_NONCACHEDATA */ #ifdef __STARTUP_CLEAR_BSS /* This part of work usually is done in C library startup code. Otherwise, * define this macro to enable it in this startup. * * Loop to zero out BSS section, which uses following symbols * in linker script: * __bss_start__: start of BSS section. Must align to 4 * __bss_end__: end of BSS section. Must align to 4 */ ldr r1, =__bss_start__ ldr r2, =__bss_end__ movs r0, 0 .LC5: cmp r1, r2 itt lt strlt r0, [r1], #4 blt .LC5 #endif /* __STARTUP_CLEAR_BSS */ cpsie i /* Unmask interrupts */ #ifndef __START #define __START _start #endif #ifndef __ATOLLIC__ ldr r0,=__START blx r0 #else ldr r0,=__libc_init_array blx r0 ldr r0,=main bx r0 #endif .pool .size Reset_Handler, . - Reset_Handler .align 1 .thumb_func .weak DefaultISR .type DefaultISR, %function DefaultISR: b DefaultISR .size DefaultISR, . - DefaultISR .align 1 .thumb_func .weak NMI_Handler .type NMI_Handler, %function NMI_Handler: ldr r0,=NMI_Handler bx r0 .size NMI_Handler, . - NMI_Handler .align 1 .thumb_func .weak HardFault_Handler .type HardFault_Handler, %function HardFault_Handler: ldr r0,=HardFault_Handler bx r0 .size HardFault_Handler, . - HardFault_Handler .align 1 .thumb_func .weak SVC_Handler .type SVC_Handler, %function SVC_Handler: ldr r0,=SVC_Handler bx r0 .size SVC_Handler, . - SVC_Handler .align 1 .thumb_func .weak PendSV_Handler .type PendSV_Handler, %function PendSV_Handler: ldr r0,=PendSV_Handler bx r0 .size PendSV_Handler, . - PendSV_Handler .align 1 .thumb_func .weak SysTick_Handler .type SysTick_Handler, %function SysTick_Handler: ldr r0,=SysTick_Handler bx r0 .size SysTick_Handler, . - SysTick_Handler .align 1 .thumb_func .weak DMA0_DMA16_IRQHandler .type DMA0_DMA16_IRQHandler, %function DMA0_DMA16_IRQHandler: ldr r0,=DMA0_DMA16_DriverIRQHandler bx r0 .size DMA0_DMA16_IRQHandler, . - DMA0_DMA16_IRQHandler .align 1 .thumb_func .weak DMA1_DMA17_IRQHandler .type DMA1_DMA17_IRQHandler, %function DMA1_DMA17_IRQHandler: ldr r0,=DMA1_DMA17_DriverIRQHandler bx r0 .size DMA1_DMA17_IRQHandler, . - DMA1_DMA17_IRQHandler .align 1 .thumb_func .weak DMA2_DMA18_IRQHandler .type DMA2_DMA18_IRQHandler, %function DMA2_DMA18_IRQHandler: ldr r0,=DMA2_DMA18_DriverIRQHandler bx r0 .size DMA2_DMA18_IRQHandler, . - DMA2_DMA18_IRQHandler .align 1 .thumb_func .weak DMA3_DMA19_IRQHandler .type DMA3_DMA19_IRQHandler, %function DMA3_DMA19_IRQHandler: ldr r0,=DMA3_DMA19_DriverIRQHandler bx r0 .size DMA3_DMA19_IRQHandler, . - DMA3_DMA19_IRQHandler .align 1 .thumb_func .weak DMA4_DMA20_IRQHandler .type DMA4_DMA20_IRQHandler, %function DMA4_DMA20_IRQHandler: ldr r0,=DMA4_DMA20_DriverIRQHandler bx r0 .size DMA4_DMA20_IRQHandler, . - DMA4_DMA20_IRQHandler .align 1 .thumb_func .weak DMA5_DMA21_IRQHandler .type DMA5_DMA21_IRQHandler, %function DMA5_DMA21_IRQHandler: ldr r0,=DMA5_DMA21_DriverIRQHandler bx r0 .size DMA5_DMA21_IRQHandler, . - DMA5_DMA21_IRQHandler .align 1 .thumb_func .weak DMA6_DMA22_IRQHandler .type DMA6_DMA22_IRQHandler, %function DMA6_DMA22_IRQHandler: ldr r0,=DMA6_DMA22_DriverIRQHandler bx r0 .size DMA6_DMA22_IRQHandler, . - DMA6_DMA22_IRQHandler .align 1 .thumb_func .weak DMA7_DMA23_IRQHandler .type DMA7_DMA23_IRQHandler, %function DMA7_DMA23_IRQHandler: ldr r0,=DMA7_DMA23_DriverIRQHandler bx r0 .size DMA7_DMA23_IRQHandler, . - DMA7_DMA23_IRQHandler .align 1 .thumb_func .weak DMA8_DMA24_IRQHandler .type DMA8_DMA24_IRQHandler, %function DMA8_DMA24_IRQHandler: ldr r0,=DMA8_DMA24_DriverIRQHandler bx r0 .size DMA8_DMA24_IRQHandler, . - DMA8_DMA24_IRQHandler .align 1 .thumb_func .weak DMA9_DMA25_IRQHandler .type DMA9_DMA25_IRQHandler, %function DMA9_DMA25_IRQHandler: ldr r0,=DMA9_DMA25_DriverIRQHandler bx r0 .size DMA9_DMA25_IRQHandler, . - DMA9_DMA25_IRQHandler .align 1 .thumb_func .weak DMA10_DMA26_IRQHandler .type DMA10_DMA26_IRQHandler, %function DMA10_DMA26_IRQHandler: ldr r0,=DMA10_DMA26_DriverIRQHandler bx r0 .size DMA10_DMA26_IRQHandler, . - DMA10_DMA26_IRQHandler .align 1 .thumb_func .weak DMA11_DMA27_IRQHandler .type DMA11_DMA27_IRQHandler, %function DMA11_DMA27_IRQHandler: ldr r0,=DMA11_DMA27_DriverIRQHandler bx r0 .size DMA11_DMA27_IRQHandler, . - DMA11_DMA27_IRQHandler .align 1 .thumb_func .weak DMA12_DMA28_IRQHandler .type DMA12_DMA28_IRQHandler, %function DMA12_DMA28_IRQHandler: ldr r0,=DMA12_DMA28_DriverIRQHandler bx r0 .size DMA12_DMA28_IRQHandler, . - DMA12_DMA28_IRQHandler .align 1 .thumb_func .weak DMA13_DMA29_IRQHandler .type DMA13_DMA29_IRQHandler, %function DMA13_DMA29_IRQHandler: ldr r0,=DMA13_DMA29_DriverIRQHandler bx r0 .size DMA13_DMA29_IRQHandler, . - DMA13_DMA29_IRQHandler .align 1 .thumb_func .weak DMA14_DMA30_IRQHandler .type DMA14_DMA30_IRQHandler, %function DMA14_DMA30_IRQHandler: ldr r0,=DMA14_DMA30_DriverIRQHandler bx r0 .size DMA14_DMA30_IRQHandler, . - DMA14_DMA30_IRQHandler .align 1 .thumb_func .weak DMA15_DMA31_IRQHandler .type DMA15_DMA31_IRQHandler, %function DMA15_DMA31_IRQHandler: ldr r0,=DMA15_DMA31_DriverIRQHandler bx r0 .size DMA15_DMA31_IRQHandler, . - DMA15_DMA31_IRQHandler .align 1 .thumb_func .weak DMA_ERROR_IRQHandler .type DMA_ERROR_IRQHandler, %function DMA_ERROR_IRQHandler: ldr r0,=DMA_ERROR_DriverIRQHandler bx r0 .size DMA_ERROR_IRQHandler, . - DMA_ERROR_IRQHandler .align 1 .thumb_func .weak LPUART1_IRQHandler .type LPUART1_IRQHandler, %function LPUART1_IRQHandler: ldr r0,=LPUART1_DriverIRQHandler bx r0 .size LPUART1_IRQHandler, . - LPUART1_IRQHandler .align 1 .thumb_func .weak LPUART2_IRQHandler .type LPUART2_IRQHandler, %function LPUART2_IRQHandler: ldr r0,=LPUART2_DriverIRQHandler bx r0 .size LPUART2_IRQHandler, . - LPUART2_IRQHandler .align 1 .thumb_func .weak LPUART3_IRQHandler .type LPUART3_IRQHandler, %function LPUART3_IRQHandler: ldr r0,=LPUART3_DriverIRQHandler bx r0 .size LPUART3_IRQHandler, . - LPUART3_IRQHandler .align 1 .thumb_func .weak LPUART4_IRQHandler .type LPUART4_IRQHandler, %function LPUART4_IRQHandler: ldr r0,=LPUART4_DriverIRQHandler bx r0 .size LPUART4_IRQHandler, . - LPUART4_IRQHandler .align 1 .thumb_func .weak LPUART5_IRQHandler .type LPUART5_IRQHandler, %function LPUART5_IRQHandler: ldr r0,=LPUART5_DriverIRQHandler bx r0 .size LPUART5_IRQHandler, . - LPUART5_IRQHandler .align 1 .thumb_func .weak LPUART6_IRQHandler .type LPUART6_IRQHandler, %function LPUART6_IRQHandler: ldr r0,=LPUART6_DriverIRQHandler bx r0 .size LPUART6_IRQHandler, . - LPUART6_IRQHandler .align 1 .thumb_func .weak LPUART7_IRQHandler .type LPUART7_IRQHandler, %function LPUART7_IRQHandler: ldr r0,=LPUART7_DriverIRQHandler bx r0 .size LPUART7_IRQHandler, . - LPUART7_IRQHandler .align 1 .thumb_func .weak LPUART8_IRQHandler .type LPUART8_IRQHandler, %function LPUART8_IRQHandler: ldr r0,=LPUART8_DriverIRQHandler bx r0 .size LPUART8_IRQHandler, . - LPUART8_IRQHandler .align 1 .thumb_func .weak LPI2C1_IRQHandler .type LPI2C1_IRQHandler, %function LPI2C1_IRQHandler: ldr r0,=LPI2C1_DriverIRQHandler bx r0 .size LPI2C1_IRQHandler, . - LPI2C1_IRQHandler .align 1 .thumb_func .weak LPI2C2_IRQHandler .type LPI2C2_IRQHandler, %function LPI2C2_IRQHandler: ldr r0,=LPI2C2_DriverIRQHandler bx r0 .size LPI2C2_IRQHandler, . - LPI2C2_IRQHandler .align 1 .thumb_func .weak LPI2C3_IRQHandler .type LPI2C3_IRQHandler, %function LPI2C3_IRQHandler: ldr r0,=LPI2C3_DriverIRQHandler bx r0 .size LPI2C3_IRQHandler, . - LPI2C3_IRQHandler .align 1 .thumb_func .weak LPI2C4_IRQHandler .type LPI2C4_IRQHandler, %function LPI2C4_IRQHandler: ldr r0,=LPI2C4_DriverIRQHandler bx r0 .size LPI2C4_IRQHandler, . - LPI2C4_IRQHandler .align 1 .thumb_func .weak LPSPI1_IRQHandler .type LPSPI1_IRQHandler, %function LPSPI1_IRQHandler: ldr r0,=LPSPI1_DriverIRQHandler bx r0 .size LPSPI1_IRQHandler, . - LPSPI1_IRQHandler .align 1 .thumb_func .weak LPSPI2_IRQHandler .type LPSPI2_IRQHandler, %function LPSPI2_IRQHandler: ldr r0,=LPSPI2_DriverIRQHandler bx r0 .size LPSPI2_IRQHandler, . - LPSPI2_IRQHandler .align 1 .thumb_func .weak LPSPI3_IRQHandler .type LPSPI3_IRQHandler, %function LPSPI3_IRQHandler: ldr r0,=LPSPI3_DriverIRQHandler bx r0 .size LPSPI3_IRQHandler, . - LPSPI3_IRQHandler .align 1 .thumb_func .weak LPSPI4_IRQHandler .type LPSPI4_IRQHandler, %function LPSPI4_IRQHandler: ldr r0,=LPSPI4_DriverIRQHandler bx r0 .size LPSPI4_IRQHandler, . - LPSPI4_IRQHandler .align 1 .thumb_func .weak CAN1_IRQHandler .type CAN1_IRQHandler, %function CAN1_IRQHandler: ldr r0,=CAN1_DriverIRQHandler bx r0 .size CAN1_IRQHandler, . - CAN1_IRQHandler .align 1 .thumb_func .weak CAN2_IRQHandler .type CAN2_IRQHandler, %function CAN2_IRQHandler: ldr r0,=CAN2_DriverIRQHandler bx r0 .size CAN2_IRQHandler, . - CAN2_IRQHandler .align 1 .thumb_func .weak SAI1_IRQHandler .type SAI1_IRQHandler, %function SAI1_IRQHandler: ldr r0,=SAI1_DriverIRQHandler bx r0 .size SAI1_IRQHandler, . - SAI1_IRQHandler .align 1 .thumb_func .weak SAI2_IRQHandler .type SAI2_IRQHandler, %function SAI2_IRQHandler: ldr r0,=SAI2_DriverIRQHandler bx r0 .size SAI2_IRQHandler, . - SAI2_IRQHandler .align 1 .thumb_func .weak SAI3_RX_IRQHandler .type SAI3_RX_IRQHandler, %function SAI3_RX_IRQHandler: ldr r0,=SAI3_RX_DriverIRQHandler bx r0 .size SAI3_RX_IRQHandler, . - SAI3_RX_IRQHandler .align 1 .thumb_func .weak SAI3_TX_IRQHandler .type SAI3_TX_IRQHandler, %function SAI3_TX_IRQHandler: ldr r0,=SAI3_TX_DriverIRQHandler bx r0 .size SAI3_TX_IRQHandler, . - SAI3_TX_IRQHandler .align 1 .thumb_func .weak SPDIF_IRQHandler .type SPDIF_IRQHandler, %function SPDIF_IRQHandler: ldr r0,=SPDIF_DriverIRQHandler bx r0 .size SPDIF_IRQHandler, . - SPDIF_IRQHandler .align 1 .thumb_func .weak FLEXIO1_IRQHandler .type FLEXIO1_IRQHandler, %function FLEXIO1_IRQHandler: ldr r0,=FLEXIO1_DriverIRQHandler bx r0 .size FLEXIO1_IRQHandler, . - FLEXIO1_IRQHandler .align 1 .thumb_func .weak FLEXIO2_IRQHandler .type FLEXIO2_IRQHandler, %function FLEXIO2_IRQHandler: ldr r0,=FLEXIO2_DriverIRQHandler bx r0 .size FLEXIO2_IRQHandler, . - FLEXIO2_IRQHandler .align 1 .thumb_func .weak FLEXSPI_IRQHandler .type FLEXSPI_IRQHandler, %function FLEXSPI_IRQHandler: ldr r0,=FLEXSPI_DriverIRQHandler bx r0 .size FLEXSPI_IRQHandler, . - FLEXSPI_IRQHandler .align 1 .thumb_func .weak USDHC1_IRQHandler .type USDHC1_IRQHandler, %function USDHC1_IRQHandler: ldr r0,=USDHC1_DriverIRQHandler bx r0 .size USDHC1_IRQHandler, . - USDHC1_IRQHandler .align 1 .thumb_func .weak USDHC2_IRQHandler .type USDHC2_IRQHandler, %function USDHC2_IRQHandler: ldr r0,=USDHC2_DriverIRQHandler bx r0 .size USDHC2_IRQHandler, . - USDHC2_IRQHandler .align 1 .thumb_func .weak ENET_IRQHandler .type ENET_IRQHandler, %function ENET_IRQHandler: ldr r0,=ENET_DriverIRQHandler bx r0 .size ENET_IRQHandler, . - ENET_IRQHandler .align 1 .thumb_func .weak ENET_1588_Timer_IRQHandler .type ENET_1588_Timer_IRQHandler, %function ENET_1588_Timer_IRQHandler: ldr r0,=ENET_1588_Timer_DriverIRQHandler bx r0 .size ENET_1588_Timer_IRQHandler, . - ENET_1588_Timer_IRQHandler /* Macro to define default handlers. Default handler * will be weak symbol and just dead loops. They can be * overwritten by other handlers */ .macro def_irq_handler handler_name .weak \handler_name .set \handler_name, DefaultISR .endm /* Exception Handlers */ def_irq_handler MemManage_Handler def_irq_handler BusFault_Handler def_irq_handler UsageFault_Handler def_irq_handler DebugMon_Handler def_irq_handler DMA0_DMA16_DriverIRQHandler def_irq_handler DMA1_DMA17_DriverIRQHandler def_irq_handler DMA2_DMA18_DriverIRQHandler def_irq_handler DMA3_DMA19_DriverIRQHandler def_irq_handler DMA4_DMA20_DriverIRQHandler def_irq_handler DMA5_DMA21_DriverIRQHandler def_irq_handler DMA6_DMA22_DriverIRQHandler def_irq_handler DMA7_DMA23_DriverIRQHandler def_irq_handler DMA8_DMA24_DriverIRQHandler def_irq_handler DMA9_DMA25_DriverIRQHandler def_irq_handler DMA10_DMA26_DriverIRQHandler def_irq_handler DMA11_DMA27_DriverIRQHandler def_irq_handler DMA12_DMA28_DriverIRQHandler def_irq_handler DMA13_DMA29_DriverIRQHandler def_irq_handler DMA14_DMA30_DriverIRQHandler def_irq_handler DMA15_DMA31_DriverIRQHandler def_irq_handler DMA_ERROR_DriverIRQHandler def_irq_handler CTI0_ERROR_IRQHandler def_irq_handler CTI1_ERROR_IRQHandler def_irq_handler CORE_IRQHandler def_irq_handler LPUART1_DriverIRQHandler def_irq_handler LPUART2_DriverIRQHandler def_irq_handler LPUART3_DriverIRQHandler def_irq_handler LPUART4_DriverIRQHandler def_irq_handler LPUART5_DriverIRQHandler def_irq_handler LPUART6_DriverIRQHandler def_irq_handler LPUART7_DriverIRQHandler def_irq_handler LPUART8_DriverIRQHandler def_irq_handler LPI2C1_DriverIRQHandler def_irq_handler LPI2C2_DriverIRQHandler def_irq_handler LPI2C3_DriverIRQHandler def_irq_handler LPI2C4_DriverIRQHandler def_irq_handler LPSPI1_DriverIRQHandler def_irq_handler LPSPI2_DriverIRQHandler def_irq_handler LPSPI3_DriverIRQHandler def_irq_handler LPSPI4_DriverIRQHandler def_irq_handler CAN1_DriverIRQHandler def_irq_handler CAN2_DriverIRQHandler def_irq_handler FLEXRAM_IRQHandler def_irq_handler KPP_IRQHandler def_irq_handler TSC_DIG_IRQHandler def_irq_handler GPR_IRQ_IRQHandler def_irq_handler LCDIF_IRQHandler def_irq_handler CSI_IRQHandler def_irq_handler PXP_IRQHandler def_irq_handler WDOG2_IRQHandler def_irq_handler SNVS_HP_WRAPPER_IRQHandler def_irq_handler SNVS_HP_WRAPPER_TZ_IRQHandler def_irq_handler SNVS_LP_WRAPPER_IRQHandler def_irq_handler CSU_IRQHandler def_irq_handler DCP_IRQHandler def_irq_handler DCP_VMI_IRQHandler def_irq_handler Reserved68_IRQHandler def_irq_handler TRNG_IRQHandler def_irq_handler SJC_IRQHandler def_irq_handler BEE_IRQHandler def_irq_handler SAI1_DriverIRQHandler def_irq_handler SAI2_DriverIRQHandler def_irq_handler SAI3_RX_DriverIRQHandler def_irq_handler SAI3_TX_DriverIRQHandler def_irq_handler SPDIF_DriverIRQHandler def_irq_handler PMU_EVENT_IRQHandler def_irq_handler Reserved78_IRQHandler def_irq_handler TEMP_LOW_HIGH_IRQHandler def_irq_handler TEMP_PANIC_IRQHandler def_irq_handler USB_PHY1_IRQHandler def_irq_handler USB_PHY2_IRQHandler def_irq_handler ADC1_IRQHandler def_irq_handler ADC2_IRQHandler def_irq_handler DCDC_IRQHandler def_irq_handler Reserved86_IRQHandler def_irq_handler Reserved87_IRQHandler def_irq_handler GPIO1_INT0_IRQHandler def_irq_handler GPIO1_INT1_IRQHandler def_irq_handler GPIO1_INT2_IRQHandler def_irq_handler GPIO1_INT3_IRQHandler def_irq_handler GPIO1_INT4_IRQHandler def_irq_handler GPIO1_INT5_IRQHandler def_irq_handler GPIO1_INT6_IRQHandler def_irq_handler GPIO1_INT7_IRQHandler def_irq_handler GPIO1_Combined_0_15_IRQHandler def_irq_handler GPIO1_Combined_16_31_IRQHandler def_irq_handler GPIO2_Combined_0_15_IRQHandler def_irq_handler GPIO2_Combined_16_31_IRQHandler def_irq_handler GPIO3_Combined_0_15_IRQHandler def_irq_handler GPIO3_Combined_16_31_IRQHandler def_irq_handler GPIO4_Combined_0_15_IRQHandler def_irq_handler GPIO4_Combined_16_31_IRQHandler def_irq_handler GPIO5_Combined_0_15_IRQHandler def_irq_handler GPIO5_Combined_16_31_IRQHandler def_irq_handler FLEXIO1_DriverIRQHandler def_irq_handler FLEXIO2_DriverIRQHandler def_irq_handler WDOG1_IRQHandler def_irq_handler RTWDOG_IRQHandler def_irq_handler EWM_IRQHandler def_irq_handler CCM_1_IRQHandler def_irq_handler CCM_2_IRQHandler def_irq_handler GPC_IRQHandler def_irq_handler SRC_IRQHandler def_irq_handler Reserved115_IRQHandler def_irq_handler GPT1_IRQHandler def_irq_handler GPT2_IRQHandler def_irq_handler PWM1_0_IRQHandler def_irq_handler PWM1_1_IRQHandler def_irq_handler PWM1_2_IRQHandler def_irq_handler PWM1_3_IRQHandler def_irq_handler PWM1_FAULT_IRQHandler def_irq_handler Reserved123_IRQHandler def_irq_handler FLEXSPI_DriverIRQHandler def_irq_handler SEMC_IRQHandler def_irq_handler USDHC1_DriverIRQHandler def_irq_handler USDHC2_DriverIRQHandler def_irq_handler USB_OTG2_IRQHandler def_irq_handler USB_OTG1_IRQHandler def_irq_handler ENET_DriverIRQHandler def_irq_handler ENET_1588_Timer_DriverIRQHandler def_irq_handler XBAR1_IRQ_0_1_IRQHandler def_irq_handler XBAR1_IRQ_2_3_IRQHandler def_irq_handler ADC_ETC_IRQ0_IRQHandler def_irq_handler ADC_ETC_IRQ1_IRQHandler def_irq_handler ADC_ETC_IRQ2_IRQHandler def_irq_handler ADC_ETC_ERROR_IRQ_IRQHandler def_irq_handler PIT_IRQHandler def_irq_handler ACMP1_IRQHandler def_irq_handler ACMP2_IRQHandler def_irq_handler ACMP3_IRQHandler def_irq_handler ACMP4_IRQHandler def_irq_handler Reserved143_IRQHandler def_irq_handler Reserved144_IRQHandler def_irq_handler ENC1_IRQHandler def_irq_handler ENC2_IRQHandler def_irq_handler ENC3_IRQHandler def_irq_handler ENC4_IRQHandler def_irq_handler TMR1_IRQHandler def_irq_handler TMR2_IRQHandler def_irq_handler TMR3_IRQHandler def_irq_handler TMR4_IRQHandler def_irq_handler PWM2_0_IRQHandler def_irq_handler PWM2_1_IRQHandler def_irq_handler PWM2_2_IRQHandler def_irq_handler PWM2_3_IRQHandler def_irq_handler PWM2_FAULT_IRQHandler def_irq_handler PWM3_0_IRQHandler def_irq_handler PWM3_1_IRQHandler def_irq_handler PWM3_2_IRQHandler def_irq_handler PWM3_3_IRQHandler def_irq_handler PWM3_FAULT_IRQHandler def_irq_handler PWM4_0_IRQHandler def_irq_handler PWM4_1_IRQHandler def_irq_handler PWM4_2_IRQHandler def_irq_handler PWM4_3_IRQHandler def_irq_handler PWM4_FAULT_IRQHandler .end ``` 昨天的帖子是编译出来bin文件太大,现在采取以下方式: ![image.png](https://oss-club.rt-thread.org/uploads/20220425/5722b7602793c4621ec152a7092d62f2.png) 现在的问题是: ![image.png](https://oss-club.rt-thread.org/uploads/20220425/5199732b49a43e54d9bf32e4fc0e2d77.png) ![image.png](https://oss-club.rt-thread.org/uploads/20220425/3772447c6c0d8ea180661cd955c8b01f.png) ![image.png](https://oss-club.rt-thread.org/uploads/20220425/f8eccde31c72b99b78d39d5228af0a2b.png) 在启动文件里面,startup_MIMXRT1052.S 是否有拷贝内容到指定的__noncachedata_start__ 如果有拷贝的话但是这个时候外扩的sram 接口还没有初始化啊。如果没有拷贝,但是根据注释是拷贝了,另外这个启动的汇编谁知道啊,没谷歌百度到 ![image.png](https://oss-club.rt-thread.org/uploads/20220425/42c5719a11d6c1a1bd72c0999a2bd111.png.webp)
查看更多
lchnu
2022-04-25
Witness, Understand, Skill
没有用过iMX RT1052, 但通过查阅手册、官方网页,初步研究了一下启动流程。RT1052支持从FlexSPI Nor, FlexSPI NAND, SEMC, SD, LPSPI等方式启动。 从官方BSP中可以看到,是直接从外部存储设备原地XIP执行,面向FlexSpi NOR,我没有去查看原理图进行确认,从程序中可以看出端倪。 在`fsl_flexspi_nor_boot.c`文件中: 1.`hyperflash_config` FlexSPI Configuration Block, 地址是0x00 - 0x200。SPI的初始化、编译后MAP文件的位置如下。 这一段的作用是,便于RT1052启动后,使用相关配置去配置外设。因为RT1052支持的启动设备太多,所以这一段专门用于放置各种启动外设的驱动配置。 ![image.png](https://oss-club.rt-thread.org/uploads/20220425/21151a0858ad9cd842d29e1302e44d26.png) ![image.png](https://oss-club.rt-thread.org/uploads/20220425/ebb96a3c31eb83904844611075e15814.png) 2.`image vector table` 在IVT中,image vector table,映像向量表,记录了各个配置块和APP的信息中,包含了IVT Header,image中第一条指令的绝对地址(如下方的`0x60002000`)、保留字1、DCD等。合计占用0x20字节。 ```c const ivt image_vector_table = { IVT_HEADER, /* IVT Header */ 0x60002000, /* Image Entry Function */ IVT_RSVD, /* Reserved = 0 */ (uint32_t)DCD_ADDRESS, /* Address where DCD information is stored */ (uint32_t)BOOT_DATA_ADDRESS, /* Address where BOOT Data Structure is stored */ (uint32_t)&image_vector_table, /* Pointer to IVT Self (absolute address */ (uint32_t)CSF_ADDRESS, /* Address where CSF file is stored */ IVT_RSVD /* Reserved = 0 */ }; ``` ![image.png](https://oss-club.rt-thread.org/uploads/20220425/52e22cec271c12720e156a498ab73893.png) 3.`boot_data` 存储要加载的程序的起始地址(绝对地址)、长度。合计占用0x10字节。 ```c const BOOT_DATA_T boot_data = { FLASH_BASE, /* boot start location */ (FLASH_END-FLASH_BASE), /* size */ PLUGIN_FLAG, /* Plugin flag*/ 0xFFFFFFFF /* empty - extra data word */ }; ``` ![image.png](https://oss-club.rt-thread.org/uploads/20220425/48092ed2ce4a28d1af6f8e1ef8efa194.png) 4.`dcd_sdram` DCD,Device Configuration Data。 在官方手册中,关于DCD有这么一句话: The DCD is a configuration information contained in the program image (external to the ROM) that the ROM interprets to configure variaous peripherals on the chip. For example, some components (such as SDRAM) require some sequence of register programming as a part of the configuration before it is ready to be used. The DCD feature can be used to program the SEMC register to the optimal settings. 简单翻译过来,就是,DCD用于用于配置SEMC、外部SRAM等。 ![image.png](https://oss-club.rt-thread.org/uploads/20220425/9da5e38df7af741ec4b2b8aeaddb87db.png.webp) 因此,通过上述分析,我认为,`在真正进入到RESET_Handler之前,RT1052已经通过DCD完成了片外SDRAM的初始化,因此可以放心大胆地使用SDRAM。`lz昨天提到的关于SD卡驱动部分的变量,放置在SDRAM中,不会有任何问题。你在本贴提到的启动文件中对ncache部分进行清零操作,也不会出现问题。 个人一点浅见,结合自己的理解,查阅手册后得到的结论。不足和不正确之处,请批评指正。 参考网站: [Using RT1052 SDRAM config from EVK demo](https://community.nxp.com/t5/i-MX-RT/Using-RT1052-SDRAM-config-from-EVK-demo/m-p/987695)
3
个回答
默认排序
按发布时间排序
VFINE
2022-04-25
这家伙很懒,什么也没写!
1. 生成bin文件太大,原因只会是没有正确指定 AT 地址,导致 objcopy 在提取 section 时从默认的起始开始提取。 2. 启动代码的操作就是 copy 和 zero-init,copy 是从 bin 中将数据 copy 到链接时指定的那个存储器中,启动代码中出现的那些变量,都是在链接脚本中定义的,用来标识 LMA 和 VMA。 3. 至于你说的 sram 可能没有被初始化,这个就不得而知,要么你要用汇编初始化,要么用 bootloader 初始化,要么靠硬件自动初始化。 最后给个建议,在写链接脚本的时候,要清楚的知道运行视图和装载视图这两个概念,了解什么样的段要 copy,什么样的段要 zero-init。
ccxzjz
2022-04-25
写啥好呢
rt1052如果搭配sdram的话,一般会在dcd文件或者IDE的init文件初始化了,bin文件如果太大的话很大原因是分散加载文件没分配好。
撰写答案
登录
注册新账号
关注者
0
被浏览
751
关于作者
xiaoyu
这家伙很懒,什么也没写!
提问
27
回答
27
被采纳
1
关注TA
发私信
相关问题
1
关于利用0x68000000作为扩展sram?
2
请问RTT stduio的sram外设需要怎么添加
3
tm32f407-atk-explorer这个BSP中,1M外置的SRAM
4
基于bsp工程,stm32f4xx_hal_sram.c如何正确编译。
5
RT-Thread的SRAM文件怎么启动
6
关于STM32的STM32_SRAM_SIZE问题
7
使用memheap外置sram出错
8
L431 RAM设置成SRAM1 启动失败
9
SRAM进行初始化,找不到这三个函数(已解决)
10
STM32L452 sram2的定向使用,求助
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
【24嵌入式设计大赛】基于RT-Thread星火一号的智慧家居系统
2
RT-Thread EtherKit开源以太网硬件正式发布
3
如何在master上的BSP中添加配置yml文件
4
使用百度AI助手辅助编写一个rt-thread下的ONVIF设备发现功能的功能代码
5
RT-Thread 发布 EtherKit开源以太网硬件!
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
USB
DMA
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
FAL
rt-smart
ESP8266
I2C_IIC
WIZnet_W5500
UART
ota在线升级
PWM
cubemx
freemodbus
flash
packages_软件包
BSP
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
中断
Debug
编译报错
msh
SFUD
keil_MDK
rt_mq_消息队列_msg_queue
ulog
C++_cpp
at_device
本月问答贡献
踩姑娘的小蘑菇
7
个答案
3
次被采纳
a1012112796
15
个答案
2
次被采纳
张世争
9
个答案
2
次被采纳
rv666
5
个答案
2
次被采纳
用户名由3_15位
13
个答案
1
次被采纳
本月文章贡献
程序员阿伟
9
篇文章
2
次点赞
hhart
3
篇文章
4
次点赞
大龄码农
1
篇文章
5
次点赞
RTT_逍遥
1
篇文章
2
次点赞
ThinkCode
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部