2017-09-26 17 views
0

NMCLEO-F207ZG 보드 기반의 계승 프로젝트 인 stm32f207ZGT를 IDE I로 사용하고 있습니다. SW4STM32 (Eclipse, AC6)를 사용하십시오.STM32f207ZG NUCLEO 보드, ld.exe : 섹션 .RxDescripSection VMA [2000e000,2000e09f] VMA [20000118,2001431b]

이 프로젝트는 다른 PC에서는 잘 컴파일되지만 거리상의 이유로이 프로젝트를 사용하여 구성을 비교할 수는 없습니다.

오류없이과를 가져온 후 나는 그것이 콘솔 출력을 얻을 컴파일하려고 :

/* 
***************************************************************************** 
** 

** File  : LinkerScript.ld 
** 
** Abstract : Linker script for STM32F207ZGTx Device with 
**    1024KByte FLASH, 128KByte RAM 
** 
**    Set heap size, stack size and stack location according 
**    to application requirements. 
** 
**    Set memory bank area and size if external memory is used. 
** 
** Target  : STMicroelectronics STM32 
** 
** 
** Distribution: The file is distributed as is, without any warranty 
**    of any kind. 
** 
** (c)Copyright Ac6. 
** You may use this file as-is or modify it according to the needs of your 
** project. Distribution of this file (unmodified or modified) is not 
** permitted. Ac6 permit registered System Workbench for MCU users the 
** rights to distribute the assembled, compiled & linked contents of this 
** file as part of an application binary file, provided that it is built 
** using the System Workbench for MCU toolchain. 
** 
***************************************************************************** 
*/ 

/* Entry Point */ 
ENTRY(Reset_Handler) 

/* Highest address of the user mode stack */ 
_estack = 0x20020000; /* end of RAM */ 
/* Generate a link error if heap and stack don't fit into RAM */ 
_Min_Heap_Size = 0x200;  /* required amount of heap */ 
_Min_Stack_Size = 0x400; /* required amount of stack */ 

/* Specify the memory areas */ 
MEMORY 
{ 
FLASH (rx)  : ORIGIN = 0x8000000, LENGTH = 1024K 
RAM (xrw)  : ORIGIN = 0x20000000, LENGTH = 128K 
} 

/* Define output sections */ 
SECTIONS 
{ 
    /* The startup code goes first into FLASH */ 
    .isr_vector : 
    { 
    . = ALIGN(4); 
    KEEP(*(.isr_vector)) /* Startup code */ 
    . = ALIGN(4); 
    } >FLASH 

    /* The program code and other data goes into FLASH */ 
    .text : 
    { 
    . = ALIGN(4); 
    *(.text)   /* .text sections (code) */ 
    *(.text*)   /* .text* sections (code) */ 
    *(.glue_7)   /* glue arm to thumb code */ 
    *(.glue_7t)  /* glue thumb to arm code */ 
    *(.eh_frame) 

    KEEP (*(.init)) 
    KEEP (*(.fini)) 

    . = ALIGN(4); 
    _etext = .;  /* define a global symbols at end of code */ 
    } >FLASH 

    /* Constant data goes into FLASH */ 
    .rodata : 
    { 
    . = ALIGN(4); 
    *(.rodata)   /* .rodata sections (constants, strings, etc.) */ 
    *(.rodata*)  /* .rodata* sections (constants, strings, etc.) */ 
    . = ALIGN(4); 
    } >FLASH 

    .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH 
    .ARM : { 
    __exidx_start = .; 
    *(.ARM.exidx*) 
    __exidx_end = .; 
    } >FLASH 

    .preinit_array  : 
    { 
    PROVIDE_HIDDEN (__preinit_array_start = .); 
    KEEP (*(.preinit_array*)) 
    PROVIDE_HIDDEN (__preinit_array_end = .); 
    } >FLASH 
    .init_array : 
    { 
    PROVIDE_HIDDEN (__init_array_start = .); 
    KEEP (*(SORT(.init_array.*))) 
    KEEP (*(.init_array*)) 
    PROVIDE_HIDDEN (__init_array_end = .); 
    } >FLASH 
    .fini_array : 
    { 
    PROVIDE_HIDDEN (__fini_array_start = .); 
    KEEP (*(SORT(.fini_array.*))) 
    KEEP (*(.fini_array*)) 
    PROVIDE_HIDDEN (__fini_array_end = .); 
    } >FLASH 



    /* used by the startup to initialize data */ 
    _sidata = LOADADDR(.data); 

    /* Initialized data sections goes into RAM, load LMA copy after code */ 
    .data : 
    { 
    . = ALIGN(4); 
    _sdata = .;  /* create a global symbol at data start */ 
    *(.data)   /* .data sections */ 
    *(.data*)   /* .data* sections */ 

    . = ALIGN(4); 
    _edata = .;  /* define a global symbol at data end */ 
    } >RAM AT> FLASH 


    /* Uninitialized data section */ 
    . = ALIGN(4); 
    .bss : 
    { 
    /* This is used by the startup in order to initialize the .bss secion */ 
    _sbss = .;   /* define a global symbol at bss start */ 
    __bss_start__ = _sbss; 
    *(.bss) 
    *(.bss*) 
    *(COMMON) 

    . = ALIGN(4); 
    _ebss = .;   /* define a global symbol at bss end */ 
    __bss_end__ = _ebss; 
    } >RAM 

    /* User_heap_stack section, used to check that there is enough RAM left */ 
    ._user_heap_stack : 
    { 
    . = ALIGN(8); 
    PROVIDE (end = .); 
    PROVIDE (_end = .); 
    . = . + _Min_Heap_Size; 
    . = . + _Min_Stack_Size; 
    . = ALIGN(8); 
    } >RAM 



    /* Remove information from the standard libraries */ 
    /DISCARD/ : 
    { 
    libc.a (*) 
    libm.a (*) 
    libgcc.a (*) 
    } 

    .ARM.attributes 0 : { *(.ARM.attributes) } 
    .RxDescripSection  0x2000E000 (NOLOAD) : { *(.RxDescripSection)  } >RAM 
    .TxDescripSection  0x2000E100 (NOLOAD) : { *(.TxDescripSection)  } >RAM 
    .RxBUF    0x2000E200 (NOLOAD) : { *(.RxBUF)    } >RAM 
    .TxBUF    0x2000FFC4 (NOLOAD) : { *(.TxBUF)    } >RAM 
} 

메이크 : 인터넷에서 일부 검색 후

Building target: STM32F207ZG_NUCLEO_144.elf

Invoking: MCU GCC Linker

arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -mfloat-abi=soft -specs=nosys.specs -specs=nano.specs -T"../STM32F207ZGTx_FLASH.ld" -Wl,-Map=output.map -Wl,--gc-sections -o "STM32F207ZG_NUCLEO_144.elf" @"objects.list" -lm

c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe: section .RxDescripSection VMA [2000e000,2000e09f] overlaps section .bss VMA [20000118,2001431b]

collect2.exe: error: ld returned 1 exit status

make: *** [STM32F207ZG_NUCLEO_144.elf] Error 1

makefile:45: recipe for target 'STM32F207ZG_NUCLEO_144.elf' failed

15:59:47 Build Finished (took 23s.436ms)

을,이 링커에 의해 야기 될 것으로 보인다 :

################################################################################ 
# Automatically-generated file. Do not edit! 
################################################################################ 

-include ../makefile.init 

RM := rm -rf 

# All of the sources participating in the build are defined here 
-include sources.mk 
-include Middlewares/LwIP/system/OS/subdir.mk 
-include Middlewares/LwIP/Netif/subdir.mk 
-include Middlewares/LwIP/Core/IPv4/subdir.mk 
-include Middlewares/LwIP/Core/subdir.mk 
-include Middlewares/LwIP/Api/subdir.mk 
-include Middlewares/FreeRTOS/portable/ARM_CM3/subdir.mk 
-include Middlewares/FreeRTOS/portable/subdir.mk 
-include Middlewares/FreeRTOS/subdir.mk 
-include Drivers/STM32F2xx_HAL_Driver/subdir.mk 
-include Drivers/BSP/STM32F2xx_Nucleo_144/subdir.mk 
-include Application/User/Src/MQTTPacket/subdir.mk 
-include Application/User/Src/MQTTClient/subdir.mk 
-include Application/User/Src/subdir.mk 
-include subdir.mk 
-include objects.mk 

ifneq ($(MAKECMDGOALS),clean) 
ifneq ($(strip $(S_UPPER_DEPS)),) 
-include $(S_UPPER_DEPS) 
endif 
ifneq ($(strip $(C_DEPS)),) 
-include $(C_DEPS) 
endif 
endif 

-include ../makefile.defs 

# Add inputs and outputs from these tool invocations to the build variables 

# All Target 
all: STM32F207ZG_NUCLEO_144.elf 

# Tool invocations 
STM32F207ZG_NUCLEO_144.elf: $(OBJS) $(USER_OBJS) ../STM32F207ZGTx_FLASH.ld 
    @echo 'Building target: [email protected]' 
    @echo 'Invoking: MCU GCC Linker' 
    arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -mfloat-abi=soft -specs=nosys.specs -specs=nano.specs -T"../STM32F207ZGTx_FLASH.ld" -Wl,-Map=output.map -Wl,--gc-sections -o "STM32F207ZG_NUCLEO_144.elf" @"objects.list" $(USER_OBJS) $(LIBS) -lm 
    @echo 'Finished building target: [email protected]' 
    @echo ' ' 
    $(MAKE) --no-print-directory post-build 

# Other Targets 
clean: 
    -$(RM) * 
    [email protected] ' ' 

post-build: 
    [email protected] 'Generating binary and Printing size information:' 
    arm-none-eabi-objcopy -O binary "STM32F207ZG_NUCLEO_144.elf" "STM32F207ZG_NUCLEO_144.bin" 
    arm-none-eabi-size "STM32F207ZG_NUCLEO_144.elf" 
    [email protected] ' ' 

.PHONY: all clean dependents 
.SECONDARY: post-build 

-include ../makefile.targets 

나는 아이디어가 없습니다. 저는 수동으로 modficate 링커와 makefile을 시도했습니다. b 그것은 최악이었다.

도움 주셔서 감사합니다.

편집 :

내가 (코멘트) 링커의 마지막 라인을 제거하는 경우는 그것은 작동하지만이 becuse을하고있을 souldn't하면 자동으로 생성 된 파일입니다. 링커에서

수정 :

/* 
    .RxDescripSection  0x2000E000 (NOLOAD) : { *(.RxDescripSection)  } >RAM 
    .TxDescripSection  0x2000E100 (NOLOAD) : { *(.TxDescripSection)  } >RAM 
    .RxBUF    0x2000E200 (NOLOAD) : { *(.RxBUF)    } >RAM 
    .TxBUF    0x2000FFC4 (NOLOAD) : { *(.TxBUF)    } >RAM 
    */ 

편집 2 :

처음 편집에 댓글을 한이 라인은, ethernetif.c에서 온 나는 테마가 필요합니다 대부분 확인합니다.

#if defined (__ICCARM__) /*!< IAR Compiler */ 

#pragma location=0x2000E000 
__no_init ETH_DMADescTypeDef DMARxDscrTab[ETH_RXBUFNB];/* Ethernet Rx MA Descriptor */ 
#pragma location=0x2000E100 
__no_init ETH_DMADescTypeDef DMATxDscrTab[ETH_TXBUFNB];/* Ethernet Tx DMA Descriptor */ 
#elif defined (__CC_ARM ) 
ETH_DMADescTypeDef DMARxDscrTab[ETH_RXBUFNB] __attribute__((at(0x2000E000)));/* Ethernet Rx MA Descriptor */ 
ETH_DMADescTypeDef DMATxDscrTab[ETH_TXBUFNB] __attribute__((at(0x2000E100)));/* Ethernet Tx DMA Descriptor */ 
#elif defined (__GNUC__ ) 
ETH_DMADescTypeDef DMARxDscrTab[ETH_RXBUFNB] __attribute__((section(".RxDescripSection")));/* Ethernet Rx MA Descriptor */ 
ETH_DMADescTypeDef DMATxDscrTab[ETH_TXBUFNB] __attribute__((section(".TxDescripSection")));/* Ethernet Tx DMA Descriptor */ 
#endif 
#if defined (__ICCARM__) /*!< IAR Compiler */ 
#pragma location=0x2000E200 
__no_init uint8_t Rx_Buff[ETH_RXBUFNB][ETH_RX_BUF_SIZE]; /* Ethernet Receive Buffer */ 
#pragma location=0x2000FFC4 
__no_init uint8_t Tx_Buff[ETH_TXBUFNB][ETH_TX_BUF_SIZE]; /* Ethernet Transmit Buffer */ 
#elif defined (__CC_ARM ) 
uint8_t Rx_Buff[ETH_RXBUFNB][ETH_RX_BUF_SIZE] __attribute__((at(0x2000E200))); /* Ethernet Receive Buffer */ 
uint8_t Tx_Buff[ETH_TXBUFNB][ETH_TX_BUF_SIZE] __attribute__((at(0x2000FFC4))); /* Ethernet Transmit Buffer */ 
#elif defined (__GNUC__ ) 
uint8_t Rx_Buff[ETH_RXBUFNB][ETH_RX_BUF_SIZE] __attribute__((section(".RxBUF")));/* Ethernet Receive Buffer */ 
uint8_t Tx_Buff[ETH_TXBUFNB][ETH_TX_BUF_SIZE] __attribute__((section(".TxBUF")));/* Ethernet Transmit Buffer */ 
#endif 
+0

잘못된 스크립트/잘못된 추가 섹션이 있습니까? 나는 아무 것도 볼 수 없다. –

+0

이더넷, LWIP, IBM Bluemix 및 MQTT를 사용하여 프로젝트를 개발 중이지만이 IP 중 일부가 링커 스크립트에이 줄을 추가하는 것으로 의심되므로 내 첫 번째 연락처입니다 – taquionbcn

+0

Cortex 용 링커 파일을 작성한 적은 없지만 위의 파일 자체가 모순 된 것 같습니다. RAM의 마지막 범위는 _user_heap_stack이며이 파일은 _Min_Stack_Size 이후의 모든 내용이 stackpointer의 init 값인 _estack까지 스택으로 사용된다고 가정합니다. 추가 버퍼 및 디스크립터는 RAM의 중간에 배치되는 할당 체계를 전혀 고려하지 않습니다. 어쩌면 _estack = _;으로 _user_heap_stack 뒤에 _estack을 넣고 문제가있는 섹션을 0x2001E000까지 이동하면 도움이 될 것입니다. – Vroomfondel

답변

0

모르겠어요 왜하지만 지금은,이 프로젝트는 내가 편집에 언급 라인없이 작동을 테스트 할 수있는 HW를 가지고

편집 : 문제는 발생 cubemx에 LWIP 용 코드.