2022-07-05 16:45:32 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2006-2022, RT-Thread Development Team
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
2022-07-05 16:59:20 +08:00
|
|
|
* 2022-06-29 Rbb666 first version
|
2022-07-27 15:41:25 +08:00
|
|
|
* 2022-07-26 Rbb666 Add Flash Config
|
2022-07-05 16:45:32 +08:00
|
|
|
*/
|
2022-07-05 16:59:20 +08:00
|
|
|
|
2022-07-05 16:45:32 +08:00
|
|
|
#ifndef __BOARD_H__
|
|
|
|
#define __BOARD_H__
|
|
|
|
|
|
|
|
#include <rtthread.h>
|
|
|
|
#include "drv_common.h"
|
|
|
|
#include "drv_gpio.h"
|
|
|
|
|
|
|
|
#include "cyhal.h"
|
|
|
|
#include "cybsp.h"
|
|
|
|
#include "cy_pdl.h"
|
|
|
|
#include "cy_retarget_io.h"
|
|
|
|
|
2022-07-27 15:41:25 +08:00
|
|
|
/*FLASH CONFIG*/
|
|
|
|
#define IFX_FLASH_START_ADRESS ((uint32_t)0x10000000)
|
|
|
|
#define IFX_FLASH_PAGE_SIZE (256 * 1024)
|
|
|
|
#define IFX_FLASH_SIZE (2 * 1024 * 1024)
|
|
|
|
#define IFX_FLASH_END_ADDRESS ((uint32_t)(IFX_FLASH_START_ADRESS + IFX_FLASH_SIZE))
|
|
|
|
|
|
|
|
/*EFLASH CONFIG*/
|
|
|
|
#define IFX_EFLASH_START_ADRESS ((uint32_t)0x14000000)
|
|
|
|
#define IFX_EFLASH_PAGE_SIZE (32 * 1024)
|
|
|
|
#define IFX_EFLASH_SIZE (32 * 1024)
|
|
|
|
#define IFX_EFLASH_END_ADDRESS ((uint32_t)(IFX_EFLASH_START_ADRESS + IFX_EFLASH_SIZE))
|
|
|
|
|
|
|
|
/*SRAM CONFIG*/
|
|
|
|
#define IFX_SRAM_SIZE (1014)
|
|
|
|
#define IFX_SRAM_END (0x08002000 + IFX_SRAM_SIZE * 1024)
|
2022-07-05 16:45:32 +08:00
|
|
|
|
|
|
|
#ifdef __ARMCC_VERSION
|
|
|
|
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
|
|
|
#define HEAP_BEGIN (&Image$$RW_IRAM1$$ZI$$Limit)
|
|
|
|
#elif __ICCARM__
|
|
|
|
#pragma section="HEAP"
|
|
|
|
#define HEAP_BEGIN (__segment_end("HEAP"))
|
|
|
|
#else
|
|
|
|
extern unsigned int __end__;
|
|
|
|
extern unsigned int __HeapLimit;
|
|
|
|
#define HEAP_BEGIN (void*)&__end__
|
|
|
|
#define HEAP_END (void*)&__HeapLimit
|
|
|
|
#endif
|
|
|
|
|
2022-07-05 16:59:20 +08:00
|
|
|
#define HEAP_END IFX_SRAM_END
|
2022-07-05 16:45:32 +08:00
|
|
|
|
|
|
|
void cy_bsp_all_init(void);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|