cc2538: Define the flash memory organization

Define the flash memory page and word sizes. These definitions are
grouped with the flash lock bit page and CCA definitions, so flash-cca.h
is renamed to flash.h.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
This commit is contained in:
Benoît Thébaudeau 2015-06-25 22:37:22 +02:00
parent 790c253d6d
commit efb4b858e2
3 changed files with 15 additions and 9 deletions

View file

@ -111,7 +111,7 @@ CUSTOM_RULE_LINK=1
LDGENFLAGS += $(addprefix -D,$(subst $(COMMA), ,$(DEFINES))) LDGENFLAGS += $(addprefix -D,$(subst $(COMMA), ,$(DEFINES)))
LDGENFLAGS += $(addprefix -I,$(SOURCEDIRS)) LDGENFLAGS += $(addprefix -I,$(SOURCEDIRS))
LDGENFLAGS += -imacros "contiki-conf.h" -imacros "dev/cc2538-dev.h" LDGENFLAGS += -imacros "contiki-conf.h" -imacros "dev/cc2538-dev.h"
LDGENFLAGS += -imacros "dev/flash-cca.h" LDGENFLAGS += -imacros "dev/flash.h"
LDGENFLAGS += -x c -P -E LDGENFLAGS += -x c -P -E
# NB: Assumes LDSCRIPT was not overridden and is in $(OBJECTDIR) # NB: Assumes LDSCRIPT was not overridden and is in $(OBJECTDIR)

View file

@ -36,22 +36,28 @@
* \addtogroup cc2538 * \addtogroup cc2538
* @{ * @{
* *
* \defgroup cc2538-flash-cca cc2538 flash CCA * \defgroup cc2538-flash cc2538 flash memory
* *
* Definitions for the cc2538 flash lock bit page and customer configuration * Definitions for the cc2538 flash memory
* area
* @{ * @{
* *
* \file * \file
* Header file for the flash lock bit page and CCA definitions * Header file for the flash memory definitions
*/ */
#ifndef FLASH_CCA_H_ #ifndef FLASH_H_
#define FLASH_CCA_H_ #define FLASH_H_
#include "dev/cc2538-dev.h" #include "dev/cc2538-dev.h"
#include <stdint.h> #include <stdint.h>
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/** \name Flash memory organization
* @{
*/
#define FLASH_PAGE_SIZE 2048
#define FLASH_WORD_SIZE 4
/** @} */
/*---------------------------------------------------------------------------*/
/** \name Flash lock bit page and CCA location /** \name Flash lock bit page and CCA location
* @{ * @{
*/ */
@ -95,7 +101,7 @@ typedef struct {
} flash_cca_lock_page_t; } flash_cca_lock_page_t;
/** @} */ /** @} */
#endif /* FLASH_CCA_H_ */ #endif /* FLASH_H_ */
/** /**
* @} * @}

View file

@ -38,7 +38,7 @@
*/ */
#include "contiki.h" #include "contiki.h"
#include "reg.h" #include "reg.h"
#include "flash-cca.h" #include "flash.h"
#include "sys-ctrl.h" #include "sys-ctrl.h"
#include "rom-util.h" #include "rom-util.h"