/** ########################################################################## ** Filename : common_cfg.h ** Project : ** Module : ** Processor : ** Version : V1.0 ** Compiler : ** Date/Time : ** Abstract : ** Contents : link相关的定义,以及工程配置 ** Note : ** ** (c) Copyright dmdz Co.,Ltd ** -------------------------------------------------------------------------- ** R E V I S I O N H I S T O R Y ** -------------------------------------------------------------------------- ** Date Ver Author Description ** -20230602- --V1.0-- --mingyea--- --初版-- ** #########################################################################*/ #ifndef COMMON_CFG__H #define COMMON_CFG__H /*--------------------------------------------------------------------------- - I N C L U D E F I L E S ----------------------------------------------------------------------------*/ #include "common_types.h" /*--------------------------------------------------------------------------- - D E F I N E S / M A C R O S ----------------------------------------------------------------------------*/ #define FUNCTION_OPEN 1U #define FUNCTION_CLOSE 0U #define MCU_GOTO_SLEEP_FUNCTION_ON FUNCTION_CLOSE #ifdef __ICCARM__ #if 0 #define MEMORY_MAP_ROM_FOR_ASIL #pragma location = ".ROM_ASIL" // #pragma location = ".RAM_ASIL" #define MEMORY_MAP_RAM_FOR_ASIL #pragma location = ".RAM_ASIL" #else #define MEMORY_MAP_ROM_FOR_ASIL //__attribute__((section(".ROM_ASIL"))) // #pragma location = ".RAM_ASIL" #define MEMORY_MAP_ROM_DATA_FOR_ASIL //__attribute__((section(".ROM_DATA_ASIL"))) // #pragma location = ".ROM_DATA_ASIL" #define MEMORY_MAP_RAM_FOR_ASIL //__attribute__((section(".RAM_ASIL"))) // #pragma location = ".RAM_ASIL" #define MEMORY_MAP_ROM_DATA_FOR_UDS __attribute__((section(".ROM_DATA_UDS"))) // #pragma location = ".ROM_DATA_UDS" #define MEMORY_MAP_ROM_APP_RES __attribute__((section(".ROM_APP_RES"))) // #pragma location = ".ROM_APP_VALID" #define MEMORY_MAP_ROM_APP_VALID __attribute__((section(".ROM_APP_VALID"))) // #pragma location = ".ROM_APP_VALID1" #define ENABLE_STATIC_FOR_ASIL static #define MEMORY_MAP_RAM_FLAG_NOINIT __attribute__((section(".RAM_FLAG_NOLINT"))) // #pragma location = ".RAM_ASIL" #define MEMORY_MAP_RAM_FLAG_PROG __attribute__((section(".RAM_FLAG_PROG"))) // #pragma location = ".RAM_FLAG_PROG" #define MEMORY_MAP_RAM_EEPROM __attribute__((section(".RAM_EEPROM"))) // #pragma location = ".RAM_EEPROM" #define MEMORY_MAP_RAM_WDOG __attribute__((section(".RAM_WDOG"))) // #pragma location = ".RAM_WDOG" #define MEMORY_MAP_FLAG_NO_OPTIME __root //不被優化 #endif //#define MEMORY_MAP_CONTINUS 1 /**/ #define LIN_MEMORY_MAP_ENABLE 1 /**/ #else #define MEMORY_MAP_ROM_FOR_ASIL //__attribute__((section(".ROM_ASIL"))) #define MEMORY_MAP_ROM_DATA_FOR_ASIL //__attribute__((section(".ROM_DATA_ASIL"))) // #pragma location = ".RAM_ASIL" #define MEMORY_MAP_RAM_FOR_ASIL //__attribute__((section(".RAM_ASIL"))) #define MEMORY_MAP_ROM_DATA_FOR_UDS __attribute__((section(".ROM_DATA_UDS"))) // #pragma location = ".ROM_DATA_UDS" #define MEMORY_MAP_ROM_APP_RES __attribute__((section(".ROM_APP_RES"))) // #pragma location = ".ROM_APP_VALID" #define MEMORY_MAP_ROM_APP_VALID __attribute__((section(".ROM_APP_VALID"))) // #pragma location = ".ROM_APP_VALID1" #define ENABLE_STATIC_FOR_ASIL //注意GCC不能有 static #define MEMORY_MAP_RAM_FLAG_NOINIT __attribute__((section(".RAM_FLAG_NOLINT"))) // #pragma location = ".RAM_ASIL" #define MEMORY_MAP_RAM_FLAG_PROG __attribute__((section(".RAM_FLAG_PROG"))) // #pragma location = ".RAM_FLAG_PROG" #define MEMORY_MAP_RAM_EEPROM __attribute__((section(".RAM_EEPROM"))) // #pragma location = ".RAM_EEPROM" #define MEMORY_MAP_RAM_WDOG __attribute__((section(".RAM_WDOG"))) // #pragma location = ".RAM_WDOG" #define MEMORY_MAP_FLAG_NO_OPTIME __attribute__((used)) //不被優化 #endif #define SystemSoftwareReset NVIC_SystemReset //主任务的时间 #define APP_TASK_1MS 1 #define APP_TASK_2MS 2 #define APP_TASK_5MS 5 #define APP_TASK_10MS 10 #define APP_TASK_100MS 100 //TO MODIFY 要最後修改 // //TO_BE_DELETE /*--------------------------------------------------------------------------- - T Y P E D E F I N I T I O N S ----------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------- - G L O B A L V A R I A B L E S - only configuration table allowed here,variables are not allowed! ----------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------- - C O N S T A N T S ----------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------- - F U N C T I O N P R O T O T Y P E ----------------------------------------------------------------------------*/ #endif /* COMMON_CFG__H */ /* [] END OF FILE */