소스 검색

update:排除luatos对csdk的耦合

alienwalker 2 년 전
부모
커밋
ef3de842ca
3개의 변경된 파일19개의 추가작업 그리고 7개의 파일을 삭제
  1. 13 0
      application/src/luat_base_air105.c
  2. 5 5
      bsp/air105/platform/app_main.c
  3. 1 2
      bsp/common/src/core_service.c

+ 13 - 0
application/src/luat_base_air105.c

@@ -40,6 +40,19 @@ void lv_bmp_init(void);
 void lv_png_init(void);
 void lv_split_jpeg_init(void);
 #endif
+extern const uint32_t __isr_start_address;
+const uint32_t __attribute__((section (".app_info")))
+    g_CAppInfo[8] =
+{
+	__APP_START_MAGIC__,
+	&__isr_start_address,
+	__BL_VERSION__,
+	__CORE_VERSION__,
+	__FLASH_BASE_ADDR__ + __FLASH_MAX_SIZE__ - FLASH_FS_REGION_SIZE * 1024,
+	__FLASH_BASE_ADDR__ + __FLASH_MAX_SIZE__ - LUAT_FS_SIZE * 1024,
+	0,
+	0,
+};
 
 LUAMOD_API int luaopen_usbapp( lua_State *L );
 

+ 5 - 5
bsp/air105/platform/app_main.c

@@ -20,7 +20,7 @@
  */
 
 #include "app_inc.h"
-#include "luat_conf_bsp.h"
+
 uint32_t SystemCoreClock;
 uint8_t gMainWDTEnable;
 static HANDLE prvWDTTimer;
@@ -33,16 +33,16 @@ extern const uint32_t __init_fun_array_start;
 extern const uint32_t __init_fun_array_end;
 extern const uint32_t __task_fun_array_start;
 extern const uint32_t __task_fun_array_end;
-#define SCRIPT_LUADB_START_ADDR			(__FLASH_BASE_ADDR__ + __CORE_FLASH_BLOCK_NUM__ * __FLASH_BLOCK_SIZE__)
-const uint32_t __attribute__((section (".app_info")))
+
+const uint32_t __attribute__((section (".app_info"))) __attribute__((weak))
     g_CAppInfo[8] =
 {
 	__APP_START_MAGIC__,
 	&__isr_start_address,
 	__BL_VERSION__,
 	__CORE_VERSION__,
-	__FLASH_BASE_ADDR__ + __FLASH_MAX_SIZE__ - FLASH_FS_REGION_SIZE * 1024,
-	__FLASH_BASE_ADDR__ + __FLASH_MAX_SIZE__ - LUAT_FS_SIZE * 1024,
+	0,
+	0,
 	0,
 	0,
 };

+ 1 - 2
bsp/common/src/core_service.c

@@ -22,7 +22,6 @@
 #include "user.h"
 #ifdef __BUILD_OS__
 #include "global_config.h"
-#include "luat_conf_bsp.h"
 #include "zbar.h"
 #include "symbol.h"
 #include "image.h"
@@ -614,7 +613,7 @@ static void prvCore_PrintTaskStack(HANDLE TaskHandle)
 	for(i = 0; i < 16, SP < StackAddress + Len; SP += 4)
 	{
 		PC = *((uint32_t *) SP) - 4;
-		if ((PC > __FLASH_APP_START_ADDR__) && (PC < (__FLASH_BASE_ADDR__ + __FLASH_MAX_SIZE__ - FLASH_FS_REGION_SIZE * 1024)))
+		if ((PC > __FLASH_APP_START_ADDR__) && (PC < (__FLASH_BASE_ADDR__ + __FLASH_MAX_SIZE__)))
 		{
 
 	        if (PC % 2 == 0) {