app启动时如果boot魔数校验错误则自动升级bootloader

This commit is contained in:
andy
2023-10-12 23:37:12 +08:00
parent 17b4ebf188
commit fda9545130
18 changed files with 2865 additions and 1408 deletions

View File

@@ -38,7 +38,7 @@
#ifdef DEBUG
typedef struct{
int inited;
@@ -95,7 +95,7 @@ void debug_log(const char *file,const char *fun,int line,int level,const char *f
#endif
}
#endif

View File

@@ -9,8 +9,11 @@
/*r{ 修改日志打印等级 }c*/
#ifdef DEBUG
#define DBG_LOG_LEVEL 0
#else
#define DBG_LOG_LEVEL 4
#endif
/*r{ 定义打印数据等级 }c*/
@@ -51,9 +54,17 @@
//#define DBG_LOG_(type_,msg_,...)\
// debug_log("-","-",__LINE__,type_,(msg_),##__VA_ARGS__)
#ifdef DEBUG
int debug_init(void);
void debug_log(const char *file,const char *fun,int line,int level,const char *fmt, ...);
#else
#define debug_init()
#define debug_log(...)
#endif