Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(MiscDrivers): Replace 2.4" TFT fonts with Liberation fonts #792

Merged
merged 22 commits into from
Nov 18, 2023

Conversation

vicloginov
Copy link
Contributor

Old fonts for 2.4" TFT are replaced with Liberation fonts in MAX78000/MAX78002 examples.

@github-actions github-actions bot added MAX78000 Related to the MAX78000 (AI85) MAX78002 Related to the MAX78002 (AI87) labels Nov 6, 2023
Copy link
Contributor

@Jake-Carter Jake-Carter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could consolidate these fonts into Libraries/MiscDrivers/Display so we don't have to maintain multiple copies. I will take that action and move them

@Jake-Carter
Copy link
Contributor

Jake-Carter commented Nov 8, 2023

@vicloginov @lorne-maxim take a look at the latest changes, especially in Libraries/MiscDrivers/Display/fonts

I consolidated the fonts via a fonts.mk file. I included it by default from the AI85 and AI87 BSPs.

# project.mk
FONTS = LiberationSans16x16 LiberationSans28x28
# ...

I also added a more generalized "fonts.h" in an attempt to abstract away the font-specific pointers better. Let me know what you think. Projects using multiple fonts will still need to point to each manually, but that's still possible.

--- static int font = (int)&font_char_table[0];
+++ static int font = (int)&Liberation_Sans16x16[0];

@Jake-Carter
Copy link
Contributor

@github-actions github-actions bot added MAX32672 Related to the MAX32672 (ME21) MAX32690 Related to the MAX32690 (ME18) MAX32662 Related to the MAX32662 (ME12) labels Nov 8, 2023
@Jake-Carter
Copy link
Contributor

@vicloginov
Copy link
Contributor Author

vicloginov commented Nov 16, 2023

Compilation of MAX78000 RISC-V examples fails if MAXIM_PATH is unset. It happens due to missing in Makefile.ARM

ifeq "$(MAXIM_PATH)" ""
DEPTH := ../../../../
MAXIM_PATH := $(abspath $(DEPTH))

@Jake-Carter
Copy link
Contributor

Thanks @vicloginov, saw this for some other moved projects. Fixed most projects as of #799, but will update the RISC-V projects in this PR. The legacy split makefiles need a manual update

@vicloginov
Copy link
Contributor Author

vicloginov commented Nov 17, 2023

Thanks @vicloginov, saw this for some other moved projects. Fixed most projects as of #799, but will update the RISC-V projects in this PR. The legacy split makefiles need a manual update

I still see reference to Liberation_Sans16x16 font in many CNN examples and TFT_Demo like this:

#ifdef BOARD_FTHR_REVA
int image_bitmap_1 = (int)&img_1_rgb565[0];
int image_bitmap_2 = (int)&logo_rgb565[0];
int font_1 = (int)&Liberation_Sans16x16[0];
int font_2 = (int)&Liberation_Sans16x16[0];

#endif

It causes compilation error for BOARD=FTHR_RevA

@Jake-Carter
Copy link
Contributor

Jake-Carter commented Nov 17, 2023

Compilation of MAX78000 RISC-V examples fails if MAXIM_PATH is unset. It happens due to missing in Makefile.ARM

ifeq "$(MAXIM_PATH)" ""
DEPTH := ../../../../
MAXIM_PATH :=
(DEPTH))

@vicloginov fixed in 69990ee

@Jake-Carter
Copy link
Contributor

Thanks @vicloginov, saw this for some other moved projects. Fixed most projects as of #799, but will update the RISC-V projects in this PR. The legacy split makefiles need a manual update

I still see reference to Liberation_Sans16x16 font in many CNN examples and TFT_Demo like this:

#ifdef BOARD_FTHR_REVA int image_bitmap_1 = (int)&img_1_rgb565[0]; int image_bitmap_2 = (int)&logo_rgb565[0]; int font_1 = (int)&Liberation_Sans16x16[0]; int font_2 = (int)&Liberation_Sans16x16[0]; #endif

It causes compilation error for BOARD=FTHR_RevA

@vicloginov which examples? TFT_Demo builds for me successfully

~/repos/msdk/Examples/MAX78000/TFT_Demo (feat/fonts*) » make BOARD=FTHR_RevA                          jhcarter@jhcarter-X670E
Loaded project.mk
****************************************************************************
* Analog Devices MSDK
* - User Guide: https://analog-devices-msdk.github.io/msdk/USERGUIDE/
* - Get Support: https://www.analog.com/support/technical-support.html
* - Report Issues: https://github.com/Analog-Devices-MSDK/msdk/issues
* - Contributing: https://analog-devices-msdk.github.io/msdk/CONTRIBUTING/
****************************************************************************
- MKDIR /home/jhcarter/repos/msdk/Examples/MAX78000/TFT_Demo/build
- CC resources/tft_fthr/img_1_rgb565.c
- CC main.c
- CC src/state.c
- CC src/state_home.c
- CC src/state_info.c
- CC src/state_keypad.c
- CC src/utils.c
- CC /home/jhcarter/repos/msdk/Libraries/Boards/MAX78000/FTHR_RevA/Source/board.c
- CC /home/jhcarter/repos/msdk/Libraries/MiscDrivers/stdio.c
- CC /home/jhcarter/repos/msdk/Libraries/MiscDrivers/LED/led.c
- CC /home/jhcarter/repos/msdk/Libraries/MiscDrivers/PushButton/pb.c
- CC /home/jhcarter/repos/msdk/Libraries/MiscDrivers/Display/tft_ili9341.c
- CC /home/jhcarter/repos/msdk/Libraries/MiscDrivers/Camera/camera.c
- CC /home/jhcarter/repos/msdk/Libraries/MiscDrivers/Camera/ov7692.c
- CC /home/jhcarter/repos/msdk/Libraries/MiscDrivers/Camera/sccb.c
- CC /home/jhcarter/repos/msdk/Libraries/MiscDrivers/PMIC/max20303.c
- CC /home/jhcarter/repos/msdk/Libraries/MiscDrivers/CODEC/max9867.c
- CC /home/jhcarter/repos/msdk/Libraries/MiscDrivers/Display/fonts/LiberationSans12x12.c
- CC /home/jhcarter/repos/msdk/Libraries/MiscDrivers/Display/fonts/LiberationSans16x16.c
- CC /home/jhcarter/repos/msdk/Libraries/MiscDrivers/Display/fonts/LiberationSans19x19.c
- CC /home/jhcarter/repos/msdk/Libraries/MiscDrivers/Display/fonts/LiberationSans24x24.c
- CC /home/jhcarter/repos/msdk/Libraries/MiscDrivers/Display/fonts/LiberationSans28x28.c
- AS /home/jhcarter/repos/msdk/Libraries/CMSIS/Device/Maxim/MAX78000/Source/GCC/startup_max78000.S
- CC /home/jhcarter/repos/msdk/Libraries/CMSIS/Device/Maxim/MAX78000/Source/heap.c
- CC /home/jhcarter/repos/msdk/Libraries/CMSIS/Device/Maxim/MAX78000/Source/system_max78000.c
- LD /home/jhcarter/repos/msdk/Examples/MAX78000/TFT_Demo/build/max78000.elf
arm-none-eabi-size --format=berkeley /home/jhcarter/repos/msdk/Examples/MAX78000/TFT_Demo/build/max78000.elf
   text	   data	    bss	    dec	    hex	filename
 226980	   1736	   2388	 231104	  386c0	/home/jhcarter/repos/msdk/Examples/MAX78000/TFT_Demo/build/max78000.elf

@Jake-Carter
Copy link
Contributor

Manually running auto builder, not sure why it's not triggering for this PR.

https://github.com/Analog-Devices-MSDK/msdk/actions/runs/6898675901

@github-actions github-actions bot added the MAX32655 Related to the MAX32655 (ME17) label Nov 17, 2023
@Jake-Carter Jake-Carter merged commit 4461e6d into analogdevicesinc:main Nov 18, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MAX32655 Related to the MAX32655 (ME17) MAX32662 Related to the MAX32662 (ME12) MAX32672 Related to the MAX32672 (ME21) MAX32690 Related to the MAX32690 (ME18) MAX78000 Related to the MAX78000 (AI85) MAX78002 Related to the MAX78002 (AI87)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants