60 lines
2.4 KiB
C
60 lines
2.4 KiB
C
|
#ifndef FlashChipVerneBased_H
|
||
|
#define FlashChipVerneBased_H
|
||
|
|
||
|
/********************************************************************************************************************/
|
||
|
/* Number of IRQ priority level bits - must be defined before loading core_cm0.h*/
|
||
|
/********************************************************************************************************************/
|
||
|
|
||
|
/* #define __NVIC_PRIO_BITS 2 */
|
||
|
|
||
|
/********************************************************************************************************************/
|
||
|
/*Includes*/
|
||
|
/********************************************************************************************************************/
|
||
|
#include "core_cm0.h"
|
||
|
#include <stdint.h>
|
||
|
|
||
|
/*
|
||
|
end of define :obsoleted in future
|
||
|
*/
|
||
|
/*Definition of the several memory segments defined in Heimdall Slave
|
||
|
Warning: DO NOT CHANGE definitions without careful consideration and
|
||
|
if at all possible contact Aydeekay LLC!*/
|
||
|
|
||
|
/*Flash Memory, addresses, sizes and blocks information*/
|
||
|
|
||
|
|
||
|
#define FLASH_INITIAL_ADDRESS 0x0L
|
||
|
#define FLASH_FINAL_ADDRESS 0xBFFFU
|
||
|
#define FLASH_SIZE ( ( FLASH_FINAL_ADDRESS - FLASH_INITIAL_ADDRESS ) + 1 )
|
||
|
#define FLASH_SECTOR_SIZE 0x200U
|
||
|
#define FLASH_SECTOR_SIZE_POS (9U)
|
||
|
#define NUMBER_FLASH_SECTORS (FLASH_SIZE/FLASH_SECTOR_SIZE)
|
||
|
|
||
|
|
||
|
/*SRAM Memory*/
|
||
|
#define SRAM_INITIAL_ADDRESS 0x20000000U
|
||
|
#define SRAM_FINAL_ADDRESS 0x20003FFFU
|
||
|
#define SRAM_SIZE ( ( SRAM_FINAL_ADDRESS - SRAM_INITIAL_ADDRESS ) + 1 )
|
||
|
|
||
|
/************** ARM INTERNAL Registers *****************/
|
||
|
/*WARNING: DO NOT TOUCH!*/
|
||
|
/*******************************************************/
|
||
|
|
||
|
|
||
|
/*
|
||
|
- 7K -bootlaoder
|
||
|
- 36K -app
|
||
|
- 4K -user param
|
||
|
- 1K -color lib param
|
||
|
*/
|
||
|
#define FLASH_STRAT_ADDRESS_BOOTLOADER (0x0000U)
|
||
|
#define FLASH_START_ADDRESS_APPLICATION (0x1C08U) /* 7K */
|
||
|
#define FLASH_START_ADDRESS_USER_DATA (0xAC00U) /* 7K + 36K*/
|
||
|
#define FLASH_START_ADDRESS_SYSTEM_DATA (0xBC00U) /* 7K + 36K + +4K + 0.5K*/
|
||
|
#define FLASH_START_ADDRESS_SYSTEM_DATA_BACK_UP (0xBE00U) /* 7K + 36K + +4K + 1.0K*/
|
||
|
#define FLASH_END (0xBFFFU)
|
||
|
#define IMAGE_MAX_SIZE (FLASH_START_ADDRESS_USER_DATA - FLASH_START_ADDRESS_APPLICATION)
|
||
|
|
||
|
|
||
|
#endif
|