projects
/
simavr
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cores: Now duplicate the global structure
[simavr]
/
simavr
/
cores
/
sim_mega1281.c
diff --git
a/simavr/cores/sim_mega1281.c
b/simavr/cores/sim_mega1281.c
index
d0bbd5b
..
8ec486c
100644
(file)
--- a/
simavr/cores/sim_mega1281.c
+++ b/
simavr/cores/sim_mega1281.c
@@
-43,7
+43,7
@@
void m1281_reset(struct avr_t * avr);
/*
* This is a template for all of the 1281 devices, hopefully
*/
/*
* This is a template for all of the 1281 devices, hopefully
*/
-struct mcu_t {
+
const
struct mcu_t {
avr_t core;
avr_eeprom_t eeprom;
avr_flash_t selfprog;
avr_t core;
avr_eeprom_t eeprom;
avr_flash_t selfprog;
@@
-509,7
+509,7
@@
struct mcu_t {
static avr_t * make()
{
static avr_t * make()
{
-
return &mcu_mega1281.core
;
+
return avr_core_allocate(&mcu_mega1281.core, sizeof(struct mcu_t))
;
}
avr_kind_t mega1281 = {
}
avr_kind_t mega1281 = {