野火电子论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 220|回复: 1

F429 移植了lvgl 和使用外部ram

[复制链接]
发表于 2024-1-27 09:39:22 | 显示全部楼层 |阅读模式
F429 移植了lvgl  和使用外部ram

我看lv_conf.h有一个LV_MEM_CUSTOM 这个变量 我是设置为1
然后下面分配的内存函数都有已经写了    但是运行起来  会有一些意想不到的问题,LV_MEM_CUSTOM关了这个问题就没有了
希望各位看看 是不是还需要修改什么地方




#define LV_MEM_CUSTOM 1
#if LV_MEM_CUSTOM == 0
    /*Size of the memory available for `lv_mem_alloc()` in bytes (>= 2kB)*/
    #define LV_MEM_SIZE (38U * 1024U)          /*[bytes]64*/

    /*Set an address for the memory pool instead of allocating it as a normal array. Can be in external SRAM too.*/
    #define LV_MEM_ADR 0     /*0: unused*/
    /*Instead of an address give a memory allocator that will be called to get a memory pool for LVGL. E.g. my_malloc*/
    #if LV_MEM_ADR == 0
        //#define LV_MEM_POOL_INCLUDE your_alloc_library  /* Uncomment if using an external allocator*/
        //#define LV_MEM_POOL_ALLOC   your_alloc          /* Uncomment if using an external allocator*/
    #endif

#else       /*LV_MEM_CUSTOM*/
    #define LV_MEM_CUSTOM_INCLUDE <stdlib.h>   /*Header for the dynamic memory function*/
    #define LV_MEM_CUSTOM_ALLOC   user_malloc
    #define LV_MEM_CUSTOM_FREE    user_free
    #define LV_MEM_CUSTOM_REALLOC user_realloc
#endif     /*LV_MEM_CUSTOM*/


回复

使用道具 举报

发表于 2024-1-29 11:56:26 | 显示全部楼层
什么意想不到的问题
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

联系站长|手机版|野火电子官网|野火淘宝店铺|野火电子论坛 ( 粤ICP备14069197号 ) 大学生ARM嵌入式2群

GMT+8, 2024-4-28 06:37 , Processed in 0.161112 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表