Browse Source

Revert "Reduce PROGMEM warnings"

daid 9 years ago
parent
commit
53f971095d

+ 1
- 0
Marlin/Configuration.h View File

@@ -791,5 +791,6 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
791 791
 
792 792
 
793 793
 #include "Configuration_adv.h"
794
+#include "thermistortables.h"
794 795
 
795 796
 #endif //__CONFIGURATION_H

+ 6
- 6
Marlin/ConfigurationStore.cpp View File

@@ -423,14 +423,14 @@ void Config_RetrieveSettings()
423 423
 
424 424
 void Config_ResetDefault()
425 425
 {
426
-    const static float tmp1[] MARLIN_PROGMEM =DEFAULT_AXIS_STEPS_PER_UNIT;
427
-    const static float tmp2[] MARLIN_PROGMEM =DEFAULT_MAX_FEEDRATE;
428
-    const static long tmp3[] MARLIN_PROGMEM =DEFAULT_MAX_ACCELERATION;
426
+    float tmp1[]=DEFAULT_AXIS_STEPS_PER_UNIT;
427
+    float tmp2[]=DEFAULT_MAX_FEEDRATE;
428
+    long tmp3[]=DEFAULT_MAX_ACCELERATION;
429 429
     for (short i=0;i<4;i++) 
430 430
     {
431
-        axis_steps_per_unit[i]=pgm_read_float(&tmp1[i]);  
432
-        max_feedrate[i]=pgm_read_float(&tmp2[i]);  
433
-        max_acceleration_units_per_sq_second[i]=pgm_read_float(&tmp3[i]);
431
+        axis_steps_per_unit[i]=tmp1[i];  
432
+        max_feedrate[i]=tmp2[i];  
433
+        max_acceleration_units_per_sq_second[i]=tmp3[i];
434 434
 		#ifdef SCARA
435 435
 		axis_scaling[i]=1;
436 436
 		#endif//SCARA

+ 1
- 1
Marlin/LiquidCrystalRus.cpp View File

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

+ 0
- 19
Marlin/Marlin.h View File

@@ -41,25 +41,6 @@
41 41
 #include "HardwareSerial.h"
42 42
 #endif
43 43
 
44
-
45
-#ifdef __GNUC__
46
-#ifndef GCC_VERSION2
47
-#define GCC_VERSION2 (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
48
-#endif
49
-
50
-#if GCC_VERSION2 < 40602 // Test for GCC < 4.6.2
51
-#ifdef PROGMEM
52
-#define MARLIN_PROGMEM __attribute__((section(".progmem.data")))
53
-#ifdef PSTR
54
-#undef PSTR
55
-#define PSTR(s) (__extension__({static const prog_char __c[] MARLIN_PROGMEM = (s); &__c[0];})) // Copied from pgmspace.h in avr-libc source
56
-#endif
57
-#endif
58
-#endif
59
-#endif
60
-
61
-
62
-
63 44
 #include "MarlinSerial.h"
64 45
 
65 46
 #ifndef cbi

+ 3
- 3
Marlin/Marlin_main.cpp View File

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

+ 1
- 1
Marlin/planner.cpp View File

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

+ 4
- 4
Marlin/speed_lookuptable.h View File

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

+ 0
- 1
Marlin/temperature.cpp View File

@@ -33,7 +33,6 @@
33 33
 #include "ultralcd.h"
34 34
 #include "temperature.h"
35 35
 #include "watchdog.h"
36
-#include "thermistortables.h"
37 36
 
38 37
 #include "Sd2PinMap.h"
39 38
 

Loading…
Cancel
Save