From 868c79e8350d36ac08f0acc4517db8960e1d8413 Mon Sep 17 00:00:00 2001 From: Robert Pelnar Date: Thu, 18 Oct 2018 14:41:32 +0200 Subject: [PATCH] New lang, arduino 1.8.5 - language.h - section names, messages.h - extern "C" added --- Firmware/language.h | 6 +++--- Firmware/messages.h | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Firmware/language.h b/Firmware/language.h index 28364817a..1e7436a3b 100644 --- a/Firmware/language.h +++ b/Firmware/language.h @@ -25,13 +25,13 @@ /** @def PROGMEM_I2 * @brief section progmem0 will be used for localized translated strings */ -#define PROGMEM_I2 __attribute__((section(".progmem0"))) +#define PROGMEM_I2 __attribute__((section(".loc_sec"))) /** @def PROGMEM_I1 * @brief section progmem1 will be used for localized strings in english */ -#define PROGMEM_I1 __attribute__((section(".progmem1"))) +#define PROGMEM_I1 __attribute__((section(".loc_pri"))) /** @def PROGMEM_N1 * @brief section progmem2 will be used for not localized strings in english */ -#define PROGMEM_N1 __attribute__((section(".progmem2"))) +#define PROGMEM_N1 __attribute__((section(".noloc"))) #if (LANG_MODE == 0) //primary language only #define _I(s) (__extension__({static const char __c[] PROGMEM_I1 = s; &__c[0];})) diff --git a/Firmware/messages.h b/Firmware/messages.h index dda384583..3b8ca18bf 100644 --- a/Firmware/messages.h +++ b/Firmware/messages.h @@ -3,6 +3,10 @@ // Common serial messages #define MSG_MARLIN "Marlin" +#if defined(__cplusplus) +extern "C" { +#endif //defined(__cplusplus) + // LCD Menu Messages //internationalized messages extern const char MSG_AUTO_HOME[]; @@ -119,3 +123,7 @@ extern const char MSG_Z_MIN[]; extern const char MSG_ZPROBE_OUT[]; extern const char MSG_ZPROBE_ZOFFSET[]; extern const char MSG_TMC_OVERTEMP[]; + +#if defined(__cplusplus) +} +#endif //defined(__cplusplus)