浏览代码

New lang, arduino 1.8.5 - language.h - section names, messages.h - extern "C" added

Robert Pelnar 5 年之前
父节点
当前提交
868c79e835
共有 2 个文件被更改,包括 11 次插入3 次删除
  1. 3 3
      Firmware/language.h
  2. 8 0
      Firmware/messages.h

+ 3 - 3
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];}))

+ 8 - 0
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)