2021-06-19 22:16:52 +08:00
|
|
|
/*
|
|
|
|
* 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
|
|
|
|
*
|
|
|
|
*/
|
2020-04-14 22:17:27 +08:00
|
|
|
#ifndef _BOARD_H_
|
|
|
|
#define _BOARD_H_
|
|
|
|
|
|
|
|
#include <rtthread.h>
|
2020-06-19 22:22:01 +08:00
|
|
|
#include <rthw.h>
|
2020-04-14 22:17:27 +08:00
|
|
|
#include "nrf.h"
|
|
|
|
|
2020-04-26 22:44:09 +08:00
|
|
|
#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)
|
|
|
|
|
2021-12-30 03:14:07 +08:00
|
|
|
#if defined(__ARMCC_VERSION)
|
2020-04-19 17:37:43 +08:00
|
|
|
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
|
2021-01-31 10:03:56 +08:00
|
|
|
extern int __bss_end__;
|
|
|
|
#define HEAP_BEGIN ((void *)&__bss_end__)
|
2020-04-19 17:37:43 +08:00
|
|
|
#endif
|
|
|
|
|
2021-02-18 06:23:53 +08:00
|
|
|
|
|
|
|
#define HEAP_END (MCU_SRAM_END_ADDRESS)
|
2020-04-14 22:17:27 +08:00
|
|
|
|
|
|
|
void rt_hw_board_init(void);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|