rtm.h 486 字节
Newer Older
qiuyiuestc's avatar
qiuyiuestc 已提交
1 2 3 4
#ifndef __RTM_H__
#define __RTM_H__

#include <rtdef.h>
qiuyiuestc's avatar
qiuyiuestc 已提交
5
#include <rtthread.h>
qiuyiuestc's avatar
qiuyiuestc 已提交
6 7 8 9 10 11 12 13 14

#ifdef RT_USING_MODULE
#define RTM_EXPORT(symbol)					 							\
const char __rtmsym_##symbol##_name[] = #symbol;					 	\
const struct rt_module_symtab __rtmsym_##symbol SECTION("RTMSymTab")= 	\
{								\
	(rt_uint32_t)&symbol,		\
	__rtmsym_##symbol##_name,	\
};
qiuyiuestc's avatar
qiuyiuestc 已提交
15

qiuyiuestc's avatar
qiuyiuestc 已提交
16 17 18 19 20 21 22 23 24 25 26
#else
#define RTM_EXPORT(symbol)	
#endif

struct rt_module_symtab
{
	rt_uint32_t addr;
	const char* name;
};

#endif