diff --git a/Config.cpp b/Config.cpp index 7d8f2c87..821713b6 100644 --- a/Config.cpp +++ b/Config.cpp @@ -393,7 +393,13 @@ const Config& Config::CreateRAM() { // 最后一块作为配置区 static CharStorage cs; - static Config cfg(cs, Sys.StackTop(), 64); + static Config cfg(cs, Sys.StackTop(), 256); + + /*// 从堆申请一块内存 + if (cfg.Size == 0) { + cfg.Address = (uint)new byte[256]; + cfg.Size = 256; + }*/ return cfg; } diff --git a/Kernel/Sys.cpp b/Kernel/Sys.cpp index 394afeca..77394f97 100644 --- a/Kernel/Sys.cpp +++ b/Kernel/Sys.cpp @@ -89,7 +89,7 @@ void TSys::ShowInfo() const debug_printf("Time : "); DateTime::Now().Show(false); debug_printf(" Start: %d/%d \r\n", HotStart, StartTimes); - debug_printf("Support: http://www.WsLink.cn\r\n"); + //debug_printf("Support: http://www.WsLink.cn\r\n"); debug_printf("\r\n"); #endif diff --git a/Kernel/Task.cpp b/Kernel/Task.cpp index 610a7b56..e6a18ef9 100644 --- a/Kernel/Task.cpp +++ b/Kernel/Task.cpp @@ -124,7 +124,7 @@ INROOT bool Task::CheckTime(UInt64 end, bool isSleep) // 全局任务调度器 TaskScheduler* Task::Scheduler() { - static TaskScheduler _sc("Sys"); + static TaskScheduler _sc("Task"); return &_sc; } @@ -256,7 +256,7 @@ uint TaskScheduler::Add(Action func, void* param, int dueTime, int period, cstri Count++; #if DEBUG - debug_printf("%s::添加%d %s First=%dms Period=%dms 0x%p\r\n", Name, task->ID, name, dueTime, period, func); + debug_printf("%s::Add%d %s First=%dms Period=%dms 0x%p\r\n", Name, task->ID, name, dueTime, period, func); #endif return task->ID; @@ -271,7 +271,7 @@ void TaskScheduler::Remove(uint taskid) auto task = (Task*)_Tasks[i]; if(task->ID == taskid) { - debug_printf("%s::删除%d %s 0x%p\r\n", Name, task->ID, task->Name, task->Callback); + debug_printf("%s::Remove%d %s 0x%p\r\n", Name, task->ID, task->Name, task->Callback); // 清零ID,实现重用 task->ID = 0; diff --git a/Platform/CortexM/Sys.cpp b/Platform/CortexM/Sys.cpp index 8f2848d7..be60fd8c 100644 --- a/Platform/CortexM/Sys.cpp +++ b/Platform/CortexM/Sys.cpp @@ -177,7 +177,7 @@ uint TSys::HeapBase() const // 栈顶,后面是初始化不清零区域 uint TSys::StackTop() const { - return SRAM_BASE + (RAMSize << 10) - 0x40; + return SRAM_BASE + (RAMSize << 10) - 0x100; } void TSys::SetStackTop(uint addr)