app启动时如果boot魔数校验错误则自动升级bootloader
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user