diff --git a/checher_slave.uvoptx b/checher_slave.uvoptx index 54be2f2..0a3fb63 100644 --- a/checher_slave.uvoptx +++ b/checher_slave.uvoptx @@ -299,7 +299,7 @@ 1 0 - 0 + 1 18 @@ -377,7 +377,24 @@ - + + + 0 + 0 + 159 + 1 +
134301518
+ 0 + 0 + 0 + 0 + 0 + 1 + D:\work\SVN\鍐夊窛\mcu_program\checker_slave\source\soft\mystdlib.c + + \\checker_slave_app\source/soft/mystdlib.c\159 +
+
0 @@ -388,8 +405,8 @@ 1 - 8 - 0x0801d000 + 1 + 0x20002700 0 @@ -523,7 +540,7 @@ 1 0 - 1 + 0 18 @@ -607,7 +624,7 @@ 0 959 1 -
134254474
+
134254714
0 0 0 diff --git a/source/ReadMe.txt b/source/ReadMe.txt index 837699c..44bd31b 100644 --- a/source/ReadMe.txt +++ b/source/ReadMe.txt @@ -273,4 +273,6 @@ 添加重复执行指定任务的任务 2023.11.23 EJ工厂代码otp0地址校验 +2023.12.1 + 地址线使用下拉,app中也使用断言,线程栈默认填充0x23+pro,malloc失败直接进断言 diff --git a/source/elec_det/hardware/gpio_cfg.c b/source/elec_det/hardware/gpio_cfg.c index de6198e..eda011a 100644 --- a/source/elec_det/hardware/gpio_cfg.c +++ b/source/elec_det/hardware/gpio_cfg.c @@ -69,7 +69,8 @@ void CtrlGpio_DefInit(void) //GPIO 配置 GPIO_InitStructure.GPIO_Pin=SEG4_Pin|SEG3_Pin|SEG1_Pin|SEG2_Pin; - GPIO_InitStructure.GPIO_Mode=GPIO_Mode_IN_FLOATING; +// GPIO_InitStructure.GPIO_Mode=GPIO_Mode_IN_FLOATING; + GPIO_InitStructure.GPIO_Mode=GPIO_Mode_IPD; GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz; GPIO_Init(GPIOC,&GPIO_InitStructure); diff --git a/source/main/compiler_info.h b/source/main/compiler_info.h index 3f1a333..9c635a2 100644 --- a/source/main/compiler_info.h +++ b/source/main/compiler_info.h @@ -6,7 +6,7 @@ -#define BUILD_DATE "2023-11-22 14:44:51" +#define BUILD_DATE "2023-12-01 18:39:30" #define SOFT_VERSION "2.06" diff --git a/source/rt_thread/board.h b/source/rt_thread/board.h index 495bde4..21692ae 100644 --- a/source/rt_thread/board.h +++ b/source/rt_thread/board.h @@ -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 diff --git a/source/rt_thread/rtconfig.h b/source/rt_thread/rtconfig.h index b856f15..9061d0b 100644 --- a/source/rt_thread/rtconfig.h +++ b/source/rt_thread/rtconfig.h @@ -82,7 +82,7 @@ // The stack size of timer thread <0-8192> // Default: 512 -#define RT_TIMER_THREAD_STACK_SIZE 1024 +#define RT_TIMER_THREAD_STACK_SIZE 2048 // The soft-timer tick per second <0-1000> // Default: 100 diff --git a/source/rt_thread/src/thread.c b/source/rt_thread/src/thread.c index d741467..0d7072f 100644 --- a/source/rt_thread/src/thread.c +++ b/source/rt_thread/src/thread.c @@ -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), diff --git a/source/soft/mystdlib.c b/source/soft/mystdlib.c index 7c1188d..736d13e 100644 --- a/source/soft/mystdlib.c +++ b/source/soft/mystdlib.c @@ -15,6 +15,7 @@ typedef struct uint32_t memtblsize ; // 内存表大小 uint32_t memblksize; // 内存分块大小 uint32_t memsize ; // 内存总大小 + uint32_t used; void *mutex; }mallco_dev; @@ -71,7 +72,9 @@ int mem_perused(void) if(self->memmap[i])used++; } //return (used*100)/(self->memtblsize); - return used; + self->used=used*MEM_BLOCK_SIZE; + // 改为实际使用的字节数 + return self->used; } @@ -153,7 +156,7 @@ void *malloc(uint32_t size) } else{ used=mem_perused(); - param_check(used); + param_check(0); } return ret_addr; }