From d0db3fc39abe6f360408ac21622cd20d4e2ad938 Mon Sep 17 00:00:00 2001 From: salvopitru Date: Wed, 15 Dec 2010 15:01:00 +0000 Subject: [PATCH] Added a check for Coffee start address. --- cpu/stm32w108/cfs-coffee-arch.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpu/stm32w108/cfs-coffee-arch.h b/cpu/stm32w108/cfs-coffee-arch.h index 74ffaffdb..51cba54cd 100644 --- a/cpu/stm32w108/cfs-coffee-arch.h +++ b/cpu/stm32w108/cfs-coffee-arch.h @@ -69,6 +69,9 @@ #ifdef __ICCARM__ #define COFFEE_ADDRESS 0x8010000 #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_START (COFFEE_ADDRESS & ~(COFFEE_PAGE_SIZE-1)) #define COFFEE_SIZE (COFFEE_PAGES*COFFEE_PAGE_SIZE)