Browse Source

one step closer to a functional makefile..

Bernhard 13 years ago
parent
commit
11f2dafc4e
4 changed files with 41 additions and 16 deletions
  1. 32
    14
      Marlin/Makefile
  2. 0
    1
      Marlin/SdFile.cpp
  3. 8
    0
      Marlin/ultralcd.h
  4. 1
    1
      Marlin/ultralcd.pde

+ 32
- 14
Marlin/Makefile View File

26
 ############################################################################
26
 ############################################################################
27
 # Below here nothing should be changed...
27
 # Below here nothing should be changed...
28
 
28
 
29
+LINKORDER=\
30
+applet/Marlin.cpp.o \
31
+applet/EEPROM.o  \
32
+applet/main.o \
33
+applet/MarlinSerial.o \
34
+applet/motion_control.o\
35
+applet/pins_arduino.o\
36
+applet/planner.o\
37
+applet/Print.o\
38
+applet/Sd2Card.o\
39
+applet/SdBaseFile.o\
40
+applet/SdFatUtil.o\
41
+applet/SdFile.o\
42
+applet/SdVolume.o\
43
+applet/stepper.o\
44
+applet/temperature.o\
45
+applet/WInterrupts.o\
46
+applet/wiring_analog.o\
47
+applet/wiring_digital.o\
48
+applet/wiring.o\
49
+applet/wiring_pulse.o\
50
+applet/wiring_shift.o\
51
+applet/WMath.o
52
+
53
+PDES=Marlin.pde  ultralcd.pde  watchdog.pde cardreader.pde  
29
 ARDUINO = $(INSTALL_DIR)/hardware/arduino/cores/arduino
54
 ARDUINO = $(INSTALL_DIR)/hardware/arduino/cores/arduino
30
 #
55
 #
31
 #~ AVR_TOOLS_PATH = $(INSTALL_DIR)/hardware/tools/avr/bin
56
 #~ AVR_TOOLS_PATH = $(INSTALL_DIR)/hardware/tools/avr/bin
67
 CINCS = -I$(ARDUINO) -I$(INSTALL_DIR)/libraries/LiquidCrystal/ -I$(INSTALL_DIR)/libraries/EEPROM/
92
 CINCS = -I$(ARDUINO) -I$(INSTALL_DIR)/libraries/LiquidCrystal/ -I$(INSTALL_DIR)/libraries/EEPROM/
68
 CXXINCS = -I$(ARDUINO)
93
 CXXINCS = -I$(ARDUINO)
69
 
94
 
70
-OBJECTS= applet/Marlin.cpp.o \
71
-         applet/EEPROM.o       \
72
-         applet/pins_arduino.o  \
73
-         applet/wiring_analog.o   \
74
-         applet/wiring_pulse.o \
75
-         applet/main.o        \
76
-         applet/Print.o         \
77
-         applet/wiring_digital.o  \
78
-         applet/wiring_shift.o   \
79
-         applet/stepper.o       \
80
-         applet/wiring.o   \
81
-         applet/WMath.o 
82
 # Compiler flag to set the C Standard level.
95
 # Compiler flag to set the C Standard level.
83
 # c89 - "ANSI" C
96
 # c89 - "ANSI" C
84
 # gnu89 - c89 plus GCC extensions
97
 # gnu89 - c89 plus GCC extensions
141
 # and then, match to corresponding rule somehow?
154
 # and then, match to corresponding rule somehow?
142
 # or leave this - and parse in rule (auth automatic variable $(@F))?
155
 # or leave this - and parse in rule (auth automatic variable $(@F))?
143
 # "Suffix Replacement"
156
 # "Suffix Replacement"
157
+CXXSRC+=MarlinSerial.cpp    SdBaseFile.cpp  stepper.cpp motion_control.cpp SdFatUtil.cpp temperature.cpp planner.cpp SdFile.cpp Sd2Card.cpp SdVolume.cpp
144
 OBJ = $(SRC:.c=.o) $(CXXSRC:.cpp=.o) $(ASRC:.S=.o)
158
 OBJ = $(SRC:.c=.o) $(CXXSRC:.cpp=.o) $(ASRC:.S=.o)
145
 
159
 
146
 # added - OBJ list, transformed into applet/
160
 # added - OBJ list, transformed into applet/
204
 	@echo ALL CXXLIBOBJ: $(CXXLIBOBJ)
218
 	@echo ALL CXXLIBOBJ: $(CXXLIBOBJ)
205
 #	echo '#include "WProgram.h"' > applet/$(TARGET).cpp
219
 #	echo '#include "WProgram.h"' > applet/$(TARGET).cpp
206
 	@echo "#include \"WProgram.h\"\nvoid setup();\nvoid loop();\n" > applet/$(TARGET).cpp
220
 	@echo "#include \"WProgram.h\"\nvoid setup();\nvoid loop();\n" > applet/$(TARGET).cpp
207
-	cat $(TARGET).pde >> applet/$(TARGET).cpp
221
+	##cat $(TARGET).pde >> applet/$(TARGET).cpp
222
+	cat ${PDES}>> applet/$(TARGET).cpp
223
+	cp *.cpp applet/
208
     # no more need to cat main.cpp (v0022) - now it is compiled in
224
     # no more need to cat main.cpp (v0022) - now it is compiled in
209
 #	cat $(ARDUINO)/main.cpp >> applet/$(TARGET).cpp
225
 #	cat $(ARDUINO)/main.cpp >> applet/$(TARGET).cpp
210
 
226
 
265
 #	$(CC) $(ALL_CFLAGS) -o $@ applet/$(TARGET).cpp -L. applet/core.a $(LDFLAGS)
281
 #	$(CC) $(ALL_CFLAGS) -o $@ applet/$(TARGET).cpp -L. applet/core.a $(LDFLAGS)
266
 # changed as in IDE v0022: link cpp obj files
282
 # changed as in IDE v0022: link cpp obj files
267
 	@echo $$(tput bold)$$(tput setaf 2) $(CC) $$(tput sgr0) $(ALL_CFLAGS) $(CFINALF) -o $@ applet/$(TARGET).cpp.o $(CXXOBJ) -L. applet/core.a $(LDFLAGS)
283
 	@echo $$(tput bold)$$(tput setaf 2) $(CC) $$(tput sgr0) $(ALL_CFLAGS) $(CFINALF) -o $@ applet/$(TARGET).cpp.o $(CXXOBJ) -L. applet/core.a $(LDFLAGS)
268
-	$(CC) $(ALL_CFLAGS) $(CFINALF) -o $@ $OBJECTS -L. applet/core.a $(LDFLAGS)
284
+	echo ${OBJT}
285
+	#$(CC) $(ALL_CFLAGS) $(CFINALF) -o $@  applet/$(TARGET).cpp.o  -L. applet/core.a $(LDFLAGS)
286
+	$(CC) $(ALL_CFLAGS) $(CFINALF) -o $@ ${LINKORDER}   $(LDFLAGS)
269
 	#@$(CC) $(ALL_CFLAGS) $(CFINALF) -o $@ applet/*.o applet/$(TARGET).cpp.o $(CXXOBJ) -L. applet/core.a $(LDFLAGS)
287
 	#@$(CC) $(ALL_CFLAGS) $(CFINALF) -o $@ applet/*.o applet/$(TARGET).cpp.o $(CXXOBJ) -L. applet/core.a $(LDFLAGS)
270
 
288
 
271
 # added: cpp.o depends on cpp (and .pde which generates it)
289
 # added: cpp.o depends on cpp (and .pde which generates it)

+ 0
- 1
Marlin/SdFile.cpp View File

47
 int16_t SdFile::write(const void* buf, uint16_t nbyte) {
47
 int16_t SdFile::write(const void* buf, uint16_t nbyte) {
48
   return SdBaseFile::write(buf, nbyte);
48
   return SdBaseFile::write(buf, nbyte);
49
 }
49
 }
50
-#warning F_CPU
51
 //------------------------------------------------------------------------------
50
 //------------------------------------------------------------------------------
52
 /** Write a byte to a file. Required by the Arduino Print class.
51
 /** Write a byte to a file. Required by the Arduino Print class.
53
  * \param[in] b the byte to be written.
52
  * \param[in] b the byte to be written.

+ 8
- 0
Marlin/ultralcd.h View File

151
   
151
   
152
 void lcd_statuspgm(const char* message);
152
 void lcd_statuspgm(const char* message);
153
   
153
   
154
+char *ftostr3(const float &x);
155
+char *itostr2(const uint8_t &x);
156
+char *ftostr31(const float &x);
157
+char *ftostr32(const float &x);
158
+char *itostr31(const int &xx);
159
+char *itostr3(const int &xx);
160
+char *itostr4(const int &xx);
161
+char *ftostr51(const float &x);
154
 #endif //ULTRALCD
162
 #endif //ULTRALCD
155
 
163
 

+ 1
- 1
Marlin/ultralcd.pde View File

31
 LiquidCrystal lcd(LCD_PINS_RS, LCD_PINS_ENABLE, LCD_PINS_D4, LCD_PINS_D5,LCD_PINS_D6,LCD_PINS_D7);  //RS,Enable,D4,D5,D6,D7 
31
 LiquidCrystal lcd(LCD_PINS_RS, LCD_PINS_ENABLE, LCD_PINS_D4, LCD_PINS_D5,LCD_PINS_D6,LCD_PINS_D7);  //RS,Enable,D4,D5,D6,D7 
32
 
32
 
33
 static unsigned long previous_millis_lcd=0;
33
 static unsigned long previous_millis_lcd=0;
34
-static long previous_millis_buttons=0;
34
+//static long previous_millis_buttons=0;
35
 
35
 
36
 
36
 
37
 #ifdef NEWPANEL
37
 #ifdef NEWPANEL

Loading…
Cancel
Save