#include "sim_gdb.h"
#include "avr_uart.h"
#include "sim_vcd_file.h"
-#include "avr_mcu_section.h"
+#include "avr/avr_mcu_section.h"
#define AVR_KIND_DECL
#include "sim_core_decl.h"
#ifdef CONFIG_SIMAVR_TRACE
avr->trace_data = calloc(1, sizeof(struct avr_trace_data_t));
#endif
+
+ printf("%s init\n", avr->mmcu);
// cpu is in limbo before init is finished.
avr->state = cpu_Limbo;
{
if (avr->special_deinit)
avr->special_deinit(avr);
+ if (avr->gdb) {
+ avr_deinit_gdb(avr);
+ avr->gdb = NULL;
+ }
if (avr->vcd) {
avr_vcd_close(avr->vcd);
avr->vcd = NULL;
void avr_reset(avr_t * avr)
{
+ printf("%s reset\n", avr->mmcu);
+
memset(avr->data, 0x0, avr->ramend + 1);
_avr_sp_set(avr, avr->ramend);
avr->pc = 0;
if (!avr->sreg[S_I]) {
if (avr->log)
printf("simavr: sleeping with interrupts off, quitting gracefully\n");
- avr_terminate(avr);
avr->state = cpu_Done;
return;
}
if (!avr->sreg[S_I]) {
if (avr->log)
printf("simavr: sleeping with interrupts off, quitting gracefully\n");
- avr_terminate(avr);
avr->state = cpu_Done;
return;
}