Merge pull request #1732 from bthebaudeau/cc2538-flash-conf-fw-coffee
cc2538: Add configuration for firmware location
This commit is contained in:
commit
f0b19a18a9
|
@ -35,8 +35,7 @@
|
||||||
*/
|
*/
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
FLASH_FW (rx) : ORIGIN = COFFEE_START + COFFEE_SIZE,
|
FLASH_FW (rx) : ORIGIN = FLASH_FW_ADDR, LENGTH = FLASH_FW_SIZE
|
||||||
LENGTH = FLASH_CCA_ADDR - (COFFEE_START + COFFEE_SIZE)
|
|
||||||
FLASH_CCA (RX) : ORIGIN = FLASH_CCA_ADDR, LENGTH = FLASH_CCA_SIZE
|
FLASH_CCA (RX) : ORIGIN = FLASH_CCA_ADDR, LENGTH = FLASH_CCA_SIZE
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
#define FLASH_H_
|
#define FLASH_H_
|
||||||
|
|
||||||
#include "dev/cc2538-dev.h"
|
#include "dev/cc2538-dev.h"
|
||||||
|
#include "cfs-coffee-arch.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
@ -90,6 +91,23 @@
|
||||||
#define FLASH_CCA_LOCK_DEBUG_BIT 7 /**< Debug lock bit position in the corresponding lock byte */
|
#define FLASH_CCA_LOCK_DEBUG_BIT 7 /**< Debug lock bit position in the corresponding lock byte */
|
||||||
/** @} */
|
/** @} */
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/** \name Firmware location in flash memory
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#ifdef FLASH_CONF_FW_ADDR
|
||||||
|
#define FLASH_FW_ADDR FLASH_CONF_FW_ADDR
|
||||||
|
#elif !defined(COFFEE_CONF_CUSTOM_PORT)
|
||||||
|
#define FLASH_FW_ADDR (COFFEE_START + COFFEE_SIZE)
|
||||||
|
#else
|
||||||
|
#define FLASH_FW_ADDR CC2538_DEV_FLASH_ADDR
|
||||||
|
#endif
|
||||||
|
#ifdef FLASH_CONF_FW_SIZE
|
||||||
|
#define FLASH_FW_SIZE FLASH_CONF_FW_SIZE
|
||||||
|
#else
|
||||||
|
#define FLASH_FW_SIZE (FLASH_CCA_ADDR - FLASH_FW_ADDR)
|
||||||
|
#endif
|
||||||
|
/** @} */
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
/** \name Flash lock bit page and CCA layout
|
/** \name Flash lock bit page and CCA layout
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue