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,6 +26,31 @@ TERM=bash
26 26
 ############################################################################
27 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 54
 ARDUINO = $(INSTALL_DIR)/hardware/arduino/cores/arduino
30 55
 #
31 56
 #~ AVR_TOOLS_PATH = $(INSTALL_DIR)/hardware/tools/avr/bin
@@ -67,18 +92,6 @@ CXXDEFS = -DF_CPU=$(BUILD_F_CPU) -DARDUINO=23
67 92
 CINCS = -I$(ARDUINO) -I$(INSTALL_DIR)/libraries/LiquidCrystal/ -I$(INSTALL_DIR)/libraries/EEPROM/
68 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 95
 # Compiler flag to set the C Standard level.
83 96
 # c89 - "ANSI" C
84 97
 # gnu89 - c89 plus GCC extensions
@@ -141,6 +154,7 @@ MV = mv -f
141 154
 # and then, match to corresponding rule somehow?
142 155
 # or leave this - and parse in rule (auth automatic variable $(@F))?
143 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 158
 OBJ = $(SRC:.c=.o) $(CXXSRC:.cpp=.o) $(ASRC:.S=.o)
145 159
 
146 160
 # added - OBJ list, transformed into applet/
@@ -204,7 +218,9 @@ applet_files: $(TARGET).pde
204 218
 	@echo ALL CXXLIBOBJ: $(CXXLIBOBJ)
205 219
 #	echo '#include "WProgram.h"' > applet/$(TARGET).cpp
206 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 224
     # no more need to cat main.cpp (v0022) - now it is compiled in
209 225
 #	cat $(ARDUINO)/main.cpp >> applet/$(TARGET).cpp
210 226
 
@@ -265,7 +281,9 @@ applet/$(TARGET).elf: $(TARGET).pde applet/$(TARGET).cpp.o applet/core.a
265 281
 #	$(CC) $(ALL_CFLAGS) -o $@ applet/$(TARGET).cpp -L. applet/core.a $(LDFLAGS)
266 282
 # changed as in IDE v0022: link cpp obj files
267 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 287
 	#@$(CC) $(ALL_CFLAGS) $(CFINALF) -o $@ applet/*.o applet/$(TARGET).cpp.o $(CXXOBJ) -L. applet/core.a $(LDFLAGS)
270 288
 
271 289
 # added: cpp.o depends on cpp (and .pde which generates it)

+ 0
- 1
Marlin/SdFile.cpp View File

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

+ 8
- 0
Marlin/ultralcd.h View File

@@ -151,5 +151,13 @@
151 151
   
152 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 162
 #endif //ULTRALCD
155 163
 

+ 1
- 1
Marlin/ultralcd.pde View File

@@ -31,7 +31,7 @@ static char conv[8];
31 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 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 37
 #ifdef NEWPANEL

Loading…
Cancel
Save