405 DR: 启用 ulog & 系统线程调整

Signed-off-by: a1012112796 <1012112796@qq.com>
This commit is contained in:
2024-07-31 09:50:16 +08:00
parent 7faf6491ec
commit aa1b0ccb18
5 changed files with 92 additions and 28 deletions

View File

@@ -20,7 +20,7 @@ CONFIG_RT_USING_HOOK=y
CONFIG_RT_HOOK_USING_FUNC_PTR=y CONFIG_RT_HOOK_USING_FUNC_PTR=y
CONFIG_RT_USING_IDLE_HOOK=y CONFIG_RT_USING_IDLE_HOOK=y
CONFIG_RT_IDLE_HOOK_LIST_SIZE=4 CONFIG_RT_IDLE_HOOK_LIST_SIZE=4
CONFIG_IDLE_THREAD_STACK_SIZE=256 CONFIG_IDLE_THREAD_STACK_SIZE=1024
# CONFIG_RT_USING_TIMER_SOFT is not set # CONFIG_RT_USING_TIMER_SOFT is not set
# #
@@ -255,7 +255,36 @@ CONFIG_RT_USING_CPLUSPLUS=y
# Utilities # Utilities
# #
# CONFIG_RT_USING_RYM is not set # CONFIG_RT_USING_RYM is not set
# CONFIG_RT_USING_ULOG is not set CONFIG_RT_USING_ULOG=y
# CONFIG_ULOG_OUTPUT_LVL_A is not set
# CONFIG_ULOG_OUTPUT_LVL_E is not set
# CONFIG_ULOG_OUTPUT_LVL_W is not set
# CONFIG_ULOG_OUTPUT_LVL_I is not set
CONFIG_ULOG_OUTPUT_LVL_D=y
CONFIG_ULOG_OUTPUT_LVL=7
CONFIG_ULOG_USING_ISR_LOG=y
CONFIG_ULOG_ASSERT_ENABLE=y
CONFIG_ULOG_LINE_BUF_SIZE=128
CONFIG_ULOG_USING_ASYNC_OUTPUT=y
CONFIG_ULOG_ASYNC_OUTPUT_BUF_SIZE=2048
CONFIG_ULOG_ASYNC_OUTPUT_BY_THREAD=y
CONFIG_ULOG_ASYNC_OUTPUT_THREAD_STACK=2048
CONFIG_ULOG_ASYNC_OUTPUT_THREAD_PRIORITY=30
#
# log format
#
CONFIG_ULOG_OUTPUT_FLOAT=y
CONFIG_ULOG_USING_COLOR=y
CONFIG_ULOG_OUTPUT_TIME=y
CONFIG_ULOG_TIME_USING_TIMESTAMP=y
CONFIG_ULOG_OUTPUT_LEVEL=y
CONFIG_ULOG_OUTPUT_TAG=y
# CONFIG_ULOG_OUTPUT_THREAD_NAME is not set
CONFIG_ULOG_BACKEND_USING_CONSOLE=y
# CONFIG_ULOG_BACKEND_USING_FILE is not set
# CONFIG_ULOG_USING_FILTER is not set
# CONFIG_ULOG_USING_SYSLOG is not set
# CONFIG_RT_USING_UTEST is not set # CONFIG_RT_USING_UTEST is not set
# CONFIG_RT_USING_VAR_EXPORT is not set # CONFIG_RT_USING_VAR_EXPORT is not set
# CONFIG_RT_USING_RT_LINK is not set # CONFIG_RT_USING_RT_LINK is not set

View File

@@ -10,7 +10,6 @@
<TargetName>rt-thread</TargetName> <TargetName>rt-thread</TargetName>
<ToolsetNumber>0x4</ToolsetNumber> <ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName> <ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
<uAC6>0</uAC6> <uAC6>0</uAC6>
<TargetOption> <TargetOption>
<TargetCommonOption> <TargetCommonOption>
@@ -339,7 +338,7 @@
<MiscControls></MiscControls> <MiscControls></MiscControls>
<Define>__STDC_LIMIT_MACROS, USE_HAL_DRIVER, RT_USING_LIBC, __CLK_TCK=RT_TICK_PER_SECOND, __RTTHREAD__, STM32F405xx, RT_USING_ARM_LIBC</Define> <Define>__STDC_LIMIT_MACROS, USE_HAL_DRIVER, RT_USING_LIBC, __CLK_TCK=RT_TICK_PER_SECOND, __RTTHREAD__, STM32F405xx, RT_USING_ARM_LIBC</Define>
<Undefine></Undefine> <Undefine></Undefine>
<IncludePath>..\rt-thread\components\drivers\usb\usbdevice;..\rt-thread\components\libc\compilers\common\extension;..\rt-thread\components\libc\posix\io\poll;..\rt-thread\components\drivers\include;..\libraries\HAL_Drivers\CMSIS\Include;..\rt-thread\components\libc\posix\io\stdio;..\rt-thread\components\drivers\include;..\rt-thread\include;..\rt-thread\components\drivers\spi;..\libraries\HAL_Drivers\config;board;..\rt-thread\components\dfs\include;..\rt-thread\components\drivers\include;..\libraries\STM32F4xx_HAL\CMSIS\Device\ST\STM32F4xx\Include;..\rt-thread\components\drivers\include;..\libraries\HAL_Drivers\drv_flash;board\CubeMX_Config\Inc;..\rt-thread\components\finsh;..\rt-thread\components\dfs\filesystems\elmfat;..\rt-thread\components\libc\cplusplus;..\rt-thread\libcpu\arm\cortex-m4;..\rt-thread\components\drivers\include;..\libraries\STM32F4xx_HAL\STM32F4xx_HAL_Driver\Inc;..\rt-thread\components\libc\posix\ipc;..\rt-thread\components\libc\compilers\common\include;..\rt-thread\components\drivers\include;.;..\rt-thread\components\libc\compilers\common\extension\fcntl\octal;..\rt-thread\components\fal\inc;..\rt-thread\libcpu\arm\common;..\libraries\HAL_Drivers</IncludePath> <IncludePath>..\rt-thread\components\drivers\usb\usbdevice;..\rt-thread\components\libc\compilers\common\extension;..\rt-thread\components\libc\posix\io\poll;..\rt-thread\components\utilities\ulog;..\rt-thread\components\drivers\include;..\libraries\HAL_Drivers\CMSIS\Include;..\rt-thread\components\libc\posix\io\stdio;..\rt-thread\components\drivers\include;..\rt-thread\include;..\rt-thread\components\drivers\spi;..\libraries\HAL_Drivers\config;board;..\rt-thread\components\dfs\include;..\rt-thread\components\drivers\include;..\libraries\STM32F4xx_HAL\CMSIS\Device\ST\STM32F4xx\Include;..\rt-thread\components\drivers\include;..\libraries\HAL_Drivers\drv_flash;board\CubeMX_Config\Inc;..\rt-thread\components\finsh;..\rt-thread\components\dfs\filesystems\elmfat;..\rt-thread\components\libc\cplusplus;..\rt-thread\libcpu\arm\cortex-m4;..\rt-thread\components\drivers\include;..\libraries\STM32F4xx_HAL\STM32F4xx_HAL_Driver\Inc;..\rt-thread\components\libc\posix\ipc;..\rt-thread\components\libc\compilers\common\include;..\rt-thread\components\drivers\include;.;..\rt-thread\components\libc\compilers\common\extension\fcntl\octal;..\rt-thread\components\fal\inc;..\rt-thread\libcpu\arm\common;..\libraries\HAL_Drivers</IncludePath>
</VariousControls> </VariousControls>
</Cads> </Cads>
<Aads> <Aads>
@@ -429,29 +428,29 @@
<GroupName>CPlusPlus</GroupName> <GroupName>CPlusPlus</GroupName>
<Files> <Files>
<File> <File>
<FileName>cxx_Mutex.cpp</FileName> <FileName>cxx_crt_init.c</FileName>
<FileType>8</FileType> <FileType>1</FileType>
<FilePath>..\rt-thread\components\libc\cplusplus\cxx_Mutex.cpp</FilePath> <FilePath>..\rt-thread\components\libc\cplusplus\cxx_crt_init.c</FilePath>
</File>
<File>
<FileName>cxx_Thread.cpp</FileName>
<FileType>8</FileType>
<FilePath>..\rt-thread\components\libc\cplusplus\cxx_Thread.cpp</FilePath>
</File> </File>
<File> <File>
<FileName>cxx_crt.cpp</FileName> <FileName>cxx_crt.cpp</FileName>
<FileType>8</FileType> <FileType>8</FileType>
<FilePath>..\rt-thread\components\libc\cplusplus\cxx_crt.cpp</FilePath> <FilePath>..\rt-thread\components\libc\cplusplus\cxx_crt.cpp</FilePath>
</File> </File>
<File>
<FileName>cxx_Thread.cpp</FileName>
<FileType>8</FileType>
<FilePath>..\rt-thread\components\libc\cplusplus\cxx_Thread.cpp</FilePath>
</File>
<File> <File>
<FileName>cxx_Semaphore.cpp</FileName> <FileName>cxx_Semaphore.cpp</FileName>
<FileType>8</FileType> <FileType>8</FileType>
<FilePath>..\rt-thread\components\libc\cplusplus\cxx_Semaphore.cpp</FilePath> <FilePath>..\rt-thread\components\libc\cplusplus\cxx_Semaphore.cpp</FilePath>
</File> </File>
<File> <File>
<FileName>cxx_crt_init.c</FileName> <FileName>cxx_Mutex.cpp</FileName>
<FileType>1</FileType> <FileType>8</FileType>
<FilePath>..\rt-thread\components\libc\cplusplus\cxx_crt_init.c</FilePath> <FilePath>..\rt-thread\components\libc\cplusplus\cxx_Mutex.cpp</FilePath>
</File> </File>
</Files> </Files>
</Group> </Group>
@@ -638,16 +637,6 @@
<Group> <Group>
<GroupName>Fal</GroupName> <GroupName>Fal</GroupName>
<Files> <Files>
<File>
<FileName>fal_flash.c</FileName>
<FileType>1</FileType>
<FilePath>..\rt-thread\components\fal\src\fal_flash.c</FilePath>
</File>
<File>
<FileName>fal_rtt.c</FileName>
<FileType>1</FileType>
<FilePath>..\rt-thread\components\fal\src\fal_rtt.c</FilePath>
</File>
<File> <File>
<FileName>fal.c</FileName> <FileName>fal.c</FileName>
<FileType>1</FileType> <FileType>1</FileType>
@@ -658,6 +647,16 @@
<FileType>1</FileType> <FileType>1</FileType>
<FilePath>..\rt-thread\components\fal\src\fal_partition.c</FilePath> <FilePath>..\rt-thread\components\fal\src\fal_partition.c</FilePath>
</File> </File>
<File>
<FileName>fal_flash.c</FileName>
<FileType>1</FileType>
<FilePath>..\rt-thread\components\fal\src\fal_flash.c</FilePath>
</File>
<File>
<FileName>fal_rtt.c</FileName>
<FileType>1</FileType>
<FilePath>..\rt-thread\components\fal\src\fal_rtt.c</FilePath>
</File>
</Files> </Files>
</Group> </Group>
<Group> <Group>
@@ -990,6 +989,21 @@
</File> </File>
</Files> </Files>
</Group> </Group>
<Group>
<GroupName>Utilities</GroupName>
<Files>
<File>
<FileName>ulog.c</FileName>
<FileType>1</FileType>
<FilePath>..\rt-thread\components\utilities\ulog\ulog.c</FilePath>
</File>
<File>
<FileName>console_be.c</FileName>
<FileType>1</FileType>
<FilePath>..\rt-thread\components\utilities\ulog\backend\console_be.c</FilePath>
</File>
</Files>
</Group>
</Groups> </Groups>
</Target> </Target>
</Targets> </Targets>

View File

@@ -16,7 +16,7 @@
#define RT_HOOK_USING_FUNC_PTR #define RT_HOOK_USING_FUNC_PTR
#define RT_USING_IDLE_HOOK #define RT_USING_IDLE_HOOK
#define RT_IDLE_HOOK_LIST_SIZE 4 #define RT_IDLE_HOOK_LIST_SIZE 4
#define IDLE_THREAD_STACK_SIZE 256 #define IDLE_THREAD_STACK_SIZE 1024
/* kservice optimization */ /* kservice optimization */
@@ -142,6 +142,27 @@
/* Utilities */ /* Utilities */
#define RT_USING_ULOG
#define ULOG_OUTPUT_LVL_D
#define ULOG_OUTPUT_LVL 7
#define ULOG_USING_ISR_LOG
#define ULOG_ASSERT_ENABLE
#define ULOG_LINE_BUF_SIZE 128
#define ULOG_USING_ASYNC_OUTPUT
#define ULOG_ASYNC_OUTPUT_BUF_SIZE 2048
#define ULOG_ASYNC_OUTPUT_BY_THREAD
#define ULOG_ASYNC_OUTPUT_THREAD_STACK 2048
#define ULOG_ASYNC_OUTPUT_THREAD_PRIORITY 30
/* log format */
#define ULOG_OUTPUT_FLOAT
#define ULOG_USING_COLOR
#define ULOG_OUTPUT_TIME
#define ULOG_TIME_USING_TIMESTAMP
#define ULOG_OUTPUT_LEVEL
#define ULOG_OUTPUT_TAG
#define ULOG_BACKEND_USING_CONSOLE
/* RT-Thread online packages */ /* RT-Thread online packages */

View File

@@ -182,7 +182,7 @@
<hadIRAM>1</hadIRAM> <hadIRAM>1</hadIRAM>
<hadXRAM>0</hadXRAM> <hadXRAM>0</hadXRAM>
<uocXRam>0</uocXRam> <uocXRam>0</uocXRam>
<RvdsVP>1</RvdsVP> <RvdsVP>2</RvdsVP>
<RvdsMve>0</RvdsMve> <RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp> <RvdsCdeCp>0</RvdsCdeCp>
<hadIRAM2>1</hadIRAM2> <hadIRAM2>1</hadIRAM2>

View File

@@ -948,7 +948,7 @@ DWORD get_fattime(void)
struct tm tm_now; struct tm tm_now;
now = time(RT_NULL); now = time(RT_NULL);
gmtime_r(&now, &tm_now); localtime_r(&now, &tm_now);
fat_time = (DWORD)(tm_now.tm_year - 80) << 25 | fat_time = (DWORD)(tm_now.tm_year - 80) << 25 |
(DWORD)(tm_now.tm_mon + 1) << 21 | (DWORD)(tm_now.tm_mon + 1) << 21 |