OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | image |
struct | image_binary |
struct | image_elf |
struct | image_ihex |
struct | image_memory |
struct | image_mot |
struct | imagesection |
Macros | |
#define | ERROR_IMAGE_CHECKSUM (-1403) |
#define | ERROR_IMAGE_FORMAT_ERROR (-1400) |
#define | ERROR_IMAGE_TEMPORARILY_UNAVAILABLE (-1402) |
#define | ERROR_IMAGE_TYPE_UNKNOWN (-1401) |
#define | IMAGE_MAX_ERROR_STRING (256) |
#define | IMAGE_MAX_SECTIONS (512) |
#define | IMAGE_MEMORY_CACHE_SIZE (2048) |
Enumerations | |
enum | image_type { IMAGE_BINARY , IMAGE_IHEX , IMAGE_MEMORY , IMAGE_ELF , IMAGE_SRECORD , IMAGE_BUILDER } |
Functions | |
int | image_add_section (struct image *image, target_addr_t base, uint32_t size, uint64_t flags, uint8_t const *data) |
int | image_calculate_checksum (const uint8_t *buffer, uint32_t nbytes, uint32_t *checksum) |
void | image_close (struct image *image) |
int | image_open (struct image *image, const char *url, const char *type_string) |
int | image_read_section (struct image *image, int section, target_addr_t offset, uint32_t size, uint8_t *buffer, size_t *size_read) |
enum image_type |
int image_add_section | ( | struct image * | image, |
target_addr_t | base, | ||
uint32_t | size, | ||
uint64_t | flags, | ||
uint8_t const * | data | ||
) |
Definition at line 1160 of file image.c.
References imagesection::base_address, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, imagesection::flags, IMAGE_BUILDER, image::num_sections, imagesection::private, image::sections, size, imagesection::size, and image::type.
Referenced by gdb_v_packet().
int image_calculate_checksum | ( | const uint8_t * | buffer, |
uint32_t | nbytes, | ||
uint32_t * | checksum | ||
) |
Definition at line 1254 of file image.c.
References buffer, ERROR_OK, keep_alive(), and LOG_DEBUG.
Referenced by COMMAND_HELPER(), default_flash_verify(), qspi_verify(), and target_checksum_memory().
void image_close | ( | struct image * | image | ) |
Definition at line 1197 of file image.c.
References image_ihex::buffer, image_mot::buffer, image_memory::cache, image_binary::fileio, image_ihex::fileio, image_elf::fileio, image_mot::fileio, fileio_close(), image_elf::header32, image_elf::header64, IMAGE_BINARY, IMAGE_BUILDER, IMAGE_ELF, IMAGE_IHEX, IMAGE_MEMORY, IMAGE_SRECORD, image_elf::is_64_bit, NULL, image::num_sections, imagesection::private, image::sections, image_elf::segments32, image_elf::segments64, image::type, and image::type_private.
Referenced by COMMAND_HANDLER(), COMMAND_HELPER(), gdb_connection_closed(), gdb_v_packet(), load_usb_blaster_firmware(), and ulink_load_firmware().
int image_open | ( | struct image * | image, |
const char * | url, | ||
const char * | type_string | ||
) |
Definition at line 949 of file image.c.
References imagesection::base_address, image::base_address, image::base_address_set, image_memory::cache, image_memory::cache_address, ERROR_FAIL, ERROR_OK, image_binary::fileio, image_ihex::fileio, image_elf::fileio, image_mot::fileio, FILEIO_BINARY, fileio_close(), fileio_open(), FILEIO_READ, fileio_size(), FILEIO_TEXT, imagesection::flags, get_target(), identify_image_type(), IMAGE_BINARY, IMAGE_BUILDER, IMAGE_ELF, image_elf_read_headers(), IMAGE_IHEX, image_ihex_buffer_complete(), IMAGE_MEMORY, image_mot_buffer_complete(), IMAGE_SRECORD, LOG_ERROR, NULL, image::num_sections, image::sections, imagesection::size, target, image_memory::target, image::type, and image::type_private.
Referenced by COMMAND_HANDLER(), COMMAND_HELPER(), gdb_v_packet(), load_usb_blaster_firmware(), and ulink_load_firmware().
int image_read_section | ( | struct image * | image, |
int | section, | ||
target_addr_t | offset, | ||
uint32_t | size, | ||
uint8_t * | buffer, | ||
size_t * | size_read | ||
) |
Definition at line 1065 of file image.c.
References imagesection::base_address, buffer, image_memory::cache, image_memory::cache_address, ERROR_COMMAND_SYNTAX_ERROR, ERROR_IMAGE_TEMPORARILY_UNAVAILABLE, ERROR_OK, image_binary::fileio, fileio_read(), fileio_seek(), IMAGE_BINARY, IMAGE_BUILDER, IMAGE_ELF, image_elf_read_section(), IMAGE_IHEX, IMAGE_MEMORY, IMAGE_MEMORY_CACHE_SIZE, IMAGE_SRECORD, LOG_DEBUG, NULL, offset, imagesection::private, image::sections, size, imagesection::size, image_memory::target, TARGET_PRIxADDR, target_read_buffer(), image::type, and image::type_private.
Referenced by COMMAND_HANDLER(), COMMAND_HELPER(), etm_read_instruction(), flash_write_unlock_verify(), ublast2_write_firmware_section(), ulink_write_firmware_section(), and xscale_read_instruction().