From: Michel Pollet Date: Wed, 13 Aug 2014 22:13:04 +0000 (+0100) Subject: cores; 128rfr2, tiny84 and megax8, temp fix for bad arv-libc headers X-Git-Tag: v1.3~75 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=7704ffecff6cb223aff0d309260e12cc73f8dbda;p=sx%2Fsimavr.git cores; 128rfr2, tiny84 and megax8, temp fix for bad arv-libc headers Temporary, to make the build work. Seems the latest avr-libc in debian is rather mangled. Signed-off-by: Michel Pollet --- diff --git a/simavr/cores/sim_mega128rfr2.c b/simavr/cores/sim_mega128rfr2.c index d4c8183..2b0aab2 100644 --- a/simavr/cores/sim_mega128rfr2.c +++ b/simavr/cores/sim_mega128rfr2.c @@ -41,6 +41,32 @@ void m128rfr2_reset(struct avr_t * avr); #define __ASSEMBLER__ #include "avr/iom128rfr2.h" +/* + * Temporary hack for mangled avr-libc headers + */ +#ifndef PB7 +#define PB4 4 +#define PB5 5 +#define PB6 6 +#define PB7 7 +#endif +#ifndef PD0 +#define PD0 0 +#define PD1 1 +#define PD2 2 +#define PD3 3 +#define PD4 4 +#endif +#ifndef PE3 +#define PE3 3 +#define PE4 4 +#define PE5 5 +#define PE6 6 +#define PE7 7 +#endif +#ifndef PG5 +#define PG5 5 +#endif /* * This is a template for all of the 128rfr2 devices, hopefully */ diff --git a/simavr/cores/sim_megax8.h b/simavr/cores/sim_megax8.h index ea32478..a1b2562 100644 --- a/simavr/cores/sim_megax8.h +++ b/simavr/cores/sim_megax8.h @@ -64,6 +64,12 @@ struct mcu_t { #error SIM_MMCU is not declared #endif +/* Termporary hack for mega 324 due to mangled headers */ +#ifdef _AVR_IOM328P_H_ +#undef EFUSE_DEFAULT +#define EFUSE_DEFAULT 0 +#endif + const struct mcu_t SIM_CORENAME = { .core = { .mmcu = SIM_MMCU, diff --git a/simavr/cores/sim_tiny84.c b/simavr/cores/sim_tiny84.c index 3aa914e..fa4cb25 100644 --- a/simavr/cores/sim_tiny84.c +++ b/simavr/cores/sim_tiny84.c @@ -29,7 +29,11 @@ #define _AVR_IO_H_ #define __ASSEMBLER__ #include "avr/iotn84.h" + +#ifndef HFUSE_DEFAULT #define HFUSE_DEFAULT FUSE_HFUSE_DEFAULT +#endif + // instantiate the new core #include "sim_tinyx4.h"