Merge pull request #665 from hexluthor/cc2538-flash-conf

CC2538: Add FLASH_CONF_ORIGIN and FLASH_CONF_SIZE config parameters.
This commit is contained in:
George Oikonomou 2014-05-18 13:12:49 +02:00
commit 026864d129
2 changed files with 32 additions and 2 deletions

View file

@ -43,10 +43,26 @@
#define SRAM_LEN 0x00008000 #define SRAM_LEN 0x00008000
#endif #endif
#ifdef FLASH_CONF_ORIGIN
#define FLASH_ORIGIN FLASH_CONF_ORIGIN
#else
#error FLASH_CONF_ORIGIN is not specified. Please define FLASH_CONF_ORIGIN in contiki-conf.h.
#endif
#ifdef FLASH_CONF_SIZE
#define FLASH_SIZE FLASH_CONF_SIZE
#else
#error FLASH_CONF_SIZE is not specified. Please define FLASH_CONF_SIZE in contiki-conf.h.
#endif
#define FLASH_CCA_LENGTH 44
#define FLASH_LENGTH (FLASH_SIZE - FLASH_CCA_LENGTH)
#define FLASH_CCA_ORIGIN (FLASH_ORIGIN + FLASH_LENGTH)
MEMORY MEMORY
{ {
FLASH (rx) : ORIGIN = 0x200000, LENGTH = 0x0007FFD4 FLASH (rx) : ORIGIN = FLASH_ORIGIN, LENGTH = FLASH_LENGTH
FLASH_CCA (RX) : ORIGIN = 0x0027FFD4, LENGTH = 44 FLASH_CCA (RX) : ORIGIN = FLASH_CCA_ORIGIN, LENGTH = FLASH_CCA_LENGTH
#if (LPM_CONF_MAX_PM==2) && (LPM_CONF_ENABLE != 0) #if (LPM_CONF_MAX_PM==2) && (LPM_CONF_ENABLE != 0)
NRSRAM (RWX) : ORIGIN = NRSRAM_START, LENGTH = NRSRAM_LEN NRSRAM (RWX) : ORIGIN = NRSRAM_START, LENGTH = NRSRAM_LEN
#endif #endif

View file

@ -50,6 +50,20 @@ typedef uint32_t rtimer_clock_t;
#endif #endif
/** @} */ /** @} */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/**
* \name Flash Memory configuration
*
* @{
*/
#ifndef FLASH_CONF_ORIGIN
#define FLASH_CONF_ORIGIN 0x00200000
#endif
#ifndef FLASH_CONF_SIZE
#define FLASH_CONF_SIZE 0x00080000 /* 512 KiB */
#endif
/** @} */
/*---------------------------------------------------------------------------*/
/** /**
* \name USB 'core' configuration * \name USB 'core' configuration
* *