Removing compiler warnings for progmem

master
odewdney 10 years ago
parent 652895d656
commit 538859669d

@ -369,14 +369,14 @@ void Config_RetrieveSettings()
void Config_ResetDefault() void Config_ResetDefault()
{ {
float tmp1[]=DEFAULT_AXIS_STEPS_PER_UNIT; const static float tmp1[] MARLIN_PROGMEM =DEFAULT_AXIS_STEPS_PER_UNIT;
float tmp2[]=DEFAULT_MAX_FEEDRATE; const static float tmp2[] MARLIN_PROGMEM =DEFAULT_MAX_FEEDRATE;
long tmp3[]=DEFAULT_MAX_ACCELERATION; const static long tmp3[] MARLIN_PROGMEM =DEFAULT_MAX_ACCELERATION;
for (short i=0;i<4;i++) for (short i=0;i<4;i++)
{ {
axis_steps_per_unit[i]=tmp1[i]; axis_steps_per_unit[i]=pgm_read_float(&tmp1[i]);
max_feedrate[i]=tmp2[i]; max_feedrate[i]=pgm_read_float(&tmp2[i]);
max_acceleration_units_per_sq_second[i]=tmp3[i]; max_acceleration_units_per_sq_second[i]=pgm_read_float(&tmp3[i]);
#ifdef SCARA #ifdef SCARA
axis_scaling[i]=1; axis_scaling[i]=1;
#endif #endif

@ -13,7 +13,7 @@
// it is a Russian alphabet translation // it is a Russian alphabet translation
// except 0401 --> 0xa2 = ╗, 0451 --> 0xb5 // except 0401 --> 0xa2 = ╗, 0451 --> 0xb5
const PROGMEM uint8_t utf_recode[] = const prog_uint8_t utf_recode[] PROGMEM =
{ 0x41,0xa0,0x42,0xa1,0xe0,0x45,0xa3,0xa4,0xa5,0xa6,0x4b,0xa7,0x4d,0x48,0x4f, { 0x41,0xa0,0x42,0xa1,0xe0,0x45,0xa3,0xa4,0xa5,0xa6,0x4b,0xa7,0x4d,0x48,0x4f,
0xa8,0x50,0x43,0x54,0xa9,0xaa,0x58,0xe1,0xab,0xac,0xe2,0xad,0xae,0x62,0xaf,0xb0,0xb1, 0xa8,0x50,0x43,0x54,0xa9,0xaa,0x58,0xe1,0xab,0xac,0xe2,0xad,0xae,0x62,0xaf,0xb0,0xb1,
0x61,0xb2,0xb3,0xb4,0xe3,0x65,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0x6f, 0x61,0xb2,0xb3,0xb4,0xe3,0x65,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0x6f,

@ -46,16 +46,17 @@
#if GCC_VERSION2 < 40602 // Test for GCC < 4.6.2 #if GCC_VERSION2 < 40602 // Test for GCC < 4.6.2
#ifdef PROGMEM #ifdef PROGMEM
#undef PROGMEM #define MARLIN_PROGMEM __attribute__((section(".progmem.data")))
#define PROGMEM __attribute__((section(".progmem.data"))) // Workaround for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34734#c4
#ifdef PSTR #ifdef PSTR
#undef PSTR #undef PSTR
#define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0];})) // Copied from pgmspace.h in avr-libc source #define PSTR(s) (__extension__({static const prog_char __c[] MARLIN_PROGMEM = (s); &__c[0];})) // Copied from pgmspace.h in avr-libc source
#endif #endif
#endif #endif
#endif #endif
#endif #endif
#include "MarlinSerial.h" #include "MarlinSerial.h"
#ifndef cbi #ifndef cbi

@ -338,8 +338,8 @@ bool cancel_heatup = false ;
int meas_delay_cm = MEASUREMENT_DELAY_CM; //distance delay setting int meas_delay_cm = MEASUREMENT_DELAY_CM; //distance delay setting
#endif #endif
const char errormagic[] PROGMEM = "Error:"; const prog_char errormagic[] MARLIN_PROGMEM = "Error:";
const char echomagic[] PROGMEM = "echo:"; const prog_char echomagic[] MARLIN_PROGMEM = "echo:";
//=========================================================================== //===========================================================================
//=============================Private Variables============================= //=============================Private Variables=============================
@ -865,7 +865,7 @@ DEFINE_PGM_READ_ANY(float, float);
DEFINE_PGM_READ_ANY(signed char, byte); DEFINE_PGM_READ_ANY(signed char, byte);
#define XYZ_CONSTS_FROM_CONFIG(type, array, CONFIG) \ #define XYZ_CONSTS_FROM_CONFIG(type, array, CONFIG) \
static const PROGMEM type array##_P[3] = \ static const type array##_P[3] MARLIN_PROGMEM = \
{ X_##CONFIG, Y_##CONFIG, Z_##CONFIG }; \ { X_##CONFIG, Y_##CONFIG, Z_##CONFIG }; \
static inline type array(int axis) \ static inline type array(int axis) \
{ return pgm_read_any(&array##_P[axis]); } { return pgm_read_any(&array##_P[axis]); }

@ -80,7 +80,7 @@ unsigned long axis_steps_per_sqr_second[NUM_AXIS];
matrix_3x3 plan_bed_level_matrix = { matrix_3x3 plan_bed_level_matrix = {
1.0, 0.0, 0.0, 1.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 1.0, 0.0, 0.0, 1.0
}; };
#endif // #ifdef ENABLE_AUTO_BED_LEVELING #endif // #ifdef ENABLE_AUTO_BED_LEVELING

@ -5,7 +5,7 @@
#if F_CPU == 16000000 #if F_CPU == 16000000
const uint16_t speed_lookuptable_fast[256][2] PROGMEM = {\ const prog_uint16_t speed_lookuptable_fast[256][2] MARLIN_PROGMEM = {\
{ 62500, 55556}, { 6944, 3268}, { 3676, 1176}, { 2500, 607}, { 1893, 369}, { 1524, 249}, { 1275, 179}, { 1096, 135}, { 62500, 55556}, { 6944, 3268}, { 3676, 1176}, { 2500, 607}, { 1893, 369}, { 1524, 249}, { 1275, 179}, { 1096, 135},
{ 961, 105}, { 856, 85}, { 771, 69}, { 702, 58}, { 644, 49}, { 595, 42}, { 553, 37}, { 516, 32}, { 961, 105}, { 856, 85}, { 771, 69}, { 702, 58}, { 644, 49}, { 595, 42}, { 553, 37}, { 516, 32},
{ 484, 28}, { 456, 25}, { 431, 23}, { 408, 20}, { 388, 19}, { 369, 16}, { 353, 16}, { 337, 14}, { 484, 28}, { 456, 25}, { 431, 23}, { 408, 20}, { 388, 19}, { 369, 16}, { 353, 16}, { 337, 14},
@ -40,7 +40,7 @@ const uint16_t speed_lookuptable_fast[256][2] PROGMEM = {\
{ 31, 0}, { 31, 0}, { 31, 0}, { 31, 1}, { 30, 0}, { 30, 0}, { 30, 0}, { 30, 0} { 31, 0}, { 31, 0}, { 31, 0}, { 31, 1}, { 30, 0}, { 30, 0}, { 30, 0}, { 30, 0}
}; };
const uint16_t speed_lookuptable_slow[256][2] PROGMEM = {\ const prog_uint16_t speed_lookuptable_slow[256][2] MARLIN_PROGMEM = {\
{ 62500, 12500}, { 50000, 8334}, { 41666, 5952}, { 35714, 4464}, { 31250, 3473}, { 27777, 2777}, { 25000, 2273}, { 22727, 1894}, { 62500, 12500}, { 50000, 8334}, { 41666, 5952}, { 35714, 4464}, { 31250, 3473}, { 27777, 2777}, { 25000, 2273}, { 22727, 1894},
{ 20833, 1603}, { 19230, 1373}, { 17857, 1191}, { 16666, 1041}, { 15625, 920}, { 14705, 817}, { 13888, 731}, { 13157, 657}, { 20833, 1603}, { 19230, 1373}, { 17857, 1191}, { 16666, 1041}, { 15625, 920}, { 14705, 817}, { 13888, 731}, { 13157, 657},
{ 12500, 596}, { 11904, 541}, { 11363, 494}, { 10869, 453}, { 10416, 416}, { 10000, 385}, { 9615, 356}, { 9259, 331}, { 12500, 596}, { 11904, 541}, { 11363, 494}, { 10869, 453}, { 10416, 416}, { 10000, 385}, { 9615, 356}, { 9259, 331},
@ -77,7 +77,7 @@ const uint16_t speed_lookuptable_slow[256][2] PROGMEM = {\
#elif F_CPU == 20000000 #elif F_CPU == 20000000
const uint16_t speed_lookuptable_fast[256][2] PROGMEM = { const uint16_t speed_lookuptable_fast[256][2] MARLIN_PROGMEM = {
{62500, 54055}, {8445, 3917}, {4528, 1434}, {3094, 745}, {2349, 456}, {1893, 307}, {1586, 222}, {1364, 167}, {62500, 54055}, {8445, 3917}, {4528, 1434}, {3094, 745}, {2349, 456}, {1893, 307}, {1586, 222}, {1364, 167},
{1197, 131}, {1066, 105}, {961, 86}, {875, 72}, {803, 61}, {742, 53}, {689, 45}, {644, 40}, {1197, 131}, {1066, 105}, {961, 86}, {875, 72}, {803, 61}, {742, 53}, {689, 45}, {644, 40},
{604, 35}, {569, 32}, {537, 28}, {509, 25}, {484, 23}, {461, 21}, {440, 19}, {421, 17}, {604, 35}, {569, 32}, {537, 28}, {509, 25}, {484, 23}, {461, 21}, {440, 19}, {421, 17},
@ -112,7 +112,7 @@ const uint16_t speed_lookuptable_fast[256][2] PROGMEM = {
{39, 0}, {39, 0}, {39, 1}, {38, 0}, {38, 0}, {38, 0}, {38, 0}, {38, 0}, {39, 0}, {39, 0}, {39, 1}, {38, 0}, {38, 0}, {38, 0}, {38, 0}, {38, 0},
}; };
const uint16_t speed_lookuptable_slow[256][2] PROGMEM = { const uint16_t speed_lookuptable_slow[256][2] MARLIN_PROGMEM = {
{62500, 10417}, {52083, 7441}, {44642, 5580}, {39062, 4340}, {34722, 3472}, {31250, 2841}, {28409, 2368}, {26041, 2003}, {62500, 10417}, {52083, 7441}, {44642, 5580}, {39062, 4340}, {34722, 3472}, {31250, 2841}, {28409, 2368}, {26041, 2003},
{24038, 1717}, {22321, 1488}, {20833, 1302}, {19531, 1149}, {18382, 1021}, {17361, 914}, {16447, 822}, {15625, 745}, {24038, 1717}, {22321, 1488}, {20833, 1302}, {19531, 1149}, {18382, 1021}, {17361, 914}, {16447, 822}, {15625, 745},
{14880, 676}, {14204, 618}, {13586, 566}, {13020, 520}, {12500, 481}, {12019, 445}, {11574, 414}, {11160, 385}, {14880, 676}, {14204, 618}, {13586, 566}, {13020, 520}, {12500, 481}, {12019, 445}, {11574, 414}, {11160, 385},

@ -33,6 +33,7 @@
#include "ultralcd.h" #include "ultralcd.h"
#include "temperature.h" #include "temperature.h"
#include "watchdog.h" #include "watchdog.h"
#include "thermistortables.h"
#include "Sd2PinMap.h" #include "Sd2PinMap.h"

Loading…
Cancel
Save