cores: Now duplicate the global structure
[simavr] / simavr / cores / sim_tiny25.c
1 /*
2         sim_tiny25.c
3
4         Copyright 2008, 2009 Michel Pollet <buserror@gmail.com>
5                              Jon Escombe <lists@dresco.co.uk>
6
7         This file is part of simavr.
8
9         simavr is free software: you can redistribute it and/or modify
10         it under the terms of the GNU General Public License as published by
11         the Free Software Foundation, either version 3 of the License, or
12         (at your option) any later version.
13
14         simavr is distributed in the hope that it will be useful,
15         but WITHOUT ANY WARRANTY; without even the implied warranty of
16         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17         GNU General Public License for more details.
18
19         You should have received a copy of the GNU General Public License
20         along with simavr.  If not, see <http://www.gnu.org/licenses/>.
21  */
22
23 #include "sim_avr.h"
24
25 #define SIM_VECTOR_SIZE 2
26 #define SIM_MMCU                "attiny25"
27 #define SIM_CORENAME    mcu_tiny25
28
29 #define _AVR_IO_H_
30 #define __ASSEMBLER__
31 #include "avr/iotn25.h"
32 // instanciate the new core
33 #include "sim_tinyx5.h"
34
35 static avr_t * make()
36 {
37         return avr_core_allocate(&SIM_CORENAME.core, sizeof(struct mcu_t));
38 }
39
40 avr_kind_t tiny25 = {
41         .names = { "attiny25" },
42         .make = make
43 };
44