Compare commits

...

1 commit

Author SHA1 Message Date
Jeff Epler
013bc037ca Fix compilation issues on Debian Wheezy
.. which uses Arduino 1.0.1 with gcc-avr 4.7.2-2.

SIG_USART0_RECV is forbidden to use, even in a #ifdef test.

PROGMEM data must additionally be const. (not all instances fixed,
for instance I didn't touch he NUM_EXTRUDER>2 case)

prog_char is deprecated but available by defining __PROG_TYPES_COMPAT__
before including pgmspace.h.
2013-07-14 16:25:09 -05:00
4 changed files with 10 additions and 10 deletions

View file

@ -19,6 +19,8 @@
which based on Tonokip RepRap firmware rewrite based off of Hydra-mmm firmware. which based on Tonokip RepRap firmware rewrite based off of Hydra-mmm firmware.
*/ */
#define __PROG_TYPES_COMPAT__
#include "Reptier.h" #include "Reptier.h"
#include "pins_arduino.h" #include "pins_arduino.h"
#include "ui.h" #include "ui.h"
@ -29,12 +31,12 @@
Extruder *current_extruder; Extruder *current_extruder;
#if NUM_EXTRUDER>0 #if NUM_EXTRUDER>0
prog_char ext0_select_cmd[] PROGMEM = EXT0_SELECT_COMMANDS; prog_char const ext0_select_cmd[] PROGMEM = EXT0_SELECT_COMMANDS;
prog_char ext0_deselect_cmd[] PROGMEM = EXT0_DESELECT_COMMANDS; prog_char const ext0_deselect_cmd[] PROGMEM = EXT0_DESELECT_COMMANDS;
#endif #endif
#if NUM_EXTRUDER>1 #if NUM_EXTRUDER>1
prog_char ext1_select_cmd[] PROGMEM = EXT1_SELECT_COMMANDS; prog_char const ext1_select_cmd[] PROGMEM = EXT1_SELECT_COMMANDS;
prog_char ext1_deselect_cmd[] PROGMEM = EXT1_DESELECT_COMMANDS; prog_char const ext1_deselect_cmd[] PROGMEM = EXT1_DESELECT_COMMANDS;
#endif #endif
#if NUM_EXTRUDER>2 #if NUM_EXTRUDER>2
prog_char ext2_select_cmd[] PROGMEM = EXT2_SELECT_COMMANDS; prog_char ext2_select_cmd[] PROGMEM = EXT2_SELECT_COMMANDS;

View file

@ -2687,7 +2687,7 @@ static uint16_t CRC_CCITT(const uint8_t *data, uint16_t n) {
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// faster CRC-CCITT // faster CRC-CCITT
// uses the x^16,x^12,x^5,x^1 polynomial. // uses the x^16,x^12,x^5,x^1 polynomial.
static uint16_t crctab[] PROGMEM = { static const uint16_t crctab[] PROGMEM = {
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7, 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF, 0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF,
0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6, 0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6,

View file

@ -88,7 +88,7 @@ inline void rf_store_char(unsigned char c, ring_buffer *buffer)
#if !defined(USART0_RX_vect) && defined(USART1_RX_vect) #if !defined(USART0_RX_vect) && defined(USART1_RX_vect)
// do nothing - on the 32u4 the first USART is USART1 // do nothing - on the 32u4 the first USART is USART1
#else #else
#if !defined(USART_RX_vect) && !defined(SIG_USART0_RECV) && \ #if !defined(USART_RX_vect) && \
!defined(SIG_UART0_RECV) && !defined(USART0_RX_vect) && \ !defined(SIG_UART0_RECV) && !defined(USART0_RX_vect) && \
!defined(SIG_UART_RECV) !defined(SIG_UART_RECV)
#error "Don't know what the Data Received vector is called for the first UART" #error "Don't know what the Data Received vector is called for the first UART"
@ -98,8 +98,6 @@ inline void rf_store_char(unsigned char c, ring_buffer *buffer)
#define serialEvent_implemented #define serialEvent_implemented
#if defined(USART_RX_vect) #if defined(USART_RX_vect)
SIGNAL(USART_RX_vect) SIGNAL(USART_RX_vect)
#elif defined(SIG_USART0_RECV)
SIGNAL(SIG_USART0_RECV)
#elif defined(SIG_UART0_RECV) #elif defined(SIG_UART0_RECV)
SIGNAL(SIG_UART0_RECV) SIGNAL(SIG_UART0_RECV)
#elif defined(USART0_RX_vect) #elif defined(USART0_RX_vect)

View file

@ -379,7 +379,7 @@ extern unsigned char i2c_read(unsigned char ack);
#define UI_MENU_ACTIONSELECTOR(name,row,entries) UI_STRING(name ## _txt,row);UIMenuEntry name PROGMEM = {name ## _txt,2,(unsigned int)&entries}; #define UI_MENU_ACTIONSELECTOR(name,row,entries) UI_STRING(name ## _txt,row);UIMenuEntry name PROGMEM = {name ## _txt,2,(unsigned int)&entries};
#define UI_MENU_SUBMENU(name,row,entries) UI_STRING(name ## _txt,row);UIMenuEntry name PROGMEM = {name ## _txt,2,(unsigned int)&entries}; #define UI_MENU_SUBMENU(name,row,entries) UI_STRING(name ## _txt,row);UIMenuEntry name PROGMEM = {name ## _txt,2,(unsigned int)&entries};
#define UI_MENU(name,items,itemsCnt) const UIMenuEntry * const name ## _entries[] PROGMEM = items;const UIMenu name PROGMEM = {2,0,itemsCnt,name ## _entries} #define UI_MENU(name,items,itemsCnt) const UIMenuEntry * const name ## _entries[] PROGMEM = items;const UIMenu name PROGMEM = {2,0,itemsCnt,name ## _entries}
#define UI_MENU_FILESELECT(name,items,itemsCnt) const UIMenuEntry *name ## _entries[] PROGMEM = items;const UIMenu name PROGMEM = {1,0,itemsCnt,name ## _entries} #define UI_MENU_FILESELECT(name,items,itemsCnt) const UIMenuEntry * const name ## _entries[] PROGMEM = items;const UIMenu name PROGMEM = {1,0,itemsCnt,name ## _entries}
#if FEATURE_CONTROLLER==2 // reprapdiscount smartcontroller has a sd card buildin #if FEATURE_CONTROLLER==2 // reprapdiscount smartcontroller has a sd card buildin
#undef SDCARDDETECT #undef SDCARDDETECT
@ -667,7 +667,7 @@ void ui_check_slow_keys(int &action) {}
#define UI_STATUS_UPD(status) {uid.setStatusP(PSTR(status));uid.refreshPage();} #define UI_STATUS_UPD(status) {uid.setStatusP(PSTR(status));uid.refreshPage();}
#define UI_STATUS_RAM(status) uid.setStatus(status); #define UI_STATUS_RAM(status) uid.setStatus(status);
#define UI_STATUS_UPD_RAM(status) {uid.setStatus(status);uid.refreshPage();} #define UI_STATUS_UPD_RAM(status) {uid.setStatus(status);uid.refreshPage();}
#define UI_ERROR(msg) {uid.errorMsg=PSTR(msg);pushMenu((void*)&ui_menu_error,true);} #define UI_ERROR(msg) {uid.errorMsg=(void*)STR(msg);pushMenu((void*)&ui_menu_error,true);}
#define UI_CLEAR_STATUS {uid.statusMsg[0]=0;} #define UI_CLEAR_STATUS {uid.statusMsg[0]=0;}
#else #else
#define UI_INITIALIZE {} #define UI_INITIALIZE {}