From cf692a4ab45b8f2c29410f074a49edec693d24f7 Mon Sep 17 00:00:00 2001 From: Grissiom Date: Mon, 1 Dec 2014 18:54:14 +0800 Subject: [PATCH 1/2] msh: use list_memheap when RT_USING_MEMHEAP_AS_HEAP is enabled There is no list_mem and only list_memheap when RT_USING_MEMHEAP_AS_HEAP is enabled. --- components/finsh/msh_cmd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/finsh/msh_cmd.c b/components/finsh/msh_cmd.c index ca92ef7a6d..206b640c16 100644 --- a/components/finsh/msh_cmd.c +++ b/components/finsh/msh_cmd.c @@ -281,7 +281,11 @@ int cmd_free(int argc, char** argv) { extern void list_mem(void); +#ifdef RT_USING_MEMHEAP_AS_HEAP + list_memheap(); +#else list_mem(); +#endif return 0; } FINSH_FUNCTION_EXPORT_ALIAS(cmd_free, __cmd_free, Show the memory usage in the system.); From 4bb6c8cf0c6f4ac73c835b118eb7166264e1a842 Mon Sep 17 00:00:00 2001 From: Grissiom Date: Mon, 1 Dec 2014 18:54:55 +0800 Subject: [PATCH 2/2] module: add !__CC_ARM when test __GNUC__ ARMCC will define __GNUC__ in "GNU mode"(with --gnu command line option). So iff __GNUC__ && !__CC_ARM is GCC. --- src/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/module.c b/src/module.c index 5d5d02c580..1c20de731d 100644 --- a/src/module.c +++ b/src/module.c @@ -82,7 +82,7 @@ static struct rt_module_symtab *_rt_module_symtab_end = RT_NULL; */ int rt_system_module_init(void) { -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__CC_ARM) extern int __rtmsymtab_start; extern int __rtmsymtab_end;