Parcourir la source

Merge pull request #10 from WaterFishJ/master

修复RT-Thread编译不通过的问题
朱天龙 (Armink) il y a 4 ans
Parent
commit
89e49db416

+ 2 - 1
porting/npl/rtthread/include/nimble/nimble_npl_os.h

@@ -3,6 +3,7 @@
  *
  * Date           Author       Notes
  * 2018-12-18     ZeroFree     first implementation
+ * 2021-08-18     WaterFishJ   fix the include file name
  */
 
 #ifndef _NIMBLE_NPL_OS_H_
@@ -13,7 +14,7 @@
 #include <string.h>
 
 /* errno definitions for RT-Thread libc*/
-#include "libc/libc_errno.h"
+#include "errno.h"
 
 // TODO: _Static_assert support
 #ifndef _Static_assert

+ 3 - 0
porting/npl/rtthread/src/nimble_port_rtthread.c

@@ -3,6 +3,7 @@
  *
  * Date           Author       Notes
  * 2018-12-18     ChenYong     first implementation
+ * 2021-08-19     WaterFishJ   fix the assert bug
  */
 
 
@@ -18,10 +19,12 @@ static rt_thread_t ll_task_h;
 
 extern void ble_ll_task(void *arg);
 
+#ifdef RT_DEBUG
 RT_WEAK void __aeabi_assert(const char *expr, const char *file, int line)
 {
     rt_assert_handler(expr, file, line);
 }
+#endif
 
 int nimble_port_rtthread_init(void)
 {