SimAVR
AVR Simulator
sim_hex.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sim_hex.h"
Include dependency graph for sim_hex.c:

Functions

void hdump (const char *w, uint8_t *b, size_t l)
 Hex dump from pointer 'b' for 'l' bytes with string prefix 'w'. More...
 
int read_hex_string (const char *src, uint8_t *buffer, int maxlen)
 Parses a hex text string 'src' of at max 'maxlen' characters, decodes it into 'buffer'. More...
 
uint8_t * read_ihex_file (const char *fname, uint32_t *dsize, uint32_t *start)
 Reads IHEX file 'fname', puts it's decoded size in *'dsize' and returns a newly allocated buffer with the binary data (or NULL, if error) More...
 
int read_ihex_chunks (const char *fname, ihex_chunk_p *chunks)
 Read a .hex file, detects the various different chunks in it from their starting addresses and allocate an array of ihex_chunk_t returned in 'chunks'. More...