From f33c89ce5aed94bf143f7f4d0bd7e1e743176f06 Mon Sep 17 00:00:00 2001 From: liuduanfei <939763442@qq.com> Date: Wed, 14 Jul 2021 07:02:56 +0000 Subject: [PATCH 1/3] =?UTF-8?q?64=E4=BD=8D=E6=A8=A1=E5=BC=8F=E4=B8=8B=20?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=94=AF=E6=8C=81=20RT=5FPRINTF=5FLONGLONG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/kservice.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/kservice.c b/src/kservice.c index e9972dba97..dfb37dd888 100644 --- a/src/kservice.c +++ b/src/kservice.c @@ -30,6 +30,10 @@ /* use precision */ #define RT_PRINTF_PRECISION +#ifdef ARCH_CPU_64BIT + #define RT_PRINTF_LONGLONG +#endif + /** * @addtogroup KernelService */ From 1d276ac4b32f53899a60aff8d0406143177fe17e Mon Sep 17 00:00:00 2001 From: liuduanfei <939763442@qq.com> Date: Thu, 15 Jul 2021 08:28:30 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=E6=B8=85=E9=99=A4=20kservice.c=20=20?= =?UTF-8?q?=E4=B8=AD=E5=AF=B9=20RT=5FPRINTF=5FLONGLONG=20=E7=9A=84?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/kservice.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/kservice.c b/src/kservice.c index dfb37dd888..e9972dba97 100644 --- a/src/kservice.c +++ b/src/kservice.c @@ -30,10 +30,6 @@ /* use precision */ #define RT_PRINTF_PRECISION -#ifdef ARCH_CPU_64BIT - #define RT_PRINTF_LONGLONG -#endif - /** * @addtogroup KernelService */ From 4e40129e57f8c507514fc981fa742820a1a08e8a Mon Sep 17 00:00:00 2001 From: liuduanfei <939763442@qq.com> Date: Thu, 15 Jul 2021 08:30:17 +0000 Subject: [PATCH 3/3] =?UTF-8?q?Kconfig=20=E4=B8=AD=E6=B7=BB=E5=8A=A0=20RT?= =?UTF-8?q?=5FPRINTF=5FLONGLONG=20=E7=9A=84=E9=80=89=E6=8B=A9=EF=BC=8C?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E4=B8=8D=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Kconfig b/src/Kconfig index 6afb719395..a1b0ff9a17 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -347,6 +347,10 @@ menu "Kernel Device Object" config RT_CONSOLE_DEVICE_NAME string "the device name for console" default "uart" + + config RT_PRINTF_LONGLONG + bool "rt_kprintf support long long" + default n endif endmenu