Files
kunlun/inc/iot_config.h

153 lines
4.9 KiB
C

/****************************************************************************
Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
be copied by any method or incorporated into another program without
the express written consent of Aerospace C.Power. This Information or any portion
thereof remains the property of Aerospace C.Power. The Information contained herein
is believed to be accurate and Aerospace C.Power assumes no responsibility or
liability for its use in any way and conveys no license or title under
any patent or copyright and makes no representation or warranty that this
Information is free from patent or copyright infringement.
****************************************************************************/
/* This file contains the Kunlun features configuration
* any feature related .c file should include this file
*/
#ifndef IOT_CONFIG_H
#define IOT_CONFIG_H
/* export includes */
#include "iot_config_api.h"
/* HW configuration start *****************************************************/
#define FPGA_IMAGE_TYPE_SOC 0
#define FPGA_IMAGE_TYPE_AI 1
#define FPGA_IMAGE_TYPE_BB 2
#define FPGA_IMAGE_TYPE_A10 3
#define FPGA_IMAGE_TYPE_AUDIO 4
#ifndef FLASH_LAYOUT_INDEX
#error "invalid falsh layout index!"
#endif
/* HW configuration start *****************************************************/
/* SoC configuration start ****************************************************/
/* HW CHIP defination, HZ30XX by default */
#define HW_CHIP_ID_HZ 1
#define HW_CHIP_ID_WQ 2
#define HW_CHIP_ID_UNKNOWN 3
#ifndef HW_CHIP_ID
#define HW_CHIP_ID HW_CHIP_ID_HZ
#endif
#ifndef HW_BOARD_ID
#define HW_BOARD_ID 0
#endif
/* SoC configuration end ****************************************************/
/* build type start ***********************************************************/
/* Script build type definations, default compilation IOT_BUILD_TYPE_FW */
#define IOT_BUILD_TYPE_UNKNOWN 0
#define IOT_BUILD_TYPE_RAM 1
#define IOT_BUILD_TYPE_SP 2
#define IOT_BUILD_TYPE_SBL 3
#define IOT_BUILD_TYPE_FW 4
#define IOT_BUILD_TYPE_ROM 5
#define IOT_BUILD_TYPE_BOOTRAM 6
#ifndef IOT_BUILD_TYPE
#define IOT_BUILD_TYPE IOT_BUILD_TYPE_FW
#endif
/* For KL3, build AMP image type. */
#define IOT_BUILD_AMP_NONE 0
#define IOT_BUILD_AMP_CUSTOM 1
#define IOT_BUILD_AMP_PLC 2
#ifndef BUILD_AMP_TYPE
#define BUILD_AMP_TYPE IOT_BUILD_AMP_NONE
#endif
#ifndef BUILD_FASTBOOT_MODE
#define BUILD_FASTBOOT_MODE 0
#endif
#define IOT_IPC_SUPPORT_AMP (BUILD_AMP_TYPE != IOT_BUILD_AMP_NONE)
/* build type end *************************************************************/
/* PROTO configuration start ************************************************/
#if (IOT_PRODUCT_LINE == IOT_PRODUCT_LINE_PLC)
#include "config/plc_config.h"
#endif
#if (IOT_PRODUCT_LINE == IOT_PRODUCT_LINE_AI)
#include "config/ai_config.h"
#endif
#if (IOT_PRODUCT_LINE == IOT_PRODUCT_LINE_NB)
#include "config/nb_config.h"
#endif
#if (IOT_PRODUCT_LINE == IOT_PRODUCT_LINE_BT)
#include "config/bt_config.h"
#endif
/* PROTO configuration end **************************************************/
/* APPLICAITON configuration start ******************************************/
#if (HW_PLATFORM == HW_PLATFORM_SIMU)
/* Enable this macro will run pib firmware to store each module configuration */
#define IOT_PIB_ENABLE 1
#elif (BUILD_AMP_TYPE != IOT_BUILD_AMP_CUSTOM)
#define IOT_PIB_ENABLE 1
#endif
#ifndef IOT_FLASH_BUILD
#define IOT_FLASH_BUILD 0
#endif
/* APPLICAITON configuration end **********************************************/
/* DEBUG configuration start **************************************************/
#define INTERRUPT_LATENCY_DEBUG 0
#ifndef TASK_CRASH_DUMP_DEBUG
#define TASK_CRASH_DUMP_DEBUG 0
#endif
#ifndef TASK_CRASH_DUMP_STACK_DEBUG
#define TASK_CRASH_DUMP_STACK_DEBUG 0
#endif
#define INTERRUPT_STATISTICS_DEBUG 0
/* DEBUG PKT information collection *******************************************/
#define IOT_PKT_INFO_DUMP_DEBUG 0
/* DEBUG gpio & signal information collection *********************************/
#define IOT_MAP_GPIO_SIGNAL_INFO_DUMP_DEBUG 0
/* DEBUG configuration end *****************************************************/
/* FTM confgiuration start *****************************************************/
/* FTM configuration end ******************************************************/
// 定义本地用于打印的函数指针
#define static_printf_def(addr) \
typedef int32_t (*static_printf)(const char *fmt, ...);\
static static_printf sbl_printf= (static_printf)addr;
#endif /* IOT_CONFIG_H */