地址线使用下拉,app中也使用断言,线程栈默认填充0x23+pro,malloc失败直接进断言

This commit is contained in:
ranchuan
2023-12-02 11:36:38 +08:00
parent 4a4b37d3f1
commit c4a1d5c088
8 changed files with 39 additions and 16 deletions

View File

@@ -176,16 +176,16 @@ void param_err_handle(const char *param,const char *file,const char *fun,int lin
void cpy4byte(uint32_t *dst,uint32_t *src,int num_4byte);
#ifdef DEBUG
//#ifdef DEBUG
// 如果s==0,则打印
#define param_check(s) \
if((s)==0){\
param_err_handle(#s,__FILE__,__func__,__LINE__);}
#else
//#else
#define param_check(s)
//#define param_check(s)
#endif
//#endif
#ifdef RT_THREAD

View File

@@ -82,7 +82,7 @@
// <o>The stack size of timer thread <0-8192>
// <i>Default: 512
#define RT_TIMER_THREAD_STACK_SIZE 1024
#define RT_TIMER_THREAD_STACK_SIZE 2048
// <o>The soft-timer tick per second <0-1000>
// <i>Default: 100

View File

@@ -152,7 +152,7 @@ static rt_err_t _rt_thread_init(struct rt_thread *thread,
thread->stack_size = stack_size;
/* init thread stack */
rt_memset(thread->stack_addr, '#', thread->stack_size);
rt_memset(thread->stack_addr, '#'+priority, thread->stack_size);
#ifdef ARCH_CPU_STACK_GROWS_UPWARD
thread->sp = (void *)rt_hw_stack_init(thread->entry, thread->parameter,
(void *)((char *)thread->stack_addr),