BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: Re: EVE Asset Builder  (Read 13158 times)

chadpham75

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: EVE Asset Builder
« on: March 09, 2021, 06:51:58 PM »

Hi BRT Community or Rudolph,
I found only you 2 are active on this thread so may I address both of you?
I am trying EAB version 2.10 and follow the document release on 12/17/2020.  The information on the steps are very generic.  I am looking for the simple examples of select images and load in my module using USB2SPI adapter board, but when I follow the document, my image is just the distorted in one corner image.
I tested the module is working perfectly fine with the source image when I am using EVEBitmapViewer tool.
I am using EVE3-43G module together with USB2SPI board.
Anything you can point to me to get the example how to use EAB for the image conversion and flashing to the module is very appriciated.
Logged

chadpham75

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Re: EVE Asset Builder
« Reply #1 on: March 09, 2021, 07:55:54 PM »

Hi Rudolph,
If I have 4.3" 480x272 HVGA - Oversized Mountable Capacitive Touch TFT, which output format should I select?  And do I need compress of the data?  All of these details information would be very helpful for the developer if there is a details documents separately for it.
Thank you so much for your helps.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 743
    • View Profile
Re: EVE Asset Builder
« Reply #2 on: March 10, 2021, 04:39:42 PM »

Hello,

I have split this topic just for clarity as the previous topic was concerning bug reports with EAB.

I don not have any examples specifically for the EVE3-43G utilising the USB2SPI adapter board from matrix oribital (they may have some on their website), however if you can share the code you are using to display the image I can review this.

Some generic examples of how to convert and display images can be found in section 7 of the following application note:
BRT_AN_014 FT81X Simple PIC Library Examples

Could you also show me distortion you are seeing in the corner of the image?

I had a quick look at the EVEBitmapViewer source code and it looks like this expects images to be in the RGB565 format, what options are you using in EAB to convert your new image?

Best Regards,
BRT Community
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 391
    • View Profile
Re: EVE Asset Builder
« Reply #3 on: March 10, 2021, 06:24:55 PM »

Oh, looks like I just answered most of this in the other thread. :-)

It appears to be that EVE Screen Editor has a bug.
But EVE Asset builder is fine in this case.

To directly display images from the attached flash memories these need to be converted to ASTC.
And no, not compressed, just drag the resulting image_name_WIDTHxHEIGHT_COMPRESSED_RGBA_ASTC_8x8_KHR.raw
in the box "Generate Flash Image" and generate the .bin file.
Next switch to "Flash Programmer", swith there to "Program", select "MPSEE" as programmer module, select the .bin file and use the "UPDATE" or "UPDATE & VERIFY" button.


https://github.com/RudolphRiedel/FT800-FT813
Logged

chadpham75

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: EVE Asset Builder
« Reply #4 on: March 10, 2021, 08:19:20 PM »

Hi BRT Community,
Thank you so much for your reply.  The intention for my test is the evaluation of the product and development process to make the decision of the mass productions purchase for the new LCD.
I already successfully integrate the said module with my MCU talking SPI and is able to checkout all signal like SPI and interrupt INT_N already.

It is time for interface preparations like images, buttons, animations on the display. Contact Matrix Orbital, they didn't know anything to support and point to me to use the EAB and there is no support from Matrix Orbital since EAB belong to Bridgetek.

So now I am stuck with the couple LCDs without any progress.

To eliminate some unknow hardware obstacles, I tried to use the EAB and connect directly with USB2SPI break board, EVE2-USB2SPI-KIT-A, that I bought from Matrix Orbital as well at this link https://www.matrixorbital.com/eve2-usb2spi-kit-a?search=usb2spi

If you see this adapter board is not working for my testing, please point me to the right direction to help me to evaluation the EAB and the LCD correctly.

So here are the hardware set up:
LCD: EVE3x-43G-IPS-BLH-TPC-F128-HAP
Interface with EAB v2.10 using USB2SPI break board, EVE2-USB2SPI-KIT-A

Goal: symbol png image preparation and flash to LCD module

Running EAB v2.10

Step 1 Conversion png image

Log:
C:/Images/page1livetext.png conversion is in progress...
Image Conversion completed!
Filename              : page1livetext_480x272_RGB565.raw (261120B)
Format                : RGB565
Width                 : 480
Height                : 272
Compressed            : no
C:/Images/page1livetext.png conversion is done!

Step 2 connect the LCD and detected the LCD

Log:
Detecting flash...
Flash size: 16 MB

Blob is present.

Flash can switch to full speed.
END

BEGIN
Calculate reading speed...

Reading speed: 10.42 MB/s
Reading 10 MB in 0.96 seconds
END

Step 3 Prepare the flash
Flash's Map:
unified.blob                               : 0    : 4096
page1livetext_480x272_RGB565_Converted.png : 4096 : 22912

Log:
Input files are ready!
C:/Flash is selected as output folder.
Generating flash.bin ...
Generate flash image flash.bin successfully
Flash Map file         :  flash.map
Flash Description file :  flash.ed

Step 4 flashing the .bin file using Updates and Verify
Log:
Updating C:/Flash/flash.bin to flash, erasing if necessary ...
 Information on channel number 0:
 Flags=0x2
 Type=0x8
 ID=0x1b3d0200
 LocId=0x1c3
 SerialNumber=0k5RJ57L
 Description=USB 2 SPI
 ftHandle=0x0

handle=0x1ee8ca90 status=0x0
VC1 register ID after wake up 7c

 reg_touch_rz =0x7fff
 reg_touch_rzthresh =0xffff
 reg_touch_tag_xy=0x80008000
 reg_touch_tag=0x0

Switch flash status to FULL. Result: ERROR
No header detected in sector 0 - Is flash blank?
Flash status BASIC.
Install blob to flash
Switch flash status to FULL. Result: SUCCESS
Installing blob is successful.
Updating Flash file "C:/Flash/flash.bin" to BT81X Flash Storage.
Switch flash status to BASIC. Result: SUCCESS
Switch flash status to FULL. Result: SUCCESS
Switch flash status to BASIC. Result: SUCCESS
Switch flash status to FULL. Result: SUCCESS
Update Flash file "C:/Flash/flash.bin" to BT81X Flash Storage successfully
Switch flash status to BASIC. Result: SUCCESS
Switch flash status to FULL. Result: SUCCESS
Verifying Flash...
Verify flash successfully!
DONE!
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 391
    • View Profile
Re: EVE Asset Builder
« Reply #5 on: March 11, 2021, 05:59:42 PM »

Hello,

what are we actually looking at?
Everything works, the image is converted, put in a flash container and written to the flash.
What are you doing next?

As you are using RGB565, you cannot display this image directly from flash, it needs to be transfered
into RAM_G first with CMD_FLASHREAD.

To display an image directly from flash you need to convert it to ASTC format.
See chapter 6 of the Programming Guide: "Through ASTC format, BT81X Series is able to show images directly from flash memory without taking the precious RAM_G space."
And 2.8: "Direct rendering of ASTC based bitmaps from flash is only possible in FLASH_STATE_FULL."
So the flash needs to be initialised first.

What MCU are you using?
Logged

chadpham75

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: EVE Asset Builder
« Reply #6 on: March 11, 2021, 06:12:37 PM »

Hi Rudolph,
Thank you so much for your reply.
I just went to your github link and I found you already success to use the ESP32 native IO with DMA. 
I couldn't find your example code when I am doing searching last couple weeks so I used STM32 example from Matrix Orbital github, run to understand and port the code to ESP32 native IO using ESP32 SPI example and your Eve2_81x library.  I am successfully get the SPI talking to my EVE3x-43G and get the interrupt back from the touch actions.
I am about to post to in the share folder for anyone who need the ESP32 nature but today I found you already done with DMA method.  I would like to give it a try. 
Could you please help me to point it out for me the set up for your ESP32 environment? 
I got the error as soon as I try to compile the code because my CMAKE version is older than your code.  And once I successfully update the CMAKE to newer version.  I compiled and fail for the undefined rererence to 'app_main'

-- Build files have been written to: C:/Projects/esp/EVE_Test_ESP32_PlatformIO/build/bootloader
[927/931] Linking CXX executable EVE_Test_ESP32_PlatformIO.elf
FAILED: EVE_Test_ESP32_PlatformIO.elf
cmd.exe /C "cd . && C:\Users\Admin\.espressif\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe  -mlongcalls -Wno-frame-address   @CMakeFiles\EVE_Test_ESP32_PlatformIO.elf.rsp  -o EVE_Test_ESP32_PlatformIO.elf  && cd ."
c:/users/admin/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/esp32/libesp32.a(cpu_start.c.obj):(.literal.main_task+0x10): undefined reference to `app_main'
c:/users/admin/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: esp-idf/esp32/libesp32.a(cpu_start.c.obj): in function `main_task':
C:/Users/Admin/Desktop/esp-idf-2/components/esp32/cpu_start.c:589: undefined reference to `app_main'
collect2.exe: error: ld returned 1 exit status

Again thank you so much for your helps.
« Last Edit: March 11, 2021, 06:35:46 PM by chadpham75 »
Logged

chadpham75

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: EVE Asset Builder
« Reply #7 on: March 12, 2021, 06:25:47 PM »

Hi Rudolph,
Somehow the follow up post got lost and didn't show.
I am using ESP32-SOLO-1 and your Eve2_81x library (the earlier version).
I am able to draw and display the text and blue solid circle, touch to increase the size of the circle so I know the library is working fine.
After I loaded the image as your instructions  I also add in the function to display the image I just created and download to flash.  I saw my debug text printed out to tell me the function is actually got call but there is nothing to display on the screen.
I believe I might miss something either in the instructions or some settings.  As you already point it out now I have to search for how to set the FLASH_STATE_FULL so I am able to direct rendering of ASTC based bitmap from flash.

void MakeScreen_live1()
{
    printf("Make live screen\n");
    Send_CMD(CMD_DLSTART);
    Send_CMD(CLEAR_COLOR_RGB(0,0,0));
    Send_CMD(CLEAR(1,1,1));
    Cmd_SetBitmap(0x800000|128, COMPRESSED_RGBA_ASTC_8x8_KHR, 480, 272);
    Send_CMD(BEGIN(BITMAPS));
    Send_CMD(VERTEX2F(0, 0));
    Send_CMD(END());
}
« Last Edit: March 12, 2021, 07:08:52 PM by chadpham75 »
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 743
    • View Profile
Re: EVE Asset Builder
« Reply #8 on: March 15, 2021, 02:47:46 PM »

Hello,

To use the flash in FULL state we can download the BLOB and program it by following the steps below:

1)   Unzip the file into your local PC “unified.blob”, which is 4096 bytes only.
2)   Ensure that the EVE board is properly booted up by following the known sequence.
3)   Read the file “unified.blob” and download the whole 4096 bytes into RAM_G ( using EVE_MemWrite)
4)   Send the command cmd_flashupdate(0,  RAM_G, 4096) to RAM_CMD, update the write pointer(REG_CMD_WRITE) properly
5)   Wait till REG_CMD_WRITE is equal to REG_CMD_READ
6)   The flash has been programmed with BLOB file.

With the BLOB file, now users can send the command cmd_flashfast to switch it to “Full” state, users can now access any data in the flash properly.


Best Regards,
BRT Community
Logged

chadpham75

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: EVE Asset Builder
« Reply #9 on: March 15, 2021, 05:07:46 PM »

HI BRT Community,
Thank you for the unified.blob file.  I unzipped and compare with the unified.blob file from EAB and it is the same.
My questions:
1. The procedures attached unified.blob from EAB is the same as the instructions below is that correct?
2. Once my module is flashed with unified.blob.  The next time, if I want to flash the module again, do I need to flash the unified.blob again? Or can I skip it?
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 391
    • View Profile
Re: EVE Asset Builder
« Reply #10 on: March 15, 2021, 06:05:52 PM »

To add to this, my example is activating the flash.
Not by default though since this is part of the UTF-8 test.

https://github.com/RudolphRiedel/FT800-FT813/blob/5.x/example_projects/EVE_Test_ESP32_PlatformIO/src/tft.c
In TFT_init(), line 360ff there is EVE_init_flash(); in line 381.

And EVE_init_flash() does some things more than only calling EVE_cmd_flashfast().
It checks the status of the flash first and only tries to switch it to fast mode if it is ready.
There also is a return-value I did not bother to check for the example.




Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 743
    • View Profile
Re: EVE Asset Builder
« Reply #11 on: March 16, 2021, 04:57:39 PM »

Hello,

Yes that is correct, this procedure can be used to upload the unified.blob file from EAB also.

Depending on whether or not you have erased the flash IC you may need to re-upload the 'unified.blob' file to flash. If you are just trying to update the Flash IC then you can use the CMD_FLASHUPDATE command to achieve this.

Best Regards,
BRT Community
Logged