Added a check for Coffee start address.

This commit is contained in:
salvopitru 2010-12-15 15:01:00 +00:00
parent c325e212f6
commit d0db3fc39a

View file

@ -69,6 +69,9 @@
#ifdef __ICCARM__ #ifdef __ICCARM__
#define COFFEE_ADDRESS 0x8010000 #define COFFEE_ADDRESS 0x8010000
#endif #endif
#if (COFFEE_ADDRESS & 0x3FF) !=0
#error "COFFEE_ADDRESS not aligned to a 1024-bytes page boundary."
#endif
#define COFFEE_PAGES ((FLASH_PAGES*FLASH_PAGE_SIZE-(COFFEE_ADDRESS-FLASH_START))/COFFEE_PAGE_SIZE) #define COFFEE_PAGES ((FLASH_PAGES*FLASH_PAGE_SIZE-(COFFEE_ADDRESS-FLASH_START))/COFFEE_PAGE_SIZE)
#define COFFEE_START (COFFEE_ADDRESS & ~(COFFEE_PAGE_SIZE-1)) #define COFFEE_START (COFFEE_ADDRESS & ~(COFFEE_PAGE_SIZE-1))
#define COFFEE_SIZE (COFFEE_PAGES*COFFEE_PAGE_SIZE) #define COFFEE_SIZE (COFFEE_PAGES*COFFEE_PAGE_SIZE)