2022-05-31 11:53:56 +08:00
|
|
|
/*
|
2024-01-09 21:56:37 +08:00
|
|
|
* Copyright (C) 2022-2024, Xiaohua Semiconductor Co., Ltd.
|
2022-05-31 11:53:56 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2022-04-28 CDT first version
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __BOARD_H__
|
|
|
|
#define __BOARD_H__
|
|
|
|
|
|
|
|
#include <rtthread.h>
|
|
|
|
#include "hc32_ll.h"
|
|
|
|
#include "drv_gpio.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2024-01-09 21:56:37 +08:00
|
|
|
|
|
|
|
#define HC32_FLASH_SIZE_GRANULARITY (8 * 1024)
|
|
|
|
#define HC32_FLASH_SIZE (512 * 1024)
|
|
|
|
#define HC32_FLASH_START_ADDRESS (0)
|
|
|
|
#define HC32_FLASH_END_ADDRESS (HC32_FLASH_START_ADDRESS + HC32_FLASH_SIZE)
|
|
|
|
|
2022-05-31 11:53:56 +08:00
|
|
|
#define HC32_SRAM_SIZE (188)
|
|
|
|
#define HC32_SRAM_END (0x1FFF8000 + HC32_SRAM_SIZE * 1024)
|
|
|
|
|
2022-06-16 14:18:55 +08:00
|
|
|
#ifdef __ARMCC_VERSION
|
2024-01-09 21:56:37 +08:00
|
|
|
extern int Image$$RW_IRAM2$$ZI$$Limit;
|
|
|
|
#define HEAP_BEGIN (&Image$$RW_IRAM2$$ZI$$Limit)
|
2022-05-31 11:53:56 +08:00
|
|
|
#elif __ICCARM__
|
|
|
|
#pragma section="HEAP"
|
|
|
|
#define HEAP_BEGIN (__segment_end("HEAP"))
|
|
|
|
#else
|
|
|
|
extern int __bss_end;
|
|
|
|
#define HEAP_BEGIN (&__bss_end)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define HEAP_END HC32_SRAM_END
|
|
|
|
|
2024-01-09 21:56:37 +08:00
|
|
|
void PeripheralRegister_Unlock(void);
|
|
|
|
void PeripheralClock_Config(void);
|
|
|
|
void SystemBase_Config(void);
|
|
|
|
void SystemClock_Config(void);
|
|
|
|
|
2022-05-31 11:53:56 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|