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: Display a loading page with ESD  (Read 6619 times)

Cyrilou

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Display a loading page with ESD
« on: February 24, 2021, 09:41:53 AM »

Hi,

I'd like to display a loading page with progressbar during inflating or loading of image and fonts...
How to make this?
If I load an image in SPI flash of EVE from MCU flash, and I restart esd application, how can I detect that image is already in eve flash to not reload it?
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 733
    • View Profile
Re: Display a loading page with ESD
« Reply #1 on: February 24, 2021, 04:31:07 PM »

Hello,

Please have a look at the Ft_Esd_ProgressBar Widget included in ESD for producing a progress bar for a loading screen.

As for verifying the contents of flash after an ESD restart, unfortunately this is not currently a supported feature. But I will contact the development team to see if they can add this in future versions of ESD.

Best Regards,
BRT Community
Logged

Cyrilou

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Re: Display a loading page with ESD
« Reply #2 on: February 25, 2021, 09:29:59 AM »

When I export ESD project to eclipse with an image in flash I have a __flash.bin of 4MB and __flash.map files created in data folder. How to transfert these files to spi flash W25Q32 of BT815 from my little MCU flash of 1MB?
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 733
    • View Profile
Re: Display a loading page with ESD
« Reply #3 on: February 25, 2021, 01:19:09 PM »

Hello,

The code below is an example of writing a file to a flash IC connected to EVE:
Code: [Select]
int Utils_Write_File_To_Flash(uchar8_t *fileName, uint32_t addr, uint32_t tmp_ram_addr)
{
FILE *fp;
uint32_t fileLen, ret, progress = 0;
uint8_t pBuff[(1024 * 32)];
fp = fopen(fileName, "rb+");

if (fp) {

fseek(fp, 0, SEEK_END);
ret = fileLen = ftell(fp);

fseek(fp, 0, SEEK_SET);
while (fileLen > 0)
{
progress = (ret - fileLen) * 100 / ret;
fprintf(stderr, "Progress PROG %d\n", progress);
fflush(stderr);
int32_t ramlen = 0;
tmp_ram_addr = 0;
while ((ramlen < (1024 * 1024)) && (fileLen > 0))
{
uint32_t blocklen = fileLen > (1024 * 32) ? (1024 * 32) : fileLen;
fread(pBuff, 1, blocklen, fp);
fileLen -= blocklen;
Gpu_Hal_WrMem(phost, tmp_ram_addr, pBuff, blocklen); //write data to RAM_G
tmp_ram_addr += blocklen;
ramlen += blocklen;
}
ramlen = (ramlen + 4095) & (~4095);//to ensure 4KB alignment

Gpu_CoCmd_FlashHelper_Update(phost, addr, 0, ramlen); // CMD_FLASHUPDATE
addr += ramlen;
}
fclose(fp);
}
else {
printf("Unable to open file: %s\n", fileName);
}
return ret; /* File size */
}

Please note, this is from our EAB flash programming utility which requires a USB connection to a module. However the same steps will work when updating a flash IC from an MCU. Unfortunately however you may be required to expand the storage of your MCU if the flash file is significantly larger than the storage available, adding an SD card to your configuration may be a suitable solution.

Best Regards,
BRT Community
Logged

Matrix Orbital

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Matrix Orbital
Re: Display a loading page with ESD
« Reply #4 on: February 25, 2021, 07:01:16 PM »

Cyrilou,

I couldn't see what display you are using, but if you are using a Matrix Orbital EVE display you can use this module here to upload directly into the NOR Flash

https://www.matrixorbital.com/eve2-usb2spi-kit-a

Logged
Matrix Orbital
Display Solution Provider

Embedded HDMI TFT's, EVE2, EVE3 & EVE4 TFT's, Serial LCD's, USB, LCD's

www.matrixorbital.com
www.lcdforums.com/forums