allow Marlin to actually compile with Makefile pulled from Sprinter and a few other modifications

This commit is contained in:
Michael Moon
2012-01-24 13:18:54 +11:00
parent 157aa7f2fd
commit 8d0916af13
5 changed files with 151 additions and 253 deletions

View File

@@ -14,7 +14,7 @@
#include <string.h>
#include <inttypes.h>
#include <avr/delay.h>
#include <util/delay.h>
#include <avr/pgmspace.h>
#include <avr/eeprom.h>
#include <avr/wdt.h>
@@ -55,7 +55,7 @@
// //# define MYPGM(s) (__extension__({static prog_char __c[] = (s); &__c[0];}))
// //#define MYPGM(s) ((const prog_char *g PROGMEM=s))
// //#define MYPGM(s) PSTR(s)
#define MYPGM(s) (__extension__({static char __c[] __attribute__((__progmem__)) = (s); &__c[0];})) //This is the normal behaviour
#define MYPGM(s) (__extension__({static const char __c[] __attribute__((__progmem__)) = (s); &__c[0];})) //This is the normal behaviour
//#define MYPGM(s) (__extension__({static prog_char __c[] = (s); &__c[0];})) //this does not work but hides the warnings