Make the compiler align the lang reserved area to the spm page boundary
This commit is contained in:
parent
e358cb2b78
commit
bf45d4dcd1
@ -1,6 +1,7 @@
|
||||
//language.c
|
||||
#include "language.h"
|
||||
#include <avr/pgmspace.h>
|
||||
#include <avr/io.h>
|
||||
#include <avr/eeprom.h>
|
||||
#include "bootapp.h"
|
||||
|
||||
@ -28,7 +29,7 @@ uint8_t lang_is_selected(void) { return 1; }
|
||||
#else //(LANG_MODE == 0) //secondary languages in progmem or xflash
|
||||
|
||||
//reserved xx kbytes for secondary language table
|
||||
const char _SEC_LANG[LANG_SIZE_RESERVED] PROGMEM_I2 = "_SEC_LANG";
|
||||
const char _SEC_LANG[LANG_SIZE_RESERVED] __attribute__((aligned(SPM_PAGESIZE))) PROGMEM_I2 = "_SEC_LANG";
|
||||
|
||||
//primary language signature
|
||||
const uint32_t _PRI_LANG_SIGNATURE[1] __attribute__((section(".progmem0"))) = {0xffffffff};
|
||||
|
@ -117,7 +117,7 @@ extern const char _SEC_LANG[LANG_SIZE_RESERVED];
|
||||
extern const char* lang_get_translation(const char* s);
|
||||
/** @def _SEC_LANG_TABLE
|
||||
* @brief Align table to start of 256 byte page */
|
||||
#define _SEC_LANG_TABLE ((((uint16_t)&_SEC_LANG) + 0x00ff) & 0xff00)
|
||||
#define _SEC_LANG_TABLE ((uint16_t)&_SEC_LANG)
|
||||
#endif //(LANG_MODE != 0)
|
||||
|
||||
/** @brief selects language, eeprom is updated in case of success */
|
||||
|
Loading…
Reference in New Issue
Block a user