some contants are not in the correct section
for the malloc and realloc functions the function malloc_r use constants
__malloc_top_pad, __malloc_
in the map file I can see
#######
.bss.__
.bss._
.bss.__
.bss._
.bss.__
.bss._
.bss.__
.bss._
.noinit 0x2001e654 0x0
*(.noinit .noinit.*)
.heap 0x2001e654 0xf000 load address 0x081070dc
#######
the load address is out of the normal constants address from 0x080e8a88 to 0x080EE700
.text.align 0x080e8a88 0x0
.data 0x20000000 0x5c78 load address 0x080e8a88
*(vtable)
example
.bss.__
the startup file will not load this const because it is with 0x081070a8 out of 0x080e8a88 to 0x080EE700
is this a bug or what can I do?
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Maik,
I don't quite understand the issue from your description. I suspect it an issue in your linker script. Can you please doubt-check it or post it here?
Thanks,
Joey
Revision history for this message
|
#2 |
Here the linker script
///////
/* Memory Spaces Definitions for STM32F427ZI (EVO4.3 - DEBUG) */
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192K
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 64K
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 2048K
MEMORY_ARRAY (xrw) : ORIGIN = 0x20002000, LENGTH = 32
}
/* higher address of the user mode stack (end of 192K RAM on AHB bus)*/
_estack = 0x20030000;
/* include the master4-specific sub-script */
INCLUDE master4.ld
///////
/* linker script for Master4 */
/*
* The entry point is informative, for debuggers and simulators,
* since the Cortex-M vector points to it anyway.
*/
/* Linker script to place sections and symbol values. Should be used together
* with other linker script that defines memory regions FLASH and RAM.
* It references following symbols, which must be defined in code:
* Reset_Handler : Entry of reset handler
*
* It defines following symbols, which code can use without definition:
* __exidx_start
* __exidx_end
* __copy_
* __copy_table_end__
* __zero_
* __zero_table_end__
* __etext
* __data_start__
* __preinit_
* __preinit_array_end
* __init_array_start
* __init_array_end
* __fini_array_start
* __fini_array_end
* __data_end__
* __bss_start__
* __bss_end__
* __end__
* end
* __HeapLimit
* __StackLimit
* __StackTop
* __stack
*/
ENTRY(Reset_
/* Sections Definitions */
SECTIONS
{
/* for Cortex devices, the beginning of the startup code is stored in the .isr_vector section, which goes to FLASH */
.isr_vector :
{
. = ALIGN(4);
. = ALIGN(4);
} >FLASH
._inits :
{
. = ALIGN(4);
/*
* These are the old initialisation sections, intended to contain
* naked code, with the prologue/epilogue added by crti.o/crtn.o
* when linking with startup files. The standalone startup code
* currently does not run these, better use the init arrays below.
*/
KEEP(*(.init))
KEEP(*(.fini))
. = ALIGN(4);
/*
* The preinit code, i.e. an array of pointers to initialisation
* functions to be performed before constructors.
*/
PROVIDE_HIDDEN (__preinit_
/*
* Used to run the SystemInit() before anything else.
*/
KEEP(
/*
* Used for other platform inits.
*/
KEEP(
/*
* The application inits. If you need to enforce some order in
* execution, create new sections, as before.
*/
KEEP(
PROVIDE_HIDDEN (__preinit_
. = ALIGN(4);
/*
* The init code, i.e. an array of pointers to static constructors.
*/
PROVIDE_HIDDEN (__init_array_start = .);
KEEP(
KEEP(
PROVIDE_HIDDEN (__init_array_end = .);
. = ALIGN(4);
/*
* The fini code, i.e. an array of pointers to static destructors.
*/
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP(
KEEP(
PROVIDE_HIDDEN (__fini_array_end = .);
. = ALIGN(4);
} >FLASH
/*
* For some STRx devices, the beginning of the startup code
* is stored in the .flashtext section, which goes to FLASH.
*/
.flashtext :
{
. = ALIGN(4);
. = ALIGN(4);
} >FLASH
/* the program code is stored in the .text section, which goes to Flash */
.text :
{
. = ALIGN(4);
*(.text) /* remaining code */
*(.text.*) /* remaining code */
*(.rodata) /* read-only data (constants) */
*(.rodata*)
*(.glue_7)
*(.glue_7t)
. = ALIGN(4);
*/ _etext = .; */
/* This is used by the startup in order to initialize the .data section */
} >FLASH
/* ARM magic sections */
.ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.
} > FLASH
/* .ARM.exidx is sorted, so has to go in its own output section. */
__exidx_start = .;
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.
} >FLASH
__exidx_end = .;
.text.align :
{
. = ALIGN(8);
_etext = .;
} >FLASH
/* Variable für die neue Toolchain */
__etext = .;
/*
* This address is used by the startup code to
* initialise the .data section.
*/
_sidata = _etext;
/* This is the initialized data section
/* The program executes knowing that the data is in the RAM but the loader puts the initial values in the FLASH (inidata). */
/* It is one task of the startup to copy the initial values from FLASH to RAM. */
/* The linker will normally set the LMA equal to the VMA. You can change that by using the AT keyword. */
.data : AT ( _sidata )
{
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
_sdata = . ;
/* STM specific definition */
*(vtable)
/* Exclude rdimon command line, to avoid loosing command line */
/* This is used by the startup code to initialise the .data section */
*(.data)
*(.data.*)
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
} >RAM
/* This is the data section to initialize with zeros */
.bss :
{
. = ALIGN(4);
/* This is used by the startup in order to initialize the .bss secion */
_sbss = .;
*(.bss)
*(COMMON)
. = ALIGN(4);
/* This is used by the startup in order to initialize the .bss secion */
_ebss = . ;
__bss_end__ = .;
} >RAM
.noinit (NOLOAD):
{
. = ALIGN(4);
_noinit = .;
*(.noinit .noinit.*)
. = ALIGN(4) ;
_end_noinit = .;
} > RAM
/* Mandatory to be word aligned, _sbrk assumes this */
PROVIDE ( end = _end_noinit ); /* was _ebss */
PROVIDE ( _end = _end_noinit );
PROVIDE ( __end = _end_noinit );
PROVIDE ( __end__ = _end_noinit );
.heap :
{
PROVIDE(
. = ALIGN(4);
*(.heap*)
. = ALIGN(4);
__HeapLimit = .;
PROVIDE(
} >RAM
/* This is the uninitialized data section */
.nvram :
{
. = ALIGN(4);
*(.nvram)
. = ALIGN(4);
} >RAM
/* Set stack top to end of RAM, and stack limit move down by
* size of stack_dummy section */
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
__StackLimit = __StackTop - 256;
PROVIDE(__stack = __StackTop);
/* Check if data + heap + stack exceeds RAM limit */
ASSERT(
/* Die Stacks für die Tasks des OS werden im CCMRAM abgelegt... */
OS_TASK_SIZE_IDLE = 2048;
OS_TASK_SIZE_STAT = 2048;
OS_TASK_
OS_TASK_
OS_TASK_SIZE_GPS = 2048;
OS_TASK_
OS_TASK_SIZE_COM = 3072;
OS_TASK_
OS_TASK_SIZE_SETUP = 8192;
OS_TASK_SIZE_TP = 4096;
OS_TASK_SIZE_KEY = 2048;
OS_TASK_SIZE_TOUCH = 4096;
OS_TASK_
OS_TASK_
OS_TASK_
OS_TASK_
OS_TASK_SIZE_TCPIP = 3072;
OS_TASK_SIZE_LED = 2048;
OS_TASK_
OS_TASK_SIZE_RTC = 2048;
/* Speicherbereich im CCMRAM, hier die definition der SECTION .cram*/
.cram :
{
. = ALIGN(4);
/* die ersten 8 Byte werden vom Urloader benutzt und dürfen daher NICHT verändert werden! */
. = . + 8;
PROVIDE( OS_TASK_STACK_IDLE = .); . = . + OS_TASK_SIZE_IDLE;
PROVIDE( OS_TASK_STACK_STAT = .); . = . + OS_TASK_SIZE_STAT;
PROVIDE( OS_TASK_
PROVIDE( OS_TASK_
PROVIDE( OS_TASK_STACK_GPS = .); . = . + OS_TASK_SIZE_GPS;
PROVIDE( OS_TASK_
PROVIDE( OS_TASK_STACK_COM = .); . = . + OS_TASK_SIZE_COM;
PROVIDE( OS_TASK_
PROVIDE( OS_TASK_STACK_SETUP = .); . = . + OS_TASK_SIZE_SETUP;
PROVIDE( OS_TASK_STACK_TP = .); . = . + OS_TASK_SIZE_TP;
PROVIDE( OS_TASK_STACK_KEY = .); . = . + OS_TASK_SIZE_KEY;
PROVIDE( OS_TASK_STACK_TOUCH = .); . = . + OS_TASK_SIZE_TOUCH;
PROVIDE( OS_TASK_
PROVIDE( OS_TASK_
PROVIDE( OS_TASK_
PROVIDE( OS_TASK_
PROVIDE( OS_TASK_STACK_TCPIP = .); . = . + OS_TASK_SIZE_TCPIP;
PROVIDE( OS_TASK_STACK_LED = .); . = . + OS_TASK_SIZE_LED;
PROVIDE( OS_TASK_
PROVIDE( OS_TASK_STACK_RTC = .); . = . + OS_TASK_SIZE_RTC;
/* deklariere _ecram mit der Endadresse von der SECTION .cram */
PROVIDE ( _ecram = . );
} >CCMRAM
/* after that it's only debugging information. */
/* remove the debugging information from the standard libraries */
DISCARD :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
}
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
/* DWARF debug sections.
/* Symbols in the DWARF debugging sections are relative to the beginning of the section so we begin them at 0. */
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
/* SGI/MIPS DWARF 2 extensions */
.debug_
.debug_
.debug_
.debug_varnames 0 : { *(.debug_varnames) }
}
Revision history for this message
|
#3 |
Maik,
I seem to understand your issue. The symbols you are looking at are actually BSS symbols, which should be initialized to zero at startup. Because their init values are all zero, they needn't be loaded from program image. Instead, you should have a piece of code in your startup to zero they out, or if you are using _start from libc as the entry point, it will initialize for you automatically.
Thanks,
Joey
Revision history for this message
|
#4 |
Hello Joey,
I use now the _start symbol, but the linker makes now the error _exit not found
Building target: evo4.3.elf
Invoking: Cross ARM C Linker
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -Os -fmessage-length=0 -fsigned-char -Wall -g3 -T "D:\Design\
d:/programme/
exit.c:
collect2.exe: error: ld returned 1 exit status
make: *** [evo4.3.elf] Error 1
Here my startup file
///////
/**
*****
* @file startup_
* @author MCD Application Team
* @version V1.3.0
* @date 08-November-2013
* @brief STM32F427xx/437xx Devices vector table for RIDE7 toolchain.
* This module performs:
* - Set the initial SP
* - Set the initial PC == Reset_Handler,
* - Set the vector table entries with the exceptions ISR address
* - Configure the clock system and the external SRAM mounted on
* STM324x7I-EVAL board to be used as data memory (optional,
* to be enabled by user)
* - Branches to main in the C library (which eventually
* calls main()).
* After Reset the Cortex-M4 processor is in Thread mode,
* priority is Privileged, and the Stack is set to Main.
*****
* @attention
*
* <h2><center>© COPYRIGHT 2013 STMicroelectron
*
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*****
*/
.syntax unified
.cpu cortex-m4
.arch armv7-m
.fpu softvfp
.thumb
.global g_pfnVectors
.global Default_Handler
/* start address for the initialization values of the .data section.
defined in linker script */
.word _sidata
/* start address for the .data section. defined in linker script */
.word _sdata
/* end address for the .data section. defined in linker script */
.word _edata
/* start address for the .bss section. defined in linker script */
.word _sbss
/* end address for the .bss section. defined in linker script */
.word _ebss
/* stack used for SystemInit_
/**
* @brief This is the code that gets called when the processor first
* starts execution following a reset event. Only the absolutely
* necessary set is performed, after which the application
* supplied main() routine is called.
* @param None
* @retval : None
*/
.section .text.Reset_Handler
.weak Reset_Handler
.type Reset_Handler, %function
Reset_Handler:
/* Copy the data segment initializers from flash to SRAM */
movs r1, #0
b LoopCopyDataInit
CopyDataInit:
ldr r3, =_sidata
ldr r3, [r3, r1]
str r3, [r0, r1]
adds r1, r1, #4
LoopCopyDataInit:
ldr r0, =_sdata
ldr r3, =_edata
adds r2, r0, r1
cmp r2, r3
bcc CopyDataInit
ldr r2, =_sbss
b LoopFillZerobss
/* Zero fill the bss segment. */
FillZerobss:
movs r3, #0
str r3, [r2], #4
LoopFillZerobss:
ldr r3, = _ebss
cmp r2, r3
bcc FillZerobss
/* Call the clock system intitialization function.*/
bl SystemInit
/* Call the application's entry point.*/
#ifndef __START
#define __START _start
#endif
bl __START
/* bl main */
bx lr
.size Reset_Handler, .-Reset_Handler
/**
* @brief This is the code that gets called when the processor receives an
* unexpected interrupt. This simply enters an infinite loop, preserving
* the system state for examination by a debugger.
* @param None
* @retval None
*/
.section .text.Default_
Default_Handler:
Infinite_Loop:
b Infinite_Loop
.size Default_Handler, .-Default_Handler
/******
*
* The minimal vector table for a Cortex M3. Note that the proper constructs
* must be placed on this to ensure that it ends up at physical address
* 0x0000.0000.
*
*******
.section .isr_vector,
.type g_pfnVectors, %object
.size g_pfnVectors, .-g_pfnVectors
g_pfnVectors:
.word _estack
.word Reset_Handler
.word NMI_Handler
.word HardFault_Handler
.word MemManage_Handler
.word BusFault_Handler
.word UsageFault_Handler
.word 0
.word 0
.word 0
.word 0
.word SVC_Handler
.word DebugMon_Handler
.word 0
.word OS_CPU_
.word SysTick_Handler
/* External Interrupts */
.word WWDG_IRQHandler /* Window WatchDog */
.word PVD_IRQHandler /* PVD through EXTI Line detection */
.word TAMP_STAMP_
.word RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */
.word FLASH_IRQHandler /* FLASH */
.word RCC_IRQHandler /* RCC */
.word EXTI0_IRQHandler /* EXTI Line0 */
.word EXTI1_IRQHandler /* EXTI Line1 */
.word EXTI2_IRQHandler /* EXTI Line2 */
.word EXTI3_IRQHandler /* EXTI Line3 */
.word EXTI4_IRQHandler /* EXTI Line4 */
.word DMA1_Stream0_
.word DMA1_Stream1_
.word DMA1_Stream2_
.word DMA1_Stream3_
.word DMA1_Stream4_
.word DMA1_Stream5_
.word DMA1_Stream6_
.word ADC_IRQHandler /* ADC1, ADC2 and ADC3s */
.word CAN1_TX_IRQHandler /* CAN1 TX */
.word CAN1_RX0_IRQHandler /* CAN1 RX0 */
.word CAN1_RX1_IRQHandler /* CAN1 RX1 */
.word CAN1_SCE_IRQHandler /* CAN1 SCE */
.word EXTI9_5_IRQHandler /* External Line[9:5]s */
.word TIM1_BRK_
.word TIM1_UP_
.word TIM1_TRG_
.word TIM1_CC_IRQHandler /* TIM1 Capture Compare */
.word TIM2_IRQHandler /* TIM2 */
.word TIM3_IRQHandler /* TIM3 */
.word TIM4_IRQHandler /* TIM4 */
.word I2C1_EV_IRQHandler /* I2C1 Event */
.word I2C1_ER_IRQHandler /* I2C1 Error */
.word I2C2_EV_IRQHandler /* I2C2 Event */
.word I2C2_ER_IRQHandler /* I2C2 Error */
.word SPI1_IRQHandler /* SPI1 */
.word SPI2_IRQHandler /* SPI2 */
.word USART1_IRQHandler /* USART1 */
.word USART2_IRQHandler /* USART2 */
.word USART3_IRQHandler /* USART3 */
.word EXTI15_
.word RTC_Alarm_
.word OTG_FS_
.word TIM8_BRK_
.word TIM8_UP_
.word TIM8_TRG_
.word TIM8_CC_IRQHandler /* TIM8 Capture Compare */
.word DMA1_Stream7_
.word FSMC_IRQHandler /* FSMC */
.word SDIO_IRQHandler /* SDIO */
.word TIM5_IRQHandler /* TIM5 */
.word SPI3_IRQHandler /* SPI3 */
.word UART4_IRQHandler /* UART4 */
.word UART5_IRQHandler /* UART5 */
.word TIM6_DAC_IRQHandler /* TIM6 and DAC1&2 underrun errors */
.word TIM7_IRQHandler /* TIM7 */
.word DMA2_Stream0_
.word DMA2_Stream1_
.word DMA2_Stream2_
.word DMA2_Stream3_
.word DMA2_Stream4_
.word ETH_IRQHandler /* Ethernet */
.word ETH_WKUP_IRQHandler /* Ethernet Wakeup through EXTI line */
.word CAN2_TX_IRQHandler /* CAN2 TX */
.word CAN2_RX0_IRQHandler /* CAN2 RX0 */
.word CAN2_RX1_IRQHandler /* CAN2 RX1 */
.word CAN2_SCE_IRQHandler /* CAN2 SCE */
.word OTG_FS_IRQHandler /* USB OTG FS */
.word DMA2_Stream5_
.word DMA2_Stream6_
.word DMA2_Stream7_
.word USART6_IRQHandler /* USART6 */
.word I2C3_EV_IRQHandler /* I2C3 event */
.word I2C3_ER_IRQHandler /* I2C3 error */
.word OTG_HS_
.word OTG_HS_
.word OTG_HS_
.word OTG_HS_IRQHandler /* USB OTG HS */
.word DCMI_IRQHandler /* DCMI */
.word CRYP_IRQHandler /* CRYP crypto */
.word HASH_RNG_IRQHandler /* Hash and Rng */
.word FPU_IRQHandler /* FPU */
.word UART7_IRQHandler /* UART7 */
.word UART8_IRQHandler /* UART8 */
.word SPI4_IRQHandler /* SPI4 */
.word SPI5_IRQHandler /* SPI5 */
.word SPI6_IRQHandler /* SPI6 */
.word SAI1_IRQHandler /* SAI1 */
.word LTDC_IRQHandler /* LTDC */
.word LTDC_ER_IRQHandler /* LTDC error */
.word DMA2D_IRQHandler /* DMA2D */
/******
*
* Provide weak aliases for each Exception handler to the Default_Handler.
* As they are weak aliases, any function with the same name will override
* this definition.
*
*******
.weak NMI_Handler
.thumb_set NMI_Handler,
.weak HardFault_Handler
.thumb_set HardFault_
.weak MemManage_Handler
.thumb_set MemManage_
.weak BusFault_Handler
.thumb_set BusFault_
.weak UsageFault_Handler
.thumb_set UsageFault_
.weak SVC_Handler
.thumb_set SVC_Handler,
.weak DebugMon_Handler
.thumb_set DebugMon_
.weak PendSV_Handler
.thumb_set PendSV_
.weak SysTick_Handler
.thumb_set SysTick_
.weak WWDG_IRQHandler
.thumb_set WWDG_IRQHandler
.weak PVD_IRQHandler
.thumb_set PVD_IRQHandler,
.weak TAMP_STAMP_
.thumb_set TAMP_STAMP_
.weak RTC_WKUP_IRQHandler
.thumb_set RTC_WKUP_
.weak FLASH_IRQHandler
.thumb_set FLASH_IRQHandle
.weak RCC_IRQHandler
.thumb_set RCC_IRQHandler,
.weak EXTI0_IRQHandler
.thumb_set EXTI0_IRQHandle
.weak EXTI1_IRQHandler
.thumb_set EXTI1_IRQHandle
.weak EXTI2_IRQHandler
.thumb_set EXTI2_IRQHandle
.weak EXTI3_IRQHandler
.thumb_set EXTI3_IRQHandle
.weak EXTI4_IRQHandler
.thumb_set EXTI4_IRQHandle
.weak DMA1_Stream0_
.thumb_set DMA1_Stream0_
.weak DMA1_Stream1_
.thumb_set DMA1_Stream1_
.weak DMA1_Stream2_
.thumb_set DMA1_Stream2_
.weak DMA1_Stream3_
.thumb_set DMA1_Stream3_
.weak DMA1_Stream4_
.thumb_set DMA1_Stream4_
.weak DMA1_Stream5_
.thumb_set DMA1_Stream5_
.weak DMA1_Stream6_
.thumb_set DMA1_Stream6_
.weak ADC_IRQHandler
.thumb_set ADC_IRQHandler,
.weak CAN1_TX_IRQHandler
.thumb_set CAN1_TX_
.weak CAN1_RX0_IRQHandler
.thumb_set CAN1_RX0_
.weak CAN1_RX1_IRQHandler
.thumb_set CAN1_RX1_
.weak CAN1_SCE_IRQHandler
.thumb_set CAN1_SCE_
.weak EXTI9_5_IRQHandler
.thumb_set EXTI9_5_
.weak TIM1_BRK_
.thumb_set TIM1_BRK_
.weak TIM1_UP_
.thumb_set TIM1_UP_
.weak TIM1_TRG_
.thumb_set TIM1_TRG_
.weak TIM1_CC_IRQHandler
.thumb_set TIM1_CC_
.weak TIM2_IRQHandler
.thumb_set TIM2_IRQHandler
.weak TIM3_IRQHandler
.thumb_set TIM3_IRQHandler
.weak TIM4_IRQHandler
.thumb_set TIM4_IRQHandler
.weak I2C1_EV_IRQHandler
.thumb_set I2C1_EV_
.weak I2C1_ER_IRQHandler
.thumb_set I2C1_ER_
.weak I2C2_EV_IRQHandler
.thumb_set I2C2_EV_
.weak I2C2_ER_IRQHandler
.thumb_set I2C2_ER_
.weak SPI1_IRQHandler
.thumb_set SPI1_IRQHandler
.weak SPI2_IRQHandler
.thumb_set SPI2_IRQHandler
.weak USART1_IRQHandler
.thumb_set USART1_
.weak USART2_IRQHandler
.thumb_set USART2_
.weak USART3_IRQHandler
.thumb_set USART3_
.weak EXTI15_
.thumb_set EXTI15_
.weak RTC_Alarm_
.thumb_set RTC_Alarm_
.weak OTG_FS_
.thumb_set OTG_FS_
.weak TIM8_BRK_
.thumb_set TIM8_BRK_
.weak TIM8_UP_
.thumb_set TIM8_UP_
.weak TIM8_TRG_
.thumb_set TIM8_TRG_
.weak TIM8_CC_IRQHandler
.thumb_set TIM8_CC_
.weak DMA1_Stream7_
.thumb_set DMA1_Stream7_
.weak FSMC_IRQHandler
.thumb_set FSMC_IRQHandler
.weak SDIO_IRQHandler
.thumb_set SDIO_IRQHandler
.weak TIM5_IRQHandler
.thumb_set TIM5_IRQHandler
.weak SPI3_IRQHandler
.thumb_set SPI3_IRQHandler
.weak UART4_IRQHandler
.thumb_set UART4_IRQHandle
.weak UART5_IRQHandler
.thumb_set UART5_IRQHandle
.weak TIM6_DAC_IRQHandler
.thumb_set TIM6_DAC_
.weak TIM7_IRQHandler
.thumb_set TIM7_IRQHandler
.weak DMA2_Stream0_
.thumb_set DMA2_Stream0_
.weak DMA2_Stream1_
.thumb_set DMA2_Stream1_
.weak DMA2_Stream2_
.thumb_set DMA2_Stream2_
.weak DMA2_Stream3_
.thumb_set DMA2_Stream3_
.weak DMA2_Stream4_
.thumb_set DMA2_Stream4_
.weak ETH_IRQHandler
.thumb_set ETH_IRQHandler,
.weak ETH_WKUP_IRQHandler
.thumb_set ETH_WKUP_
.weak CAN2_TX_IRQHandler
.thumb_set CAN2_TX_
.weak CAN2_RX0_IRQHandler
.thumb_set CAN2_RX0_
.weak CAN2_RX1_IRQHandler
.thumb_set CAN2_RX1_
.weak CAN2_SCE_IRQHandler
.thumb_set CAN2_SCE_
.weak OTG_FS_IRQHandler
.thumb_set OTG_FS_
.weak DMA2_Stream5_
.thumb_set DMA2_Stream5_
.weak DMA2_Stream6_
.thumb_set DMA2_Stream6_
.weak DMA2_Stream7_
.thumb_set DMA2_Stream7_
.weak USART6_IRQHandler
.thumb_set USART6_
.weak I2C3_EV_IRQHandler
.thumb_set I2C3_EV_
.weak I2C3_ER_IRQHandler
.thumb_set I2C3_ER_
.weak OTG_HS_
.thumb_set OTG_HS_
.weak OTG_HS_
.thumb_set OTG_HS_
.weak OTG_HS_
.thumb_set OTG_HS_
.weak OTG_HS_IRQHandler
.thumb_set OTG_HS_
.weak DCMI_IRQHandler
.thumb_set DCMI_IRQHandler
.weak CRYP_IRQHandler
.thumb_set CRYP_IRQHandler
.weak HASH_RNG_IRQHandler
.thumb_set HASH_RNG_
.weak FPU_IRQHandler
.thumb_set FPU_IRQHandler,
.weak UART7_IRQHandler
.thumb_set UART7_IRQHandle
.weak UART8_IRQHandler
.thumb_set UART8_IRQHandle
.weak SPI4_IRQHandler
.thumb_set SPI4_IRQHandler
.weak SPI5_IRQHandler
.thumb_set SPI5_IRQHandler
.weak SPI6_IRQHandler
.thumb_set SPI6_IRQHandler
.weak SAI1_IRQHandler
.thumb_set SAI1_IRQHandler
.weak LTDC_IRQHandler
.thumb_set LTDC_IRQHandler
.weak LTDC_ER_IRQHandler
.thumb_set LTDC_ER_
.weak DMA2D_IRQHandler
.thumb_set DMA2D_IRQHandle
/******
Revision history for this message
|
#5 |
Joey Ye suggests this article as an answer to your question:
FAQ #2519: “Missing _exit/_kill”.
Revision history for this message
|
#6 |
Hello Joey,
in FAQ #2519 is no solution for me. It is only the question not the answer.
If I not use '_start' symbol, with main a entry point I set __malloc_top_pad to zerro, and the heapsize to __malloc_
On systemstart it looks good, but the first malloc using _sbrk() change the variables
__malloc_
__malloc_
only __malloc_top_pad keeps the zerro
the secound access with malloc using _sbrk() change
__malloc_
__malloc_
the third access with malloc using _sbrk() change
__malloc_
__malloc_
-------
Can I work so ?
__attribute__ ((section(
extern int __malloc_top_pad;
extern int __malloc_
extern int __malloc_
void CPU_InitHeap(void)
{
heap_CPU = NULL;
memset(
_
_
_
}
Revision history for this message
|
#7 |
Maik,
I'm sorry the answer is at https:/
Yes of course you can write a CPU_InitHeap function to initlize it after _start. As _start only clean they to zero, your function will set them to correct runtime values.
Thanks,
Joey
Revision history for this message
|
#8 |
Hello Joey,
I did write me a little _exit function and it works. I think the _exit function will be not used for the stm32.
void _exit (int code)
{
NVIC_
}
greetings
Maik
Can you help with this problem?
Provide an answer of your own, or ask Maik Siebrand for more information if necessary.