diff --git a/.config b/.config
index ad14d51..fd91bd2 100644
--- a/.config
+++ b/.config
@@ -178,7 +178,8 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
#
# Socket is in the 'Network' category
#
-# CONFIG_RT_USING_CPLUSPLUS is not set
+CONFIG_RT_USING_CPLUSPLUS=y
+# CONFIG_RT_USING_CPLUSPLUS11 is not set
#
# Network
diff --git a/project.uvoptx b/project.uvoptx
index 277301c..a46275d 100644
--- a/project.uvoptx
+++ b/project.uvoptx
@@ -291,8 +291,8 @@
- CPU
- 0
+ CPlusPlus
+ 1
0
0
0
@@ -303,14 +303,82 @@
0
0
0
- rt-thread\libcpu\arm\common\backtrace.c
- backtrace.c
+ rt-thread\components\libc\cplusplus\cxx_crt_init.c
+ cxx_crt_init.c
0
0
2
10
+ 8
+ 0
+ 0
+ 0
+ rt-thread\components\libc\cplusplus\cxx_Semaphore.cpp
+ cxx_Semaphore.cpp
+ 0
+ 0
+
+
+ 2
+ 11
+ 8
+ 0
+ 0
+ 0
+ rt-thread\components\libc\cplusplus\cxx_Thread.cpp
+ cxx_Thread.cpp
+ 0
+ 0
+
+
+ 2
+ 12
+ 8
+ 0
+ 0
+ 0
+ rt-thread\components\libc\cplusplus\cxx_Mutex.cpp
+ cxx_Mutex.cpp
+ 0
+ 0
+
+
+ 2
+ 13
+ 8
+ 0
+ 0
+ 0
+ rt-thread\components\libc\cplusplus\cxx_crt.cpp
+ cxx_crt.cpp
+ 0
+ 0
+
+
+
+
+ CPU
+ 0
+ 0
+ 0
+ 0
+
+ 3
+ 14
+ 1
+ 0
+ 0
+ 0
+ rt-thread\libcpu\arm\common\backtrace.c
+ backtrace.c
+ 0
+ 0
+
+
+ 3
+ 15
1
0
0
@@ -321,8 +389,8 @@
0
- 2
- 11
+ 3
+ 16
1
0
0
@@ -333,8 +401,8 @@
0
- 2
- 12
+ 3
+ 17
2
0
0
@@ -345,8 +413,8 @@
0
- 2
- 13
+ 3
+ 18
1
0
0
@@ -360,13 +428,13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,8 @@
0
- 7
- 62
+ 8
+ 67
1
0
0
@@ -985,8 +1053,8 @@
0
- 7
- 63
+ 8
+ 68
1
0
0
@@ -997,8 +1065,8 @@
0
- 7
- 64
+ 8
+ 69
1
0
0
@@ -1009,8 +1077,8 @@
0
- 7
- 65
+ 8
+ 70
1
0
0
diff --git a/project.uvprojx b/project.uvprojx
index f83bc58..13a2eeb 100644
--- a/project.uvprojx
+++ b/project.uvprojx
@@ -10,7 +10,7 @@
rt-thread
0x4
ARM-ADS
- 5060750::V5.06 update 6 (build 750)::ARMCC
+ 5060960::V5.06 update 7 (build 960)::.\ARMCC
0
@@ -339,7 +339,7 @@
__STDC_LIMIT_MACROS, STM32F413xx, USE_HAL_DRIVER, RT_USING_LIBC, __CLK_TCK=RT_TICK_PER_SECOND, __RTTHREAD__, RT_USING_ARM_LIBC
- rt-thread\components\drivers\include;rt-thread\components\libc\posix\io\poll;libraries\STM32F4xx_HAL\STM32F4xx_HAL_Driver\Inc;.;board\CubeMX_Config\Inc;rt-thread\components\libc\posix\ipc;libraries\STM32F4xx_HAL\CMSIS\Device\ST\STM32F4xx\Include;rt-thread\components\libc\compilers\common\include;libraries\HAL_Drivers;rt-thread\components\drivers\include;rt-thread\components\libc\compilers\common\extension\fcntl\octal;board;rt-thread\components\libc\posix\io\stdio;rt-thread\libcpu\arm\common;rt-thread\components\drivers\include;rt-thread\include;rt-thread\components\libc\compilers\common\extension;libraries\HAL_Drivers\config;rt-thread\components\finsh;rt-thread\libcpu\arm\cortex-m4;rt-thread\components\drivers\include;libraries\HAL_Drivers\CMSIS\Include
+ rt-thread\components\drivers\include;rt-thread\components\libc\posix\io\poll;libraries\STM32F4xx_HAL\STM32F4xx_HAL_Driver\Inc;.;board\CubeMX_Config\Inc;rt-thread\components\libc\posix\ipc;libraries\STM32F4xx_HAL\CMSIS\Device\ST\STM32F4xx\Include;rt-thread\components\libc\compilers\common\include;libraries\HAL_Drivers;rt-thread\components\drivers\include;rt-thread\components\libc\compilers\common\extension\fcntl\octal;board;rt-thread\components\libc\posix\io\stdio;rt-thread\libcpu\arm\common;rt-thread\components\drivers\include;rt-thread\include;rt-thread\components\libc\compilers\common\extension;libraries\HAL_Drivers\config;rt-thread\components\finsh;rt-thread\libcpu\arm\cortex-m4;rt-thread\components\drivers\include;libraries\HAL_Drivers\CMSIS\Include;rt-thread\components\libc\cplusplus
@@ -425,6 +425,36 @@
+
+ CPlusPlus
+
+
+ cxx_crt_init.c
+ 1
+ rt-thread\components\libc\cplusplus\cxx_crt_init.c
+
+
+ cxx_Semaphore.cpp
+ 8
+ rt-thread\components\libc\cplusplus\cxx_Semaphore.cpp
+
+
+ cxx_Thread.cpp
+ 8
+ rt-thread\components\libc\cplusplus\cxx_Thread.cpp
+
+
+ cxx_Mutex.cpp
+ 8
+ rt-thread\components\libc\cplusplus\cxx_Mutex.cpp
+
+
+ cxx_crt.cpp
+ 8
+ rt-thread\components\libc\cplusplus\cxx_crt.cpp
+
+
+
CPU
diff --git a/rt-thread/components/libc/cplusplus/cxx_crt_init.c b/rt-thread/components/libc/cplusplus/cxx_crt_init.c
index 4694608..eac5f5f 100644
--- a/rt-thread/components/libc/cplusplus/cxx_crt_init.c
+++ b/rt-thread/components/libc/cplusplus/cxx_crt_init.c
@@ -34,7 +34,7 @@ RT_WEAK void *__dso_handle = 0;
#endif
-RT_WEAK int cplusplus_system_init(void)
+int cplusplus_system_init(void)
{
#if defined(__ARMCC_VERSION)
/* If there is no SHT$$INIT_ARRAY, calling
@@ -65,4 +65,4 @@ RT_WEAK int cplusplus_system_init(void)
return 0;
}
-INIT_COMPONENT_EXPORT(cplusplus_system_init);
+//INIT_COMPONENT_EXPORT(cplusplus_system_init);
diff --git a/rtconfig.h b/rtconfig.h
index 77e2d30..935eab2 100644
--- a/rtconfig.h
+++ b/rtconfig.h
@@ -95,6 +95,7 @@
/* Socket is in the 'Network' category */
+#define RT_USING_CPLUSPLUS
/* Network */