LL01/code_app_out/Source/bsp/stack_check_cfg.h
2025-04-26 16:03:23 +08:00

97 lines
3.1 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/** ##########################################################################
** Filename :
** Project :
** Module :
** Processor :
** Version : 1.0
** Compiler :
** Date/Time :
** Abstract :
** Contents :
** Note : 此文档用于规范代码书写;
* 注意,
* 1.所有文件用UTF-8格式
* 2.tab键空格4个
* 3.各模块,都要有 初始化函数 init, 反初始化函数 deinit,
* 周期任务task,进入休眠goto sleep,
* 唤醒后 goto wake ,判断是否可休眠judge_pre_sleep 等主要函数接口
* 4.
**
** (c) Copyright dmdz Co.,Ltd
** --------------------------------------------------------------------------
** R E V I S I O N H I S T O R Y
** --------------------------------------------------------------------------
** Date Ver Author Description
** -20191106- --V01-- --LYJ--- --初版--
** -20230602- --V1.0-- --mingyea--- --修改--
** #########################################################################*/
#ifndef STACK_CHECK_CFG_H__
#define STACK_CHECK_CFG_H__
/*---------------------------------------------------------------------------
- I N C L U D E F I L E S
----------------------------------------------------------------------------*/
#include "common_types.h"
#include "cpu.h"
#include "common_cfg.h"
/*---------------------------------------------------------------------------
- D E F I N E S / M A C R O S
----------------------------------------------------------------------------*/
#define STACK_CHECK_DEBUG_EN 1
#define STACK_CHECK_TIME_UNIT 100 //放在100ms 周期裡面
#define STACK_CHECK_TASK_TIME (200/STACK_CHECK_TIME_UNIT)
//预留16字节检测堆栈是否溢出
//#define RAM_STACK_CHECK_ADDR (0x20001ec0 -16u) //(m_data_end-__size_cstack__+1u - 16u)
#define RAM_STACK_CHECK_MAX_LEN 16u
#define RAM_STACK_CHECK_VALUE_BUF0 0x55u
#define RAM_STACK_CHECK_VALUE_BUF1 0x5eu
#define RAM_STACK_CHECK_VALUE_BUF2 0x5cu
#define RAM_STACK_CHECK_VALUE_BUF3 0x4eu
/*---------------------------------------------------------------------------
- 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
----------------------------------------------------------------------------*/
//extern const MEMORY_MAP_ROM_DATA_FOR_ASIL u8 g_stack_check_fix_value[RAM_STACK_CHECK_MAX_LEN] ;
/*---------------------------------------------------------------------------
- F U N C T I O N P R O T O T Y P E
----------------------------------------------------------------------------*/
#endif /* __BOOT_APP_CFG_H__ */