From 94a727a4fe7716654e7773b359e73654676b513b Mon Sep 17 00:00:00 2001 From: Grissiom Date: Thu, 24 Jan 2013 12:52:42 +0800 Subject: [PATCH 1/3] link with libm.so This fix the compiling error: /usr/lib64/gcc/x86_64-slackware-linux/4.7.2/../../../../x86_64-slackware-linux/bin/ld: build/components/rtgui/common/dc.o: undefined reference to symbol 'sin@@GLIBC_2.2.5' /usr/lib64/gcc/x86_64-slackware-linux/4.7.2/../../../../x86_64-slackware-linux/bin/ld: note: 'sin@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line /lib64/libm.so.6: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status --- bsp/simulator/SConstruct | 1 + 1 file changed, 1 insertion(+) diff --git a/bsp/simulator/SConstruct b/bsp/simulator/SConstruct index 4dd5342cc6..12dbd7a025 100755 --- a/bsp/simulator/SConstruct +++ b/bsp/simulator/SConstruct @@ -55,6 +55,7 @@ else: TARGET = 'rtthread' env.Append(CCFLAGS=rtconfig.CFLAGS) env.Append(LINKFLAGS=rtconfig.LFLAGS) + env.Append(LIBS=['m']) # prepare building environment From 634c3a3518d5b63c2e9ed945c94195f630492976 Mon Sep 17 00:00:00 2001 From: Grissiom Date: Thu, 24 Jan 2013 12:54:20 +0800 Subject: [PATCH 2/3] rtgui_demo: port to new API --- bsp/simulator/rtgui_demo/snake/snake_gui.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bsp/simulator/rtgui_demo/snake/snake_gui.c b/bsp/simulator/rtgui_demo/snake/snake_gui.c index 836355236b..0df1ba7a87 100644 --- a/bsp/simulator/rtgui_demo/snake/snake_gui.c +++ b/bsp/simulator/rtgui_demo/snake/snake_gui.c @@ -365,7 +365,7 @@ void snake_main(void) struct rtgui_win *win; rtgui_rect_t rect; - application = rtgui_app_create(rt_thread_self(), "sanke_app"); + application = rtgui_app_create("sanke_app"); if (application != RT_NULL) { rtgui_get_screen_rect(&rect); @@ -397,4 +397,4 @@ void snake_main(void) } #include -FINSH_FUNCTION_EXPORT(snake_main, snake run) \ No newline at end of file +FINSH_FUNCTION_EXPORT(snake_main, snake run) From 0961cc5e36154b1eb2c474cb9472fdf5201c1cf5 Mon Sep 17 00:00:00 2001 From: Grissiom Date: Thu, 24 Jan 2013 13:06:12 +0800 Subject: [PATCH 3/3] simulator: no need to dump the bin file --- bsp/simulator/rtconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp/simulator/rtconfig.py b/bsp/simulator/rtconfig.py index da63b843e2..38d346fce0 100755 --- a/bsp/simulator/rtconfig.py +++ b/bsp/simulator/rtconfig.py @@ -52,7 +52,7 @@ if PLATFORM == 'gcc': else: CFLAGS += ' -O2' - POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n' + POST_ACTION = '' elif PLATFORM == 'cl': # toolchains