int main(int argc, char *argv[])
{
- elf_firmware_t f;
+ elf_firmware_t f = {{0}};
const char * fname = "atmega32_ds1338.axf";
printf("Firmware pathname is %s\n", fname);
int argc,
char *argv[])
{
- elf_firmware_t f;
+ elf_firmware_t f = {{0}};
const char * fname = "atmega48_charlcd.axf";
// char path[256];
// sprintf(path, "%s/%s", dirname(argv[0]), fname);
int main(int argc, char *argv[])
{
- elf_firmware_t f;
+ elf_firmware_t f = {{0}};
const char * fname = "atmega1280_i2ctest.axf";
printf("Firmware pathname is %s\n", fname);
int main(int argc, char *argv[])
{
- elf_firmware_t f;
+ elf_firmware_t f = {{0}};;
const char * fname = "atmega48_ledramp.axf";
//char path[256];
int
main(int argc, char *argv[])
{
- elf_firmware_t f;
+ elf_firmware_t f = {{0}};
const char * fname = "atmega32_rotenc_test.axf";
printf(
int main(int argc, char *argv[])
{
- elf_firmware_t f;
+ elf_firmware_t f = {{0}};
const char * fname = "atmega168_timer_64led.axf";
//char path[256];
}
+/* The structure *firmware must be pre-initialised to zero, then optionally
+ * with tracing and VCD information.
+ */
+
int
elf_read_firmware(
const char * file,
Elf_Data *data_fuse = NULL;
Elf_Data *data_lockbits = NULL;
- memset(firmware, 0, sizeof(*firmware));
#if ELF_SYMBOLS
firmware->symbolcount = 0;
firmware->symbol = NULL;
#if ELF_SYMBOLS
avr_symbol_t ** symbol;
- uint32_t symbolcount;
+ uint32_t symbolcount;
#endif
} elf_firmware_t ;
+/* The structure *firmware must be pre-initialised to zero, then optionally
+ * with tracing and VCD information.
+ */
+
int
elf_read_firmware(
const char * file,
tests_cycle_count = 0;
map_stderr();
- elf_firmware_t fw;
+ elf_firmware_t fw = {{0}};
if (elf_read_firmware(elfname, &fw))
fail("Failed to read ELF firmware \"%s\"", elfname);
avr_t *avr = avr_make_mcu_by_name(fw.mmcu);