board.h 973 字节
Newer Older
Thomas_Fly's avatar
Thomas_Fly 已提交
1 2 3 4 5 6 7 8 9 10
/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2020-06-19     supperthomas first version
 *
 */
S
supperthomas 已提交
11 12 13 14
#ifndef _BOARD_H_
#define _BOARD_H_

#include <rtthread.h>
G
guohp1128 已提交
15
#include <rthw.h>
S
supperthomas 已提交
16 17
#include "nrf.h"

Thomas_Fly's avatar
Thomas_Fly 已提交
18 19 20 21 22
#define MCU_FLASH_SIZE MCU_FLASH_SIZE_KB*1024
#define MCU_FLASH_END_ADDRESS        ((uint32_t)(MCU_FLASH_START_ADDRESS + MCU_FLASH_SIZE))
#define MCU_SRAM_SIZE MCU_SRAM_SIZE_KB*1024
#define MCU_SRAM_END_ADDRESS        (MCU_SRAM_START_ADDRESS + MCU_SRAM_SIZE)

23 24 25 26 27 28 29
#if defined(__CC_ARM) || defined(__CLANG_ARM)
extern int Image$$RW_IRAM1$$ZI$$Limit;
#define HEAP_BEGIN      ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
#elif __ICCARM__
#pragma section="CSTACK"
#define HEAP_BEGIN      (__segment_end("CSTACK"))
#else
30 31
extern int __bss_end__;
#define HEAP_BEGIN      ((void *)&__bss_end__)
32 33
#endif

Thomas_Fly's avatar
Thomas_Fly 已提交
34 35

#define HEAP_END       (MCU_SRAM_END_ADDRESS)
S
supperthomas 已提交
36 37 38 39 40

void rt_hw_board_init(void);

#endif