Hi, Angus!
ESP_Angus wrote: ↑Mon Sep 09, 2019 1:28 am
You shouldn't have to do this, but you can also try removing the "build" directory to force a 100% clean build.
Tried, doesnt help, even tried to delete sdkconfig and recreated new one with
make menuconfig. Same problems.
ESP_Angus wrote: ↑Mon Sep 09, 2019 1:28 am
It's hard to tell without knowing more about your project. Can you please give some details about what these variables are, how they are declared and where they are used, etc?
Ok, so my project structure (short view, I'm focused to show where is
.mk files exist ):
Code: Select all
├───components
│ ├───mkspiffs
│ │ └───src
│ │ ├───spiffs
│ │ └───tclap
│ ├───spiffs
│ └───spiffs_image
│ └───image
│ ├───device
│ ├───history
│ └───settings
├───drv
│ component.mk
│ disp_spi.c
│ disp_spi.h
│ st7735b.c
│ st7735b.h
├───lvgl
│ │ component.mk
│ │ lvgl.h
│ ├───docs
│ ├───lv_core
│ ├───lv_draw
│ ├───lv_fonts
│ ├───lv_hal
│ ├───lv_misc
│ ├───lv_objx
│ ├───lv_porting
│ └───lv_themes
├───main
│ │ buttons.c
│ │ component.mk
│ │ history.c
│ │ Kconfig.projbuild
│ │ lcd.c
│ │ main.c
│ │ power.c
│ │ settings.c
│ │
│ ├───includes
│ │ buttons.h
│ │ history.h
│ │ hw_pins.h
│ │ lcd.h
│ │ pictures.h
│ │ power.h
│ │ settings.h
│ │
│ └───pictures
│ battery.c
│ bt_icon.c
│ component.mk
│ logo.c
│ meas_icon.c
│ time_icon.c
variables that doesnt compile declared with next macro:
Code: Select all
#define LV_IMG_DECLARE(var_name) extern const lv_img_dsc_t var_name;
. . .
LV_IMG_DECLARE(time_icon);
. . .
It contains image bitmap with lib settings. Each image corresponds to same .c file at
/main/pictures/ .
Example of
time_icon.c:
Code: Select all
#include "lvgl/lvgl.h"
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
const LV_ATTRIBUTE_MEM_ALIGN uint8_t time_icon_map[] = {
#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8
/*Pixel format: Red: 3 bit, Green: 3 bit, Blue: 2 bit*/
0xff, 0xff, 0xff ...
#endif
#if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP == 0
/*Pixel format: Red: 5 bit, Green: 6 bit, Blue: 5 bit*/
0xff, 0xff, 0xff ...
#endif
#if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP != 0
/*Pixel format: Red: 5 bit, Green: 6 bit, Blue: 5 bit BUT the 2 bytes are swapped*/
0xff, 0xff, 0xff ...
#endif
#if LV_COLOR_DEPTH == 32
/*Pixel format: Fix 0xFF: 8 bit, Red: 8 bit, Green: 8 bit, Blue: 8 bit*/
0xff, 0xff, 0xff ...
#endif
};
lv_img_dsc_t time_icon = {
.header.always_zero = 0,
.header.w = 20,
.header.h = 20,
.data_size = 400 * LV_COLOR_SIZE / 8,
.header.cf = LV_IMG_CF_TRUE_COLOR,
.data = time_icon_map,
};
So I want to keep all image declarations at
/main/includes/pictures.h
My
pictures.h looks like next:
Code: Select all
#ifndef __PICTURES_H__
#define __PICTURES_H__
// LOGO
LV_IMG_DECLARE(logo);
// BT ICON
LV_IMG_DECLARE(bt_icon);
//TIME ICON
LV_IMG_DECLARE(time_icon);
// MEAS ICON
LV_IMG_DECLARE(meas_icon);
// BATTERY
LV_IMG_DECLARE(battery);
#endif /* __PICTURES_H__ */
And at
/main/lcd.c I'm just included
And at 3.3beta1 IDF its works fine.