ARMEBS4  revision-26.06.2015
Functions
Before main

functions called before main More...

Collaboration diagram for Before main:

Functions

static void init_ccm_ram (void)
 CCM RAM initialization. More...
 
static void interrupts_init (void)
 Interrupts initializations. More...
 
static void libc_init_array (void)
 Initialize newlib c++ runtime.
 
static void init_bss (void)
 zeroes the .bss section
 
static void init_data (void)
 Initialize (copy from flash) the .data section.
 
static void fix_rtc (void)
 
static void workaround_dfu_loader (void)
 Workaround DFU problem. More...
 
void Reset_Handler (void)
 Program start (at reset) More...
 

Detailed Description

functions called before main

Theses functions are used/called before main is called, to setup a standard run-time environment for the program.

Function Documentation

static void init_ccm_ram ( void  )
static

CCM RAM initialization.

The CCM (Core Coupled Memory) is a RAM only available for the CPU.

Warning
It is not available for other AHB masters (DMA).
It can not hold executable code (data only).

This function will copy .ccm_ram.data from flash and initialize .ccm_ram.bss sections.

Definition at line 53 of file startup_stm32f4xx.c.

References memcpy(), and memset().

Referenced by Reset_Handler().

Here is the call graph for this function:

Here is the caller graph for this function:

static void interrupts_init ( void  )
static

Interrupts initializations.

Vectors are copied from flash to RAM, so they can be updated at runtime.

Definition at line 73 of file startup_stm32f4xx.c.

References memcpy(), and NVIC_PriorityGroup_4.

Referenced by Reset_Handler().

Here is the call graph for this function:

Here is the caller graph for this function:

static void fix_rtc ( void  )
static

Start the RTC at 2000-01-01 00:00:00 when RTC is not running

Definition at line 148 of file startup_stm32f4xx.c.

Referenced by Reset_Handler().

Here is the caller graph for this function:

static void workaround_dfu_loader ( void  )
static

Workaround DFU problem.

The DFU USB bootloader disables the CCMDATARAMEN bit. This prevent booting from it, because we use the CCMRAM for the stack.

This workaround restores the reset state of the AHB1ENR register

Definition at line 172 of file startup_stm32f4xx.c.

Referenced by Reset_Handler().

Here is the caller graph for this function:

void Reset_Handler ( void  )

Program start (at reset)

See also
linker script ENTRY(Reset_Handler)

Definition at line 186 of file startup_stm32f4xx.c.

References ARRAY_SIZE, bsp_fatal(), bsp_init(), bsp_reset_reason_clear(), bsp_reset_reason_get(), bsp_reset_reason_init(), ERROR_TRACE_FAILED, exit(), fix_rtc(), init_bss(), init_ccm_ram(), init_data(), interrupts_init(), libc_init_array(), main(), NO_ERROR, and workaround_dfu_loader().

Here is the call graph for this function: