diff --git a/.cproject b/.cproject
index c70237d..7b03eb0 100644
--- a/.cproject
+++ b/.cproject
@@ -47,7 +47,7 @@
-
+
-
@@ -113,7 +114,7 @@
-
@@ -132,7 +133,7 @@
-
+
@@ -143,7 +144,7 @@
-
+
@@ -184,6 +185,7 @@
+
@@ -208,6 +210,85 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.settings/828.STLink.Debug.rttlaunch b/.settings/828.STLink.Debug.rttlaunch
index 2d76145..6c9375d 100644
--- a/.settings/828.STLink.Debug.rttlaunch
+++ b/.settings/828.STLink.Debug.rttlaunch
@@ -6,11 +6,14 @@
+
+
+
@@ -30,6 +33,7 @@
+
@@ -37,21 +41,19 @@
+
-
-
-
-
-
+
+
diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml
index 26c2988..e18944c 100644
--- a/.settings/language.settings.xml
+++ b/.settings/language.settings.xml
@@ -5,7 +5,7 @@
-
+
diff --git a/applications/RUN_LED/RUN_LED.c b/applications/RUN_LED/RUN_LED.c
new file mode 100644
index 0000000..8bed365
--- /dev/null
+++ b/applications/RUN_LED/RUN_LED.c
@@ -0,0 +1,37 @@
+#include
+#include
+#include
+#include"drv_common.h"
+
+#define LED_PIN GET_PIN(C,13)
+
+/* 线程 1 的入口函数 */
+void RUN_LED(void *parameter)
+{
+ rt_pin_mode(LED_PIN, PIN_MODE_OUTPUT);
+ while (1)
+ {
+ rt_pin_write(LED_PIN, PIN_HIGH);
+ rt_thread_mdelay(500);
+ rt_pin_write(LED_PIN, PIN_LOW);
+ rt_thread_mdelay(500);
+ }
+}
+
+/* 线程示例 */
+void thread_RUN_LED(void)
+{
+ /* 初始化线程 1,名称是 thread1,入口是 thread1_entry*/
+ rt_thread_t tid;
+ tid = rt_thread_create("led", RUN_LED, RT_NULL, 512, 3, 10);
+
+ if (tid != RT_NULL)
+ {
+ rt_thread_startup(tid);
+ }
+ else
+ {
+ rt_kprintf("Failed to create led thread!\n");
+ }
+ // return 0;
+}
diff --git a/applications/RUN_LED/RUN_LED.h b/applications/RUN_LED/RUN_LED.h
new file mode 100644
index 0000000..bcca667
--- /dev/null
+++ b/applications/RUN_LED/RUN_LED.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) 2006-2021, RT-Thread Development Team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Change Logs:
+ * Date Author Notes
+ * 2025-10-19 Administrator the first version
+ */
+#ifndef APPLICATIONS_RUN_LED_RUN_LED_H_
+#define APPLICATIONS_RUN_LED_RUN_LED_H_
+
+void thread_RUN_LED(void);
+
+#endif /* APPLICATIONS_RUN_LED_RUN_LED_H_ */
diff --git a/applications/main.c b/applications/main.c
index 011c072..46d49c2 100644
--- a/applications/main.c
+++ b/applications/main.c
@@ -9,10 +9,11 @@
*/
#include
-
#include "dfs_fs.h"
#include
+#include "RUN_LED.h"
+#include
#define DB_NAME "/rt.db"
#define DBG_TAG "main"
@@ -25,8 +26,47 @@ int main(void)
{
rt_thread_mdelay(100); //等待sd_mount线程挂载文件系统,可使用IPC信号量完成同步,提高实时性
- int db_helper_init(void);
+ thread_RUN_LED();
+
+ //int db_HelperInit;
+ // db_HelperInit = db_helper_init();
+
+ // if(db_HelperInit =RT_EOK){
+ // rt_kprintf("HelperInit database\n");
+ // }
+
+
+
+
+
+
+
+
+ // int db_helper_init();
+
+ // sqlite3 *db;
+ // int8_t rc;
+
+ // rc = sqlite3_open("rt.db", &db);
+ // if (rc != SQLITE_OK)
+ // {
+ //rt_kprintf("Cannot open database: %s\n", sqlite3_errmsg(db));
+ //return -1;
+ // }else{
+ // rt_kprintf("Database opened successfully\n");
+ // sqlite3_close(db);
+ // }
+ // sqlite3_os_init();
+ //if(int sqlite3_os_init()==RT_EOK){LOG_D("Sqlite int RT_EOK!");}
+
+
// sqlite3_os_init();
+ /* int rc = db_connect("/rt.db");
+ if (rc <0) {
+ const char *sql = "CREATE TABLE student(id INTEGER PRIMARY KEY AUTOINCREMENT,name varchar(32) NOT NULL,score INT NOT NULL);";
+ int db_create_database(sql);
+ }*/
+
return RT_EOK;
}
diff --git a/applications/mount_sdio_elmfatfs.c b/applications/mount_sdio_elmfatfs.c
index 78f1a6f..a6ce020 100644
--- a/applications/mount_sdio_elmfatfs.c
+++ b/applications/mount_sdio_elmfatfs.c
@@ -42,7 +42,7 @@ int stm32_sdcard_mount(void)
rt_thread_t tid;
tid = rt_thread_create("sd_mount", sd_mount, RT_NULL,
- 2048, RT_THREAD_PRIORITY_MAX - 2, 20);
+ 1024*4, RT_THREAD_PRIORITY_MAX - 2, 20);
if (tid != RT_NULL)
{
rt_thread_startup(tid);
diff --git a/packages/packages.dbsqlite b/packages/packages.dbsqlite
index 5d3ff58..3b94437 100644
Binary files a/packages/packages.dbsqlite and b/packages/packages.dbsqlite differ
diff --git a/rtconfig.h b/rtconfig.h
index 19d6f5c..c01ca8e 100644
--- a/rtconfig.h
+++ b/rtconfig.h
@@ -61,7 +61,7 @@
#define RT_USING_COMPONENTS_INIT
#define RT_USING_USER_MAIN
-#define RT_MAIN_THREAD_STACK_SIZE 2048
+#define RT_MAIN_THREAD_STACK_SIZE 1024*16
#define RT_MAIN_THREAD_PRIORITY 10
#define RT_USING_LEGACY
#define RT_USING_MSH
@@ -109,7 +109,7 @@
#define RT_SERIAL_RB_BUFSZ 64
#define RT_USING_PIN
#define RT_USING_SDIO
-#define RT_SDIO_STACK_SIZE 1024
+#define RT_SDIO_STACK_SIZE 1024*2
#define RT_SDIO_THREAD_PRIORITY 15
#define RT_MMCSD_STACK_SIZE 1024
#define RT_MMCSD_THREAD_PREORITY 22