summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorprife <[email protected]>2013-10-01 17:43:38 +0800
committerprife <[email protected]>2013-10-14 22:53:59 +0800
commit5641360b4970de3afebe759117194556de6d2218 (patch)
tree298be29bd2017e6eb805652d4057215f48a5b6e2 /include
parentca9b83c68fcc2b841400a5f4c7728a111582ffb7 (diff)
simulator: add createdef.py to generate def file for VS
Now we can get rid off Mingw to create def file. To create def file, one should run: scons --def in the bsp/simulator.
Diffstat (limited to 'include')
-rw-r--r--include/rtm.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/rtm.h b/include/rtm.h
index ea35861352..6df77cfc5a 100644
--- a/include/rtm.h
+++ b/include/rtm.h
@@ -31,8 +31,15 @@ struct rt_module_symtab
const char *name;
};
-#if defined(_MSC_VER) || defined(__MINGW32__)
+#if defined(_MSC_VER)
+#pragma section("RTMSymTab$f",read)
+#define RTM_EXPORT(symbol) \
+__declspec(allocate("RTMSymTab$f"))const char __rtmsym_##symbol##_name[] = "__vs_rtm_"#symbol;
+#pragma comment(linker, "/merge:RTMSymTab=mytext")
+
+#elif defined(__MINGW32__)
#define RTM_EXPORT(symbol)
+
#else
#define RTM_EXPORT(symbol) \
const char __rtmsym_##symbol##_name[] = #symbol; \