cores: Now duplicate the global structure
[simavr] / simavr / cores / sim_mega328.c
index 3ed50d0..83115f3 100644 (file)
@@ -33,7 +33,7 @@
 
 static avr_t * make()
 {
-       return &SIM_CORENAME.core;
+       return avr_core_allocate(&SIM_CORENAME.core, sizeof(struct mcu_t));
 }
 
 avr_kind_t mega328 = {