The firmware build section

Hello MicroEJ team
I completed the firmware build section from scratch, and started testing on the CORTX_M4 build on an STM32F401VE6 processor to test the hex file on the Proteus 8 circuit simulator and test button push events.
In the section

This image is being tested in the Proteus environment

This is the content of the main.c

main.txt (5.2 KB)

Development has begun in testing to test and emulate the UI PACK on a TFT LCD.
During the build process, I got an error: RAM Overflowed.
Information about STM32F401VET6:
Flash memory = 512K
RAM = 96K

My question is what is the amount of memory required to use the UI?

Hussam

Hello @hussam,

The amount of memory to use the UI mainly depends on your display resolution and bits per pixel.

For example, if your display has a resolution of 320x240 pixels and uses a 16bpp color depth, you will need 320*240*16/2 = 153.6KB of RAM.

If your RAM is not big enough to fit the display buffer, you may want to use a Partial Buffer.

In addition to the display buffer(s), your RAM will also have to contain the heaps and stacks needed by your application to work. You can read the Optimize the Memory Footprint of an Application tutorial to compute your needed memory, calibrate and optimize it.

Regards,
Alexis

1 Like

Thank you @alexis.pineau for helping me
I have a simple question?
Using Partial Buffer technology and controlling memory capacity such as heaps and stacks, can I create a simple application that runs on a 96k random access memory or will I need to change the processor :grin:?

Thank you very much

Hussam

Hello @hussam,

It is possible to run an application with 96K of RAM.

If you give us more details about what your application should do, we can estimate whether it could run on your hardware or not.

Regards,
Alexis

OK, I’m very interested in the MicroEJ software development environment, and I started studying MicroEJ documentation.
I’m working on a Tutorial section. I have completed the implementation of the * Create a MicroEJ Firmware From Scratch section and moved to the * Get Started With GUI section to learn how to connect the TFT LCD screen to the graphics engine as in the Display section.
In general, I implement the MICROEJ documentation, and test the implementation of the * MicroEJ Packs on the Proteus circuit environment due to the lack of a sophisticated test board.
The processor available in the Proteus environment is STM32F401VE with 96K RAM, 320X240 PIXELS display.
My Target is:
1_ Connect the display screen via SPI
2_ Activate LLUI_DISPLAY_IMP. h
3_ Display only text on the display screen
4_ Go to the photo display
5_ And other * MicroEJ Packs

Hello @hussam,

Can you tell me what is your color depth?

The amount of RAM you have may be enough to display only text on the screen. But it may be short for other UI operations.

Regards,
Alexis

Yes, I can tell you.
The color depth is, bpp=rgp565

Hello @hussam,

With this configuration, you will either have to use a Partial Buffer or extend your RAM as you would need 150KB for a full screen framebuffer.

Regards,
Alexis

Hi @alexis.pineau thank you
OK, I will complete the test using partial buffer policy, but I will use SPI to transfer data. Is there an example of using SPI to implement LLUI_DISPLAY.c?
Most of the implementations are parallel.

Thanks

Hussam

Hello @hussam,

We have one public VEE Port that uses SPI for LLUI_DISPLAY.c.

You can find it here VEEPort-Espressif-ESP-WROVER-KIT-V4.1/ESP32-WROVER-Xtensa-FreeRTOS-bsp/projects/microej/ui/src/LLUI_DISPLAY.c at 2.2.1 · MicroEJ/VEEPort-Espressif-ESP-WROVER-KIT-V4.1 · GitHub

Regards,
Alexis