CMSIS2000  0.0.7
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
uboot_load_file.c File Reference
#include "ff.h"
#include "lpc17xx.h"
#include "lpc17xx_iap.h"
#include "uboot_load_file.h"
#include "uboot_image_format_adapted.h"
Include dependency graph for uboot_load_file.c:

Go to the source code of this file.

Macros

#define BUFF_SIZE   ((int)IAP_WRITE_1024)
#define FLASH_PROG_AREA_START   0x0000
#define INTERNAL_SRAM_BUFF_ADRESS   (LPC_RAM_BASE+0x8000-BUFF_SIZE)
#define NO_ALIGNED_ACCES   -10001
#define sbuffer   ((const void *) INTERNAL_SRAM_BUFF_ADRESS)

Functions

static int check_size_and_header (FIL *fil, const unsigned char *buf)
int load_uboot_file (FIL *fil, flash_addr_t free_area_adress)

Macro Definition Documentation

#define BUFF_SIZE   ((int)IAP_WRITE_1024)

Definition at line 50 of file uboot_load_file.c.

Referenced by check_size_and_header(), and load_uboot_file().

#define FLASH_PROG_AREA_START   0x0000

Definition at line 46 of file uboot_load_file.c.

Referenced by load_uboot_file().

#define INTERNAL_SRAM_BUFF_ADRESS   (LPC_RAM_BASE+0x8000-BUFF_SIZE)

Definition at line 55 of file uboot_load_file.c.

#define NO_ALIGNED_ACCES   -10001

Definition at line 59 of file uboot_load_file.c.

#define sbuffer   ((const void *) INTERNAL_SRAM_BUFF_ADRESS)

Definition at line 65 of file uboot_load_file.c.

Referenced by load_uboot_file().

Function Documentation

static int check_size_and_header ( FIL fil,
const unsigned char *  buf 
)
static

Definition at line 110 of file uboot_load_file.c.

References BUFF_SIZE, f_read(), HAS_HDR_ONLY, and uboot_check_image_at_addr().

Referenced by load_uboot_file().

Here is the call graph for this function:

Here is the caller graph for this function:

int load_uboot_file ( FIL fil,
flash_addr_t  free_area_adress 
)

Definition at line 66 of file uboot_load_file.c.

References BUFF_SIZE, check_size_and_header(), f_read(), FLASH_PROG_AREA_START, NULL, and sbuffer.

Referenced by load_file_from_external_source_to().

Here is the call graph for this function:

Here is the caller graph for this function: