2013-11-11 22:49:52 +08:00
|
|
|
|
# SQLite on RT-Thread
|
|
|
|
|
|
|
|
|
|
## 简介
|
|
|
|
|
初始版本基于SQLite 3.8.1版本,使用混合单文件结构源代码
|
2013-11-17 00:17:50 +08:00
|
|
|
|
|
|
|
|
|
测试方法:
|
|
|
|
|
1.
|
2013-11-17 13:25:46 +08:00
|
|
|
|
在rtconfig.h中定义一下宏,并打开newlib组件
|
2013-11-17 00:17:50 +08:00
|
|
|
|
/*
|
|
|
|
|
* SQLite compile macro
|
|
|
|
|
*/
|
|
|
|
|
#define RT_USING_SQLITE
|
2013-12-22 21:11:58 +08:00
|
|
|
|
2.
|
|
|
|
|
关注SQLite目录下的src/sqlite_config_rtthread.h
|
2013-11-24 01:52:49 +08:00
|
|
|
|
#define SQLITE_MINIMUM_FILE_DESCRIPTOR 0
|
2013-11-17 00:17:50 +08:00
|
|
|
|
#define SQLITE_OMIT_LOAD_EXTENSION 1
|
|
|
|
|
#define SQLITE_OMIT_WAL
|
2013-11-24 16:24:22 +08:00
|
|
|
|
#define SQLITE_RTTHREAD_NO_WIDE 1
|
2013-11-17 00:17:50 +08:00
|
|
|
|
#define SQLITE_ENABLE_LOCKING_STYLE 0
|
|
|
|
|
#define SQLITE_DISABLE_LOCKING_STYLE 1
|
|
|
|
|
#define SQLITE_TEMP_STORE 1
|
|
|
|
|
#define SQLITE_THREADSAFE 1
|
|
|
|
|
#define HAVE_READLINE 0
|
2013-11-17 13:25:46 +08:00
|
|
|
|
#define NDEBUG
|
2013-12-22 21:11:58 +08:00
|
|
|
|
#define _HAVE_SQLITE_CONFIG_H
|
2013-11-17 00:17:50 +08:00
|
|
|
|
#define BUILD_sqlite
|
2013-12-22 21:11:58 +08:00
|
|
|
|
#define SQLITE_OS_OTHER 1
|
|
|
|
|
#define SQLITE_OS_RTTHREAD 1
|
|
|
|
|
3.
|
2013-11-17 13:25:46 +08:00
|
|
|
|
用test目录下的test10.c来进行测试.
|
2013-11-17 00:17:50 +08:00
|
|
|
|
推荐用mini2440bsp,因为板子的ram较大。
|
|
|
|
|
|
|
|
|
|
注意shell.c还没有移植的。请不要使用。
|