CMSIS2000  0.0.7
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
uboot_file.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define flash_addr_t   unsigned int
 type of address bus in MCU
#define HAS_FULL_IMAGE   0
#define HAS_HDR_ONLY   (!(HAS_FULL_IMAGE))

Functions

flash_addr_t find_uboot_file (flash_addr_t search_start_address, flash_addr_t search_end_address)
 Search uboot image in MCU bus address space and check CRC.
unsigned int uboot_check_image_at_addr (const void *const addr, char only_header)
flash_addr_t uboot_file_get_load_addr (flash_addr_t src_address)
 get load uboot image address at RAM
flash_addr_t uboot_file_load (flash_addr_t src_address)
 load uboot image to RAM on MCU bus (memcpy)

Macro Definition Documentation

#define flash_addr_t   unsigned int

type of address bus in MCU

Definition at line 42 of file uboot_file.h.

Referenced by find_uboot_file(), main(), uboot_check_image_not_aligned(), and uboot_file_load().

#define HAS_FULL_IMAGE   0

Definition at line 76 of file uboot_file.h.

Referenced by find_uboot_file(), and uboot_check_image_not_aligned().

#define HAS_HDR_ONLY   (!(HAS_FULL_IMAGE))

Definition at line 77 of file uboot_file.h.

Referenced by check_size_and_header().

Function Documentation

flash_addr_t find_uboot_file ( flash_addr_t  search_start_address,
flash_addr_t  search_end_address 
)

Search uboot image in MCU bus address space and check CRC.

Returns
(-1) if not found

Definition at line 48 of file uboot_file.c.

References flash_addr_t, HAS_FULL_IMAGE, IMAGE_STEP, uboot_check_image_at_addr(), and uboot_check_image_not_aligned().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int uboot_check_image_at_addr ( const void *const  addr,
char  only_header 
)

Definition at line 77 of file uboot_file.c.

References endif(), IH_ARCH_DEFAULT, image_check_arch(), image_check_hcrc(), and image_check_magic().

Referenced by check_size_and_header(), find_uboot_file(), and uboot_check_image_not_aligned().

Here is the call graph for this function:

Here is the caller graph for this function:

flash_addr_t uboot_file_get_load_addr ( flash_addr_t  src_address)

get load uboot image address at RAM

Returns
destination address of load image in RAM

Definition at line 156 of file uboot_file.c.

Referenced by main().

Here is the caller graph for this function:

flash_addr_t uboot_file_load ( flash_addr_t  src_address)

load uboot image to RAM on MCU bus (memcpy)

Returns
address of run point or -1 if something goes wrong

Definition at line 136 of file uboot_file.c.

References flash_addr_t, IH_COMP_LZO, IH_COMP_NONE, image_get_data(), image_get_data_size(), and round_down_pointer().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function: