summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Kconfig6
-rw-r--r--src/SConscript11
-rw-r--r--src/clock.c2
-rw-r--r--src/kservice.c5
-rw-r--r--src/signal.c6
-rw-r--r--src/slab.c4
6 files changed, 13 insertions, 21 deletions
diff --git a/src/Kconfig b/src/Kconfig
index 138130dbaa..babbc83a01 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -97,6 +97,10 @@ menuconfig RT_DEBUG
if RT_DEBUG
+config RT_DEBUG_COLOR
+ bool "Enable color debugging log"
+ default y
+
config RT_DEBUG_INIT_CONFIG
bool "Enable debugging of components initialization"
default n
@@ -302,7 +306,7 @@ endmenu
config RT_VER_NUM
hex
- default 0x30102
+ default 0x30103
help
RT-Thread version number
diff --git a/src/SConscript b/src/SConscript
index bb38baa6bd..7f448725a2 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -5,15 +5,6 @@ from building import *
src = Glob('*.c')
CPPPATH = [RTT_ROOT + '/include']
-if rtconfig.CROSS_TOOL == 'keil':
- # add more link flags for module and components_init.
- LINKFLAGS = ''
- if GetDepend('RT_USING_MODULE'):
- LINKFLAGS += ' --keep *.o(RTMSymTab) '
- if GetDepend('RT_USING_COMPONENTS_INIT'):
- LINKFLAGS += ' --keep *.o(.rti_fn.*) '
-else:
- LINKFLAGS = ''
if GetDepend('RT_USING_COMPONENTS_INIT') == False:
SrcRemove(src, ['components.c'])
@@ -38,6 +29,6 @@ if GetDepend('RT_USING_MEMHEAP') == False:
if GetDepend('RT_USING_DEVICE') == False:
SrcRemove(src, ['device.c'])
-group = DefineGroup('Kernel', src, depend = [''], CPPPATH = CPPPATH, LINKFLAGS = LINKFLAGS)
+group = DefineGroup('Kernel', src, depend = [''], CPPPATH = CPPPATH)
Return('group')
diff --git a/src/clock.c b/src/clock.c
index 651465e0a8..36ff398376 100644
--- a/src/clock.c
+++ b/src/clock.c
@@ -19,8 +19,6 @@
static rt_tick_t rt_tick = 0;
-extern void rt_timer_check(void);
-
/**
* This function will init system tick and set it to zero.
* @ingroup SystemInit
diff --git a/src/kservice.c b/src/kservice.c
index be70a0431e..7a3772473f 100644
--- a/src/kservice.c
+++ b/src/kservice.c
@@ -461,6 +461,7 @@ rt_int32_t rt_strcmp(const char *cs, const char *ct)
return (*cs - *ct);
}
RTM_EXPORT(rt_strcmp);
+
/**
* The strnlen() function returns the number of characters in the
* string pointed to by s, excluding the terminating null byte ('\0'),
@@ -476,11 +477,13 @@ rt_size_t rt_strnlen(const char *s, rt_ubase_t maxlen)
{
const char *sc;
- for (sc = s; *sc != '\0' && sc - s < maxlen; ++sc) /* nothing */
+ for (sc = s; *sc != '\0' && (rt_ubase_t)(sc - s) < maxlen; ++sc) /* nothing */
;
return sc - s;
}
+RTM_EXPORT(rt_strnlen);
+
/**
* This function will return the length of a string, which terminate will
* null character.
diff --git a/src/signal.c b/src/signal.c
index 3d2abcb890..8ffcf13ece 100644
--- a/src/signal.c
+++ b/src/signal.c
@@ -21,10 +21,8 @@
#define RT_SIG_INFO_MAX 32
#endif
-// #define DBG_ENABLE
#define DBG_SECTION_NAME "SIGN"
-#define DBG_COLOR
-#define DBG_LEVEL DBG_LOG
+#define DBG_LEVEL DBG_INFO
#include <rtdbg.h>
#define sig_mask(sig_no) (1u << sig_no)
@@ -51,8 +49,6 @@ static void _signal_entry(void *parameter)
register rt_base_t level;
rt_thread_t tid = rt_thread_self();
- dbg_enter;
-
while (1)
{
level = rt_hw_interrupt_disable();
diff --git a/src/slab.c b/src/slab.c
index bf26c84cca..f4806ddb60 100644
--- a/src/slab.c
+++ b/src/slab.c
@@ -398,10 +398,10 @@ void rt_system_heap_init(void *begin_addr, void *end_addr)
* Calculate the zone index for the allocation request size and set the
* allocation request size to that particular zone's chunk size.
*/
-rt_inline int zoneindex(rt_uint32_t *bytes)
+rt_inline int zoneindex(rt_size_t *bytes)
{
/* unsigned for shift opt */
- rt_uint32_t n = (rt_uint32_t) * bytes;
+ rt_uint32_t n = (rt_uint32_t)(*bytes);
if (n < 128)
{