ARMEBS4  revision-26.06.2015
Data Structures | Functions | Variables
startup_stm32f4xx.c File Reference

startup file for stm32f4xx More...

#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "stm32/system_stm32f4xx.h"
#include "stm32/stm32f4xx_misc.h"
#include "stm32/stm32f4xx_rcc.h"
#include "heivs/error.h"
#include "heivs/bsp.h"
#include "heivs/delay.h"
#include "heivs/config.h"
#include <time.h>
#include <sys/time.h>
Include dependency graph for startup_stm32f4xx.c:

Go to the source code of this file.

Data Structures

struct  vector_table_t
 

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...
 
void HardFaultHelper (volatile struct hardfault_regs_t *regs_when_hardfault)
 

Variables

uint32_t _stack_start
 Stack base, set by the linker script.
 
const struct vector_table_t gVectors
 The vector table, placed in the .isr_vector section. More...
 

Detailed Description

startup file for stm32f4xx

Author
marc dot pignat at hevs dot ch

ARM Holdings said there is no need for assembly with Cortex-Mx, so here is the startup code, entirely in C ;)

Warning
The only thing that is ready before Reset is the stack. .bss and .data sections aren't ready.
The syntax is GCC specific, but in any case the assembler syntax is not portable
This file is heavily dependent on the linker scrpit and on newlib

Definition in file startup_stm32f4xx.c.

Function Documentation

void HardFaultHelper ( volatile struct hardfault_regs_t *  regs_when_hardfault)

Default weak handlers for all interrupts and exceptions.

Real handlers will be set by NVIC_Init()

Definition at line 448 of file startup_stm32f4xx.c.

References breakpoint, bsp_fatal(), debugger_is_connected, and ERROR_BAD_STATE.

Here is the call graph for this function:

Variable Documentation

const struct vector_table_t gVectors

The vector table, placed in the .isr_vector section.

This table will be placed by the linker at the beginning of the flash, which is mapped to address 0x00000000 when the boot0 pin is at zero.

Definition at line 611 of file startup_stm32f4xx.c.