diff options
| author | [email protected] <[email protected]> | 2011-09-25 02:28:07 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2011-09-25 02:28:07 +0000 |
| commit | 8e8b84dcdd07c4815a31fbcd23595df3565991e6 (patch) | |
| tree | abcbfcce9cf235544e586f3807a01d53544c569c | |
| parent | fef0997a379294aa96aacd2b112a190856afa1ae (diff) | |
update building script.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1728 bbd45198-f89e-11dd-88c7-29a3b14d5316
| -rw-r--r-- | src/SConscript | 25 | ||||
| -rw-r--r-- | src/kservice.c | 10 |
2 files changed, 34 insertions, 1 deletions
diff --git a/src/SConscript b/src/SConscript index 77018f4d2c..6f56c29ca6 100644 --- a/src/SConscript +++ b/src/SConscript @@ -2,12 +2,35 @@ Import('RTT_ROOT') Import('rtconfig') from building import * -src = Glob('*.c') +src = Split(''' +device.c +thread.c +scheduler.c +timer.c +irq.c +kservice.c +clock.c +object.c +mempool.c +ipc.c +idle.c +''') + CPPPATH = [RTT_ROOT + '/include'] if rtconfig.CROSS_TOOL == 'keil' and GetDepend('RT_USING_MODULE') == True: LINKFLAGS = ' --keep __rtmsym_* ' else: LINKFLAGS = '' + +if GetDepend('RT_USING_MODULE'): + src += Split('rtm.c') + src += Split('module.c') + +if GetDepend('RT_USING_SLAB'): + src += Split('slab.c') +else: + src += Split('mem.c') + group = DefineGroup('Kernel', src, depend = [''], CPPPATH = CPPPATH, LINKFLAGS = LINKFLAGS) Return('group') diff --git a/src/kservice.c b/src/kservice.c index 6ecb2a5995..34a3e8032e 100644 --- a/src/kservice.c +++ b/src/kservice.c @@ -941,6 +941,16 @@ rt_int32_t rt_sprintf(char *buf, const char *format, ...) #ifdef RT_USING_DEVICE /** + * This function returns the device using in console. + * + * @return the device using in console or RT_NULL + */ +rt_device_t rt_console_get_device(void) +{ + return _console_device; +} + +/** * This function will set a device as console device. * After set a device to console, all output of rt_kprintf will be * redirected to this new device. |
