From 5cf4f8ceb58dc49256ccffba905d8fb0dbdda55d Mon Sep 17 00:00:00 2001 From: Min Date: Thu, 11 Feb 2021 21:48:39 +0000 Subject: [PATCH] Quick fix for #1 --- emulator/devices/utilities.c | 3 ++- emulator/python/py_functions.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/emulator/devices/utilities.c b/emulator/devices/utilities.c index 229a883..523faa3 100755 --- a/emulator/devices/utilities.c +++ b/emulator/devices/utilities.c @@ -41,7 +41,7 @@ void load_bootloader(uint16_t virt_addr) int load_firmware(Emulator *emu, char *file_name, uint16_t virt_addr) { uint32_t size, result; - char str[100] = {0}; + char str[277] = {0}; sprintf(str, "Loading firmware: ( %s )\n", file_name); @@ -79,6 +79,7 @@ int load_firmware(Emulator *emu, char *file_name, uint16_t virt_addr) print_console(emu, str); fclose(fd); + return 0; } uint16_t *get_stack_ptr(Emulator *emu) diff --git a/emulator/python/py_functions.c b/emulator/python/py_functions.c index 74ba0d8..67dce76 100644 --- a/emulator/python/py_functions.c +++ b/emulator/python/py_functions.c @@ -150,6 +150,8 @@ void start_emu(char *file) { setup_port_1(emuInst); setup_usci(emuInst); + print_console(emuInst, " [MSP430 Emulator]\n Copyright (C) 2020 Rudolf Geosits (rgeosits@live.esu.edu)\n"); + load_bootloader(0x0C00); if(load_firmware(emuInst, file, 0xC000) == 0) { // display_registers(emuInst);