From 8c3559339cc67e6e97ec951fd373ec6d34a6101f Mon Sep 17 00:00:00 2001 From: kyz Date: Thu, 19 Nov 2026 09:55:54 +0800 Subject: [PATCH] modify link sect for sdram --- APP/BSP/dev_jpeg.c | 2 +- APP/Common Module/load_file.c | 4 +- APP/Common Module/mem_sdram.c | 2 +- APP/Common Module/userboot.c | 4 +- APP/UI/ui_test_button.c | 4 +- APP/lfs/lfs_port.c | 6 +- APP/mb/event.c | 4 +- APP/user/user_export.c | 16 +- APP/user/user_iap.c | 2 +- APP/user/wave_data.c | 2 +- .../startup/arm/startup_SWM341.s | 8 +- Linker_Scatter_File/SWM34S_SDRAM.sct | 3 +- .../FreeRTOS-Kernel/portable/MemMang/heap_4.c | 2 +- .../lvgl/lvgl/examples/porting/lv_port_disp.c | 10 +- .../lvgl/examples/porting/lv_port_disp1.c | 4 +- .../lvgl/examples/porting/lv_port_disp2_1.c | 4 +- .../lvgl/examples/porting/lv_port_disp2_2.c | 4 +- .../lvgl/examples/porting/lv_port_disp3.c | 4 +- Middleware/lvgl/lvgl/lv_conf.h | 2 +- dispboard_app_sdram.uvprojx | 206 +++++++++--------- dispboard_bootloader.uvprojx | 203 +---------------- 21 files changed, 162 insertions(+), 334 deletions(-) diff --git a/APP/BSP/dev_jpeg.c b/APP/BSP/dev_jpeg.c index 4de1dfb..048c9df 100644 --- a/APP/BSP/dev_jpeg.c +++ b/APP/BSP/dev_jpeg.c @@ -32,7 +32,7 @@ * ºâÁ¿¶¯Ì¬Ó뾲̬ÄÚ´æ·ÖÅä¶ÔЧÂʵÄÓ°Ïì, ¹ÊÖ±½ÓÔÚ´ËÔ¤Ïȶ¨Ò忪±ÙÁËÒ»¿é JPEG_Decoder_Buff »º³åÇø×¨ÓÃÓÚ JPEG ½âÂëËùÐè */ uint8_t JPEG_Decoder_Buff[512 * 1024/*LCD_HDOT * LCD_VDOT * LCD_FMT*/] -__attribute__(( section(".SDRAM1"), aligned(4) )); +__attribute__(( section(".bss.SDRAM1"), aligned(4) )); /** ÖжϱêÖ¾ */ typedef enum diff --git a/APP/Common Module/load_file.c b/APP/Common Module/load_file.c index b3feb34..dea7360 100644 --- a/APP/Common Module/load_file.c +++ b/APP/Common Module/load_file.c @@ -88,10 +88,10 @@ static const char *Debug_FR_Table[] = /** FileSystem Object Structure Õ¼Óà RAM ºÜ¸ß, Óû§¿É¸ù¾Ý×ÔÉíʵ¼Ê¹¦ÄܽøÐÐËõ¼õ(min >= 2). * ×¢ÒâÐèҪͬ²½ disk_t ö¾Ù( load_file.h ÄÚ) / FF_VOLUMES ºê( ffconf.h ÄÚ). */ -static FATFS FatFs_Obj[FF_VOLUMES] __attribute__((section(".SDRAM1"))); +static FATFS FatFs_Obj[FF_VOLUMES] __attribute__((section(".bss.SDRAM1"))); /** ´ÅÅÌн¨¾í¹¤×÷ÇøÕ¼Óà RAM Ì«¸ß, ½öÖ§³ÖÒ»¸ö´ÅÅÌͬʱ½øÐÐмӾí. */ -static char Volume_Work[FF_MAX_SS] __attribute__((section(".SDRAM1"))); +static char Volume_Work[FF_MAX_SS] __attribute__((section(".bss.SDRAM1"))); // static char Volume_Work[FF_VOLUMES][FF_MAX_SS]; /******************************************************************************************************************************************* diff --git a/APP/Common Module/mem_sdram.c b/APP/Common Module/mem_sdram.c index 071dc29..57551b0 100644 --- a/APP/Common Module/mem_sdram.c +++ b/APP/Common Module/mem_sdram.c @@ -90,7 +90,7 @@ typedef struct *******************************************************************************************************************************************/ /** ÄÚ´æ³Ø */ static uint8_t Memory_Pool[(SDRAMM_SIZE - (LCD_HDOT * LCD_VDOT * LCD_FMT * 2) - 512 * 1024 - LV_MEM_SIZE - 4096 * 2)] - __attribute__((section(".SDRAM1"), aligned(4))); + __attribute__((section(".bss.SDRAM1"), aligned(4))); /** ÄÚ´æ¾ä±ú */ static volatile mm_t Memory_Handle = { diff --git a/APP/Common Module/userboot.c b/APP/Common Module/userboot.c index 2eab8f5..d16d9d4 100644 --- a/APP/Common Module/userboot.c +++ b/APP/Common Module/userboot.c @@ -142,9 +142,9 @@ static uint8_t IV_Init[16] = { #endif /** ¶Á»º³åÇø(ÏûºÄRAMÌ«´ó, ÓÅ»¯·ÅÖÃÔÚ SDRAM ) */ -static uint8_t Read_Buff[Flash_Alignment] __attribute__(( section(".SDRAM1"), aligned(4) )); +static uint8_t Read_Buff[Flash_Alignment] __attribute__(( section(".bss.SDRAM1"), aligned(4) )); /** д»º³åÇø(ÏûºÄRAMÌ«´ó, ÓÅ»¯·ÅÖÃÔÚ SDRAM ) */ -static uint8_t Write_Buff[Flash_Alignment] __attribute__(( section(".SDRAM1"), aligned(4) )); +static uint8_t Write_Buff[Flash_Alignment] __attribute__(( section(".bss.SDRAM1"), aligned(4) )); /******************************************************************************************************************************************* * Private Prototype diff --git a/APP/UI/ui_test_button.c b/APP/UI/ui_test_button.c index 2dfdd1b..c4db96a 100644 --- a/APP/UI/ui_test_button.c +++ b/APP/UI/ui_test_button.c @@ -25,8 +25,8 @@ static const char *softkey_name[5] = { }; /* GPIOs for 5 LEDs: LED0~LED4 (active low) */ -static GPIO_TypeDef *led_port[5] = { GPIOD, GPIOD, GPIOC, GPIOC, GPIOC }; -static uint32_t led_pin[5] = { PIN7, PIN0, PIN4, PIN5, PIN8 }; +static GPIO_TypeDef * const led_port[5] = { GPIOD, GPIOD, GPIOC, GPIOC, GPIOC }; +static const uint32_t led_pin[5] = { PIN7, PIN0, PIN4, PIN5, PIN8 }; static lv_obj_t *softkey[5]; /* right 5 soft keys */ diff --git a/APP/lfs/lfs_port.c b/APP/lfs/lfs_port.c index f9ed231..9a6170c 100644 --- a/APP/lfs/lfs_port.c +++ b/APP/lfs/lfs_port.c @@ -17,9 +17,9 @@ #include "SPI_GD25Q128.h" /* 静态缓存: 避免依赖动态内存 (读缓存/写缓存/前瞻缓存) */ -__attribute__((aligned(4))) static uint8_t s_read_buf[FS_CACHE_SIZE] __attribute__((section(".SDRAM1"))); -__attribute__((aligned(4))) static uint8_t s_prog_buf[FS_CACHE_SIZE] __attribute__((section(".SDRAM1"))); -__attribute__((aligned(4))) static uint8_t s_lookahead_buf[FS_BLOCK_COUNT / 8] __attribute__((section(".SDRAM1"))); +__attribute__((aligned(4))) static uint8_t s_read_buf[FS_CACHE_SIZE] __attribute__((section(".bss.SDRAM1"))); +__attribute__((aligned(4))) static uint8_t s_prog_buf[FS_CACHE_SIZE] __attribute__((section(".bss.SDRAM1"))); +__attribute__((aligned(4))) static uint8_t s_lookahead_buf[FS_BLOCK_COUNT / 8] __attribute__((section(".bss.SDRAM1"))); /* littlefs 全局实例 */ lfs_t fs_lfs; diff --git a/APP/mb/event.c b/APP/mb/event.c index 488e2c5..437fab3 100644 --- a/APP/mb/event.c +++ b/APP/mb/event.c @@ -43,8 +43,8 @@ struct event_ctx { }; /* 变位报告区上下文 (buffer 在 SDRAM 动态分配) */ -static uint16_t s_chg_buf[EVENT_CHG_MAX * EVENT_CHG_REG_PER] __attribute__((section(".SDRAM1"))); //512x8 -static uint16_t s_act_buf[EVENT_ACT_MAX * EVENT_ACT_REG_PER] __attribute__((section(".SDRAM1"))); //128x32 +static uint16_t s_chg_buf[EVENT_CHG_MAX * EVENT_CHG_REG_PER] __attribute__((section(".bss.SDRAM1"))); //512x8 +static uint16_t s_act_buf[EVENT_ACT_MAX * EVENT_ACT_REG_PER] __attribute__((section(".bss.SDRAM1"))); //128x32 static const event_zone_t chg_zone = { EVENT_CHG_BASE, EVENT_CHG_MAX, EVENT_CHG_REG_PER, diff --git a/APP/user/user_export.c b/APP/user/user_export.c index 38b6423..48afafe 100644 --- a/APP/user/user_export.c +++ b/APP/user/user_export.c @@ -524,7 +524,7 @@ typedef struct{ char *name; }import_area_t; -import_area_t area[AREA_MAX] = { +const import_area_t area[AREA_MAX] = { { 1000, 0, 80, "protect" }, { 1200, 80, 26, "process_control" }, { 2100, 106, 12, "general_param" }, @@ -711,7 +711,7 @@ extern int event_get_change(uint16_t idx, uint16_t *out); int user_soe_write_act( FIL *fp, int idx, uint16_t *act_evt ); int user_soe_write_chg( FIL *fp, int idx, uint16_t *chg_evt ); -static const char * s_chg_type_name_1_44[] = { +static const char * const s_chg_type_name_1_44[] = { "unkown", changed_type_1, changed_type_2, changed_type_3, changed_type_4, changed_type_5, changed_type_6, changed_type_7, changed_type_8, changed_type_9, changed_type_10, changed_type_11, changed_type_12, changed_type_13, changed_type_14, changed_type_15, changed_type_16, @@ -721,21 +721,21 @@ static const char * s_chg_type_name_1_44[] = { changed_type_41, changed_type_42, changed_type_43, changed_type_44 }; -static const char * s_chg_type_name_71_78[] = { +static const char * const s_chg_type_name_71_78[] = { changed_type_71, changed_type_72, changed_type_73, changed_type_74, changed_type_75, changed_type_76, changed_type_77, changed_type_78, }; -static const char * s_chg_type_name_101_113[] = { +static const char * const s_chg_type_name_101_113[] = { changed_type_101, changed_type_102, changed_type_103, changed_type_104, changed_type_105, changed_type_106, changed_type_107, changed_type_108, changed_type_109, changed_type_110, changed_type_111, changed_type_112, changed_type_113 }; //开出变位 141 -- 146 -static const char * s_chg_type_name_141_146[] = { +static const char * const s_chg_type_name_141_146[] = { changed_type_141, changed_type_142, changed_type_143, changed_type_144, changed_type_145, changed_type_146 }; //操作变位 171 -- 194 -static const char * s_chg_type_name_171_194[] = { +static const char * const s_chg_type_name_171_194[] = { changed_type_171, changed_type_172, changed_type_173, changed_type_174, changed_type_175, changed_type_176, changed_type_177, changed_type_178, changed_type_179, changed_type_180, changed_type_181, changed_type_182, changed_type_183, changed_type_184, changed_type_185, changed_type_186, changed_type_187, changed_type_188, changed_type_189, changed_type_190, changed_type_191, changed_type_192, changed_type_193, changed_type_194 @@ -798,7 +798,7 @@ const char * chg_evt_desc_str( uint16_t t, uint16_t value ) return ""; } -static const char * s_act_type_name[] = { +static const char * const s_act_type_name[] = { act_type_0, act_type_1, act_type_2, act_type_3, act_type_4, act_type_5, act_type_6, act_type_7, act_type_8, act_type_9, act_type_10, act_type_11, act_type_12, act_type_13, act_type_14, act_type_15, act_type_16, @@ -808,7 +808,7 @@ static const char * s_act_type_name[] = { act_type_41, act_type_42, act_type_43, act_type_44 }; -static const char * s_act_src_name[] = { +static const char * const s_act_src_name[] = { "", "", act_start_src_2, diff --git a/APP/user/user_iap.c b/APP/user/user_iap.c index 804383c..10a6f38 100644 --- a/APP/user/user_iap.c +++ b/APP/user/user_iap.c @@ -339,7 +339,7 @@ int iap_send_pkt( uint32_t offset, uint8_t *pdata, int len ) return rc; } -FIL s_iap_fp __attribute__((section(".SDRAM1"), aligned(4))); +FIL s_iap_fp __attribute__((section(".bss.SDRAM1"), aligned(4))); int iap_open_fw( void ) { FRESULT fres; diff --git a/APP/user/wave_data.c b/APP/user/wave_data.c index a0c518e..e1bd788 100644 --- a/APP/user/wave_data.c +++ b/APP/user/wave_data.c @@ -781,7 +781,7 @@ int user_wave_export_files(void) return (exported > 0) ? ERR_OK : ERR_NO_DATA; } -static FIL wave_raw_file __attribute__((section(".SDRAM1"), aligned(4))); +static FIL wave_raw_file __attribute__((section(".bss.SDRAM1"), aligned(4))); int wave_raw_create( void ) { diff --git a/CSL/CMSIS/DeviceSupport/startup/arm/startup_SWM341.s b/CSL/CMSIS/DeviceSupport/startup/arm/startup_SWM341.s index 8a5bbfc..b50942f 100644 --- a/CSL/CMSIS/DeviceSupport/startup/arm/startup_SWM341.s +++ b/CSL/CMSIS/DeviceSupport/startup/arm/startup_SWM341.s @@ -177,8 +177,9 @@ __Vectors_Size EQU __Vectors_End - __Vectors ; 增加一些固件信息,方便外部工具对其校验和解析使用 kyz IMPORT |Region$$Table$$Limit| IMPORT |Region$$Table$$Base| - ;ALIGN 0x400 - SPACE 0x400 - __Vectors_Size + IMPORT |Load$$LR$$LR_IROM1$$Length| + ;ALIGN 0x200 + SPACE 0x200 - __Vectors_Size FW_INFO_ADDR IF :DEF:BOOTLOADER IMPORT BOOT_VER @@ -192,7 +193,8 @@ FW_INFO_ADDR DCD |Region$$Table$$Base| DCD |Region$$Table$$Limit| DCD __Vectors - SPACE 44 + DCD |Load$$LR$$LR_IROM1$$Length| ;固件大小 + SPACE 40 ;------------------------------------------------------------ AREA |.text|, CODE, READONLY diff --git a/Linker_Scatter_File/SWM34S_SDRAM.sct b/Linker_Scatter_File/SWM34S_SDRAM.sct index 03ea083..0b80d51 100644 --- a/Linker_Scatter_File/SWM34S_SDRAM.sct +++ b/Linker_Scatter_File/SWM34S_SDRAM.sct @@ -23,8 +23,7 @@ LR_IROM1 0x80001000 0x001FF000 { ; load region size_region ;*(.SRAM) } RW_SDRAM1 0x80200000 UNINIT 0x00400000 { ; RW data - *(.SDRAM1) - *(.SDRAM1.bss) + *(.bss.SDRAM1) } ; 0x00200000 ; RW_SDRAM2 0x80600000 0x00200000 { ; RW data diff --git a/Middleware/FreeRTOS-Kernel/portable/MemMang/heap_4.c b/Middleware/FreeRTOS-Kernel/portable/MemMang/heap_4.c index cf0be4b..968d76b 100644 --- a/Middleware/FreeRTOS-Kernel/portable/MemMang/heap_4.c +++ b/Middleware/FreeRTOS-Kernel/portable/MemMang/heap_4.c @@ -61,7 +61,7 @@ * heap - probably so it can be placed in a special segment or address. */ extern uint8_t ucHeap[ configTOTAL_HEAP_SIZE ]; #else - PRIVILEGED_DATA static uint8_t ucHeap[ configTOTAL_HEAP_SIZE ] __attribute__((section(".SDRAM1"), aligned(8))) ; + PRIVILEGED_DATA static uint8_t ucHeap[ configTOTAL_HEAP_SIZE ] __attribute__((section(".bss.SDRAM1"), aligned(8))) ; #endif /* configAPPLICATION_ALLOCATED_HEAP */ /* Define the linked list structure. This is used to link free blocks in order diff --git a/Middleware/lvgl/lvgl/examples/porting/lv_port_disp.c b/Middleware/lvgl/lvgl/examples/porting/lv_port_disp.c index 4b17c58..df0d8b1 100644 --- a/Middleware/lvgl/lvgl/examples/porting/lv_port_disp.c +++ b/Middleware/lvgl/lvgl/examples/porting/lv_port_disp.c @@ -87,7 +87,7 @@ static void gpu_fill(lv_disp_drv_t *disp_drv, lv_color_t *dest_buf, lv_coord_t d /** Descriptor of a display driver */ static lv_disp_drv_t disp_drv; /** A screen sized buffer */ -static lv_color_t lcdbuf_gui[LV_HOR_RES_MAX * LV_VER_RES_MAX] __attribute__((section(".SDRAM1"))); +static lv_color_t lcdbuf_gui[LV_HOR_RES_MAX * LV_VER_RES_MAX] __attribute__((section(".bss.SDRAM1"))); #if (1 == LVGL_DISP_MODE) @@ -103,7 +103,7 @@ static lv_color_t lcdbuf_gui[LV_HOR_RES_MAX * LV_VER_RES_MAX] __attribute__((sec #else /** An other screen sized buffer */ - static lv_color_t lcdbuf_show[LV_HOR_RES_MAX * LV_VER_RES_MAX] __attribute__((section(".SDRAM1"))); + static lv_color_t lcdbuf_show[LV_HOR_RES_MAX * LV_VER_RES_MAX] __attribute__((section(".bss.SDRAM1"))); #endif /********************** @@ -148,7 +148,7 @@ void lv_port_disp_init(void) /* Example for 1) */ static lv_disp_buf_t draw_buf_dsc; - static lv_color_t draw_buf_1[LV_HOR_RES_MAX * 10] __attribute__((section(".SDRAM1"))); //A buffer for 10 rows + static lv_color_t draw_buf_1[LV_HOR_RES_MAX * 10] __attribute__((section(".bss.SDRAM1"))); //A buffer for 10 rows lv_disp_buf_init(&draw_buf_dsc, draw_buf_1, NULL, LV_HOR_RES_MAX * 10); //Initialize the display buffer @@ -156,8 +156,8 @@ void lv_port_disp_init(void) /* Example for 2) */ static lv_disp_buf_t draw_buf_dsc; - static lv_color_t draw_buf_2_1[LV_HOR_RES_MAX * 10] __attribute__((section(".SDRAM1"))); //A buffer for 10 rows - static lv_color_t draw_buf_2_2[LV_HOR_RES_MAX * 10] __attribute__((section(".SDRAM1"))); //An other buffer for 10 rows + static lv_color_t draw_buf_2_1[LV_HOR_RES_MAX * 10] __attribute__((section(".bss.SDRAM1"))); //A buffer for 10 rows + static lv_color_t draw_buf_2_2[LV_HOR_RES_MAX * 10] __attribute__((section(".bss.SDRAM1"))); //An other buffer for 10 rows lv_disp_buf_init(&draw_buf_dsc, draw_buf_2_1, draw_buf_2_2, LV_HOR_RES_MAX * 10); //Initialize the display buffer diff --git a/Middleware/lvgl/lvgl/examples/porting/lv_port_disp1.c b/Middleware/lvgl/lvgl/examples/porting/lv_port_disp1.c index 8ef7436..0158b98 100644 --- a/Middleware/lvgl/lvgl/examples/porting/lv_port_disp1.c +++ b/Middleware/lvgl/lvgl/examples/porting/lv_port_disp1.c @@ -35,8 +35,8 @@ static void gpu_fill(lv_disp_drv_t * disp_drv, lv_color_t * dest_buf, lv_coord_t /********************** * STATIC VARIABLES **********************/ -static lv_color_t lcdbuf_gui[LV_HOR_RES_MAX * LV_VER_RES_MAX] __attribute__((section(".SDRAM1"))); -static lv_color_t lcdbuf_show[LV_HOR_RES_MAX * LV_VER_RES_MAX] __attribute__((section(".SDRAM1"))); +static lv_color_t lcdbuf_gui[LV_HOR_RES_MAX * LV_VER_RES_MAX] __attribute__((section(".bss.SDRAM1"))); +static lv_color_t lcdbuf_show[LV_HOR_RES_MAX * LV_VER_RES_MAX] __attribute__((section(".bss.SDRAM1"))); /********************** * MACROS **********************/ diff --git a/Middleware/lvgl/lvgl/examples/porting/lv_port_disp2_1.c b/Middleware/lvgl/lvgl/examples/porting/lv_port_disp2_1.c index 236c00d..6e7c12f 100644 --- a/Middleware/lvgl/lvgl/examples/porting/lv_port_disp2_1.c +++ b/Middleware/lvgl/lvgl/examples/porting/lv_port_disp2_1.c @@ -37,8 +37,8 @@ static void gpu_fill(lv_disp_drv_t * disp_drv, lv_color_t * dest_buf, lv_coord_t **********************/ static lv_disp_drv_t disp_drv; /*Descriptor of a display driver*/ -static lv_color_t lcdbuf_gui[LV_HOR_RES_MAX * LV_VER_RES_MAX] __attribute__((section(".SDRAM1"))); -static lv_color_t lcdbuf_show[LV_HOR_RES_MAX * LV_VER_RES_MAX] __attribute__((section(".SDRAM1"))); +static lv_color_t lcdbuf_gui[LV_HOR_RES_MAX * LV_VER_RES_MAX] __attribute__((section(".bss.SDRAM1"))); +static lv_color_t lcdbuf_show[LV_HOR_RES_MAX * LV_VER_RES_MAX] __attribute__((section(".bss.SDRAM1"))); /********************** * MACROS **********************/ diff --git a/Middleware/lvgl/lvgl/examples/porting/lv_port_disp2_2.c b/Middleware/lvgl/lvgl/examples/porting/lv_port_disp2_2.c index e8c72b7..9ea296e 100644 --- a/Middleware/lvgl/lvgl/examples/porting/lv_port_disp2_2.c +++ b/Middleware/lvgl/lvgl/examples/porting/lv_port_disp2_2.c @@ -46,8 +46,8 @@ static volatile int16_t y2_flush; static volatile int16_t y_flush_act; static volatile const lv_color_t *buf_to_flush; -static lv_color_t lcdbuf_gui[LV_HOR_RES_MAX * LV_VER_RES_MAX] __attribute__((section(".SDRAM1"))); -static lv_color_t lcdbuf_show[LV_HOR_RES_MAX * LV_VER_RES_MAX] __attribute__((section(".SDRAM1"))); +static lv_color_t lcdbuf_gui[LV_HOR_RES_MAX * LV_VER_RES_MAX] __attribute__((section(".bss.SDRAM1"))); +static lv_color_t lcdbuf_show[LV_HOR_RES_MAX * LV_VER_RES_MAX] __attribute__((section(".bss.SDRAM1"))); /********************** * MACROS **********************/ diff --git a/Middleware/lvgl/lvgl/examples/porting/lv_port_disp3.c b/Middleware/lvgl/lvgl/examples/porting/lv_port_disp3.c index 0bef457..aa7c56a 100644 --- a/Middleware/lvgl/lvgl/examples/porting/lv_port_disp3.c +++ b/Middleware/lvgl/lvgl/examples/porting/lv_port_disp3.c @@ -88,8 +88,8 @@ void lv_port_disp_init(void) /* Example for 3) */ static lv_disp_buf_t draw_buf_dsc_3; - static lv_color_t lcdbuf_gui[LV_HOR_RES_MAX * LV_VER_RES_MAX] __attribute__((section(".SDRAM1"))); /*A screen sized buffer*/ - static lv_color_t lcdbuf_show[LV_HOR_RES_MAX * LV_VER_RES_MAX] __attribute__((section(".SDRAM1"))); /*An other screen sized buffer*/ + static lv_color_t lcdbuf_gui[LV_HOR_RES_MAX * LV_VER_RES_MAX] __attribute__((section(".bss.SDRAM1"))); /*A screen sized buffer*/ + static lv_color_t lcdbuf_show[LV_HOR_RES_MAX * LV_VER_RES_MAX] __attribute__((section(".bss.SDRAM1"))); /*An other screen sized buffer*/ lv_disp_buf_init(&draw_buf_dsc_3, lcdbuf_gui, lcdbuf_show, LV_HOR_RES_MAX * LV_VER_RES_MAX); /*Initialize the display buffer*/ /*----------------------------------- diff --git a/Middleware/lvgl/lvgl/lv_conf.h b/Middleware/lvgl/lvgl/lv_conf.h index 4f1ec75..02e7497 100644 --- a/Middleware/lvgl/lvgl/lv_conf.h +++ b/Middleware/lvgl/lvgl/lv_conf.h @@ -96,7 +96,7 @@ typedef int16_t lv_coord_t; #endif /* Compiler prefix for a big array declaration */ -# define LV_MEM_ATTR __attribute__((section(".SDRAM1"))) +# define LV_MEM_ATTR __attribute__((section(".bss.SDRAM1"))) /* Set an address for the memory pool instead of allocating it as an array. * Can be in external SRAM too. */ diff --git a/dispboard_app_sdram.uvprojx b/dispboard_app_sdram.uvprojx index 489c222..6350791 100644 --- a/dispboard_app_sdram.uvprojx +++ b/dispboard_app_sdram.uvprojx @@ -340,7 +340,7 @@ -Wno-invalid-source-encoding CODE_ON_SDRAM,__TARGET_CONST__=0 - .\CSL\CMSIS\CoreSupport;.\CSL\CMSIS\DeviceSupport;.\CSL\SWM341_StdPeriph_Driver;.\CSL\SWM341_UsbHost_Lib;.\CSL\SWM341_UsbHost_Lib\CDC;.\CSL\SWM341_UsbHost_Lib\HID;.\CSL\SWM341_UsbHost_Lib\MSC;.\CSL\SWM341_UsbHost_Lib\MTP;.\Middleware\FatFs\source;.\Middleware\lvgl;.\Middleware\lvgl\lvgl;.\Middleware\lvgl\lvgl\src;.\Middleware\lvgl\lvgl\src\lv_core;.\Middleware\lvgl\lvgl\src\lv_draw;.\Middleware\lvgl\lvgl\src\lv_font;.\Middleware\lvgl\lvgl\src\lv_gpu;.\Middleware\lvgl\lvgl\src\lv_hal;.\Middleware\lvgl\lvgl\src\lv_misc;.\Middleware\lvgl\lvgl\src\lv_themes;.\Middleware\lvgl\lvgl\src\lv_widgets;.\Middleware\lvgl\lvgl\examples\porting;.\Middleware\lvgl\lv_examples;.\Middleware\lvgl\lv_examples\src;.\Middleware\lvgl\lv_examples\src\lv_demo_widgets;.\Middleware\lvgl\lv_examples\src\lv_demo_benchmark;.\Middleware\lvgl\lv_examples\src\lv_demo_stress;.\Middleware\lvgl\lv_examples\src\lv_demo_music;.\APP;.\APP\can_comm;.\APP\BSP;.\APP\IC_Driver;.\APP\Common Module;.\APP\Software_Parser;.\APP\USB\Device;.\APP\USB\Host;.\APP\UI;.\APP\UI\Resource;.\APP\UI\Page;.\Middleware\FreeRTOS-Kernel;.\Middleware\FreeRTOS-Kernel\include;.\Middleware\FreeRTOS-Kernel\portable\GCC\ARM_CM33_NTZ\non_secure;.\Middleware\FreeRTOS-Kernel\portable\MemMang;.\APP\can_comm;.\APP\mb;.\APP\shell;.\APP\shell\cherryrl + .\CSL\CMSIS\CoreSupport;.\CSL\CMSIS\DeviceSupport;.\CSL\SWM341_StdPeriph_Driver;.\CSL\SWM341_UsbHost_Lib;.\CSL\SWM341_UsbHost_Lib\CDC;.\CSL\SWM341_UsbHost_Lib\HID;.\CSL\SWM341_UsbHost_Lib\MSC;.\CSL\SWM341_UsbHost_Lib\MTP;.\Middleware\FatFs\source;.\Middleware\lvgl;.\Middleware\lvgl\lvgl;.\Middleware\lvgl\lvgl\src;.\Middleware\lvgl\lvgl\src\lv_core;.\Middleware\lvgl\lvgl\src\lv_draw;.\Middleware\lvgl\lvgl\src\lv_font;.\Middleware\lvgl\lvgl\src\lv_gpu;.\Middleware\lvgl\lvgl\src\lv_hal;.\Middleware\lvgl\lvgl\src\lv_misc;.\Middleware\lvgl\lvgl\src\lv_themes;.\Middleware\lvgl\lvgl\src\lv_widgets;.\Middleware\lvgl\lvgl\examples\porting;.\Middleware\lvgl\lv_examples;.\Middleware\lvgl\lv_examples\src;.\Middleware\lvgl\lv_examples\src\lv_demo_widgets;.\Middleware\lvgl\lv_examples\src\lv_demo_benchmark;.\Middleware\lvgl\lv_examples\src\lv_demo_stress;.\Middleware\lvgl\lv_examples\src\lv_demo_music;.\APP;.\APP\can_comm;.\APP\BSP;.\APP\IC_Driver;.\APP\Common Module;.\APP\Software_Parser;.\APP\USB\Device;.\APP\USB\Host;.\APP\UI;.\APP\UI\Resource;.\APP\UI\Page;.\Middleware\FreeRTOS-Kernel;.\Middleware\FreeRTOS-Kernel\include;.\Middleware\FreeRTOS-Kernel\portable\GCC\ARM_CM33_NTZ\non_secure;.\Middleware\FreeRTOS-Kernel\portable\MemMang;.\APP\can_comm;.\APP\mb;.\APP\shell;.\APP\shell\cherryrl;.\APP\user;.\APP\lfs @@ -374,7 +374,7 @@ .\Linker_Scatter_File\SWM34S_SDRAM.sct - + --datacompressor=off @@ -409,51 +409,6 @@ 1 .\app\main.c - - user_app.c - 1 - .\APP\user_app.c - - - user_ui.c - 1 - .\APP\user_ui.c - - - user_usb.c - 1 - .\APP\user_usb.c - - - user_mb.c - 1 - .\APP\user_mb.c - - - user_iap.c - 1 - .\APP\user_iap.c - - - user_rtc.c - 1 - .\APP\user_rtc.c - - - user_mb_data.c - 1 - .\APP\user_mb_data.c - - - user_export.c - 1 - .\APP\user_export.c - - - wave_data.c - 1 - .\APP\wave_data.c - @@ -2770,17 +2725,67 @@ lfs.c 1 - .\APP\fs\lfs.c + .\APP\lfs\lfs.c lfs_port.c 1 - .\APP\fs\lfs_port.c + .\APP\lfs\lfs_port.c lfs_util.c 1 - .\APP\fs\lfs_util.c + .\APP\lfs\lfs_util.c + + + + + APP\user + + + user_app.c + 1 + .\APP\user\user_app.c + + + user_export.c + 1 + .\APP\user\user_export.c + + + user_iap.c + 1 + .\APP\user\user_iap.c + + + user_mb.c + 1 + .\APP\user\user_mb.c + + + user_mb_data.c + 1 + .\APP\user\user_mb_data.c + + + user_rtc.c + 1 + .\APP\user\user_rtc.c + + + user_ui.c + 1 + .\APP\user\user_ui.c + + + user_usb.c + 1 + .\APP\user\user_usb.c + + + wave_data.c + 1 + .\APP\user\wave_data.c @@ -3189,51 +3194,6 @@ 1 .\app\main.c - - user_app.c - 1 - .\APP\user_app.c - - - user_ui.c - 1 - .\APP\user_ui.c - - - user_usb.c - 1 - .\APP\user_usb.c - - - user_mb.c - 1 - .\APP\user_mb.c - - - user_iap.c - 1 - .\APP\user_iap.c - - - user_rtc.c - 1 - .\APP\user_rtc.c - - - user_mb_data.c - 1 - .\APP\user_mb_data.c - - - user_export.c - 1 - .\APP\user_export.c - - - wave_data.c - 1 - .\APP\wave_data.c - @@ -5448,17 +5408,67 @@ lfs.c 1 - .\APP\fs\lfs.c + .\APP\lfs\lfs.c lfs_port.c 1 - .\APP\fs\lfs_port.c + .\APP\lfs\lfs_port.c lfs_util.c 1 - .\APP\fs\lfs_util.c + .\APP\lfs\lfs_util.c + + + + + APP\user + + + user_app.c + 1 + .\APP\user\user_app.c + + + user_export.c + 1 + .\APP\user\user_export.c + + + user_iap.c + 1 + .\APP\user\user_iap.c + + + user_mb.c + 1 + .\APP\user\user_mb.c + + + user_mb_data.c + 1 + .\APP\user\user_mb_data.c + + + user_rtc.c + 1 + .\APP\user\user_rtc.c + + + user_ui.c + 1 + .\APP\user\user_ui.c + + + user_usb.c + 1 + .\APP\user\user_usb.c + + + wave_data.c + 1 + .\APP\user\wave_data.c diff --git a/dispboard_bootloader.uvprojx b/dispboard_bootloader.uvprojx index ed6b0f1..791b991 100644 --- a/dispboard_bootloader.uvprojx +++ b/dispboard_bootloader.uvprojx @@ -49,10 +49,10 @@ 1 .\out\dispboard_bootloader\ - dispboard + dispboard_bootloader 1 0 - 0 + 1 1 1 .\out\dispboard_bootloader\ @@ -82,7 +82,7 @@ 1 0 - fromelf --i32combined -o "$L@L.hex" "#L" + fromelf --bin -o "$L@L.bin" "#L" fromelf --text -a -c -o "$L@L.asm" "#L" 0 0 @@ -340,7 +340,7 @@ -Wno-invalid-source-encoding __TARGET_CONST__=0, BOOTLOADER - .\CSL\CMSIS\CoreSupport;.\CSL\CMSIS\DeviceSupport;.\CSL\SWM341_StdPeriph_Driver;.\CSL\SWM341_UsbHost_Lib;.\CSL\SWM341_UsbHost_Lib\CDC;.\CSL\SWM341_UsbHost_Lib\HID;.\CSL\SWM341_UsbHost_Lib\MSC;.\CSL\SWM341_UsbHost_Lib\MTP;.\Middleware\FatFs\source;.\Middleware\lvgl;.\Middleware\lvgl\lvgl;.\Middleware\lvgl\lvgl\src;.\Middleware\lvgl\lvgl\src\lv_core;.\Middleware\lvgl\lvgl\src\lv_draw;.\Middleware\lvgl\lvgl\src\lv_font;.\Middleware\lvgl\lvgl\src\lv_gpu;.\Middleware\lvgl\lvgl\src\lv_hal;.\Middleware\lvgl\lvgl\src\lv_misc;.\Middleware\lvgl\lvgl\src\lv_themes;.\Middleware\lvgl\lvgl\src\lv_widgets;.\Middleware\lvgl\lvgl\examples\porting;.\Middleware\lvgl\lv_examples;.\Middleware\lvgl\lv_examples\src;.\Middleware\lvgl\lv_examples\src\lv_demo_widgets;.\Middleware\lvgl\lv_examples\src\lv_demo_benchmark;.\Middleware\lvgl\lv_examples\src\lv_demo_stress;.\Middleware\lvgl\lv_examples\src\lv_demo_music;.\APP;.\APP\can_comm;.\APP\BSP;.\APP\IC_Driver;.\APP\Common Module;.\APP\Software_Parser;.\APP\USB\Device;.\APP\USB\Host;.\APP\UI;.\APP\UI\Resource;.\APP\UI\Page;.\Middleware\FreeRTOS-Kernel;.\Middleware\FreeRTOS-Kernel\include;.\Middleware\FreeRTOS-Kernel\portable\GCC\ARM_CM33_NTZ\non_secure;.\Middleware\FreeRTOS-Kernel\portable\MemMang;.\APP\can_comm;.\APP\mb;.\APP\shell;.\APP\shell\cherryrl;.\APP\bootloader;.\APP\bootloader\font;.\APP\fs + .\CSL\CMSIS\CoreSupport;.\CSL\CMSIS\DeviceSupport;.\CSL\SWM341_StdPeriph_Driver;.\CSL\SWM341_UsbHost_Lib;.\CSL\SWM341_UsbHost_Lib\CDC;.\CSL\SWM341_UsbHost_Lib\HID;.\CSL\SWM341_UsbHost_Lib\MSC;.\CSL\SWM341_UsbHost_Lib\MTP;.\Middleware\FatFs\source;.\Middleware\lvgl;.\Middleware\lvgl\lvgl;.\Middleware\lvgl\lvgl\src;.\Middleware\lvgl\lvgl\src\lv_core;.\Middleware\lvgl\lvgl\src\lv_draw;.\Middleware\lvgl\lvgl\src\lv_font;.\Middleware\lvgl\lvgl\src\lv_gpu;.\Middleware\lvgl\lvgl\src\lv_hal;.\Middleware\lvgl\lvgl\src\lv_misc;.\Middleware\lvgl\lvgl\src\lv_themes;.\Middleware\lvgl\lvgl\src\lv_widgets;.\Middleware\lvgl\lvgl\examples\porting;.\Middleware\lvgl\lv_examples;.\Middleware\lvgl\lv_examples\src;.\Middleware\lvgl\lv_examples\src\lv_demo_widgets;.\Middleware\lvgl\lv_examples\src\lv_demo_benchmark;.\Middleware\lvgl\lv_examples\src\lv_demo_stress;.\Middleware\lvgl\lv_examples\src\lv_demo_music;.\APP;.\APP\can_comm;.\APP\BSP;.\APP\IC_Driver;.\APP\Common Module;.\APP\Software_Parser;.\APP\USB\Device;.\APP\USB\Host;.\APP\UI;.\APP\UI\Resource;.\APP\UI\Page;.\Middleware\FreeRTOS-Kernel;.\Middleware\FreeRTOS-Kernel\include;.\Middleware\FreeRTOS-Kernel\portable\GCC\ARM_CM33_NTZ\non_secure;.\Middleware\FreeRTOS-Kernel\portable\MemMang;.\APP\can_comm;.\APP\mb;.\APP\shell;.\APP\shell\cherryrl;.\APP\bootloader;.\APP\bootloader\font;.\APP\lfs;.\APP\user @@ -460,174 +460,6 @@ - - user_app.c - 1 - .\APP\user_app.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - 1 - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 0 - 0 - 2 - 2 - 2 - 2 - 2 - - - - - - - - - - - - user_usb.c - 1 - .\APP\user_usb.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - 1 - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 0 - 0 - 2 - 2 - 2 - 2 - 2 - - - - - - - - - - - - user_rtc.c - 1 - .\APP\user_rtc.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - 1 - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 0 - 0 - 2 - 2 - 2 - 2 - 2 - - - - - - - - - - @@ -1387,17 +1219,17 @@ lfs.c 1 - .\APP\fs\lfs.c + .\APP\lfs\lfs.c lfs_port.c 1 - .\APP\fs\lfs_port.c + .\APP\lfs\lfs_port.c lfs_util.c 1 - .\APP\fs\lfs_util.c + .\APP\lfs\lfs_util.c @@ -1806,21 +1638,6 @@ 1 .\app\main.c - - user_app.c - 1 - .\APP\user_app.c - - - user_usb.c - 1 - .\APP\user_usb.c - - - user_rtc.c - 1 - .\APP\user_rtc.c - @@ -2340,17 +2157,17 @@ lfs.c 1 - .\APP\fs\lfs.c + .\APP\lfs\lfs.c lfs_port.c 1 - .\APP\fs\lfs_port.c + .\APP\lfs\lfs_port.c lfs_util.c 1 - .\APP\fs\lfs_util.c + .\APP\lfs\lfs_util.c -- 2.34.1