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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - alig

Pages: [1]
1
Discussion - EVE / Re: ESD 4.8 - STM32 - Image
« on: July 23, 2020, 06:50:15 AM »
That flash part was not for other micro controllers, it was for FT micro controllers and I am working with ST micro controller. I could upload the image, it calls those functions itself. For my case, my image's resourceInfo->Compressed type was ESD_RESOURCE_DEFLATE, so for that image generated code calls EVE_Util_loadInflateFile(EVE_HalContext *phost, uint32_t address, const char *filename) function. It handles *phost and address part, we should take care of filename. Here filename is unique and it comes from source file that I used in ESD 4.8 . I changed that function like below
Code: [Select]
bool EVE_Util_loadInflateFile(EVE_HalContext *phost, uint32_t address, const char *filename)
{

uint32_t ftsize = 0;
uint8_t pbuff[8192];
uint16_t blocklen;

for (int i = 0; i < (sizeof(fileArray) / sizeof(fileInfo)); i++)
{
if (0 == memcmp(fileArray[i].name, filename, sizeof(filename)))
{
if (!EVE_Cmd_waitSpace(phost, 8))
return false; // Space for CMD_INFLATE

EVE_Cmd_wr32(phost, CMD_INFLATE);
EVE_Cmd_wr32(phost, address);
ftsize = fileArray[i].size;

while (ftsize > 0)
{
blocklen = ftsize > 8192 ? 8192 : ftsize;
memcpy(pbuff, fileArray[i].address + (fileArray[i].size- ftsize), blocklen);
ftsize -= blocklen;
if (!EVE_Cmd_wrMem(phost, (char *)pbuff, blocklen)) /* copy data continuously into command memory */
break;
}

return EVE_Cmd_waitFlush(phost);
}
}

return false;
}

and now I can upload any image to RAM_G.

2
Discussion - EVE / ESD 4.8 - STM32 - Image
« on: July 17, 2020, 09:45:56 AM »
I have ported ESD project to STM32. I can see labels, uttons, sliders etc. but I cant see ESD Image Widget or Image Buttons. I have a image named "down" and ESD 4.8 created this for it:

Ft_Esd_BitmapInfo down__Info = {
   .Width = 75,
   .Height = 105,
   .Format = ARGB1555,
   .Stride = 150,
   .Size = 15750,
   .FlashAddress = 0x0800C000;//.File = "down.bin",
   .GpuHandle = {
      .Id = MAX_NUM_ALLOCATIONS,
      .Seq = 0
   },
   .BitmapHandle = ~0,
   .AdditionalFile = 0,
   .AdditionalInfo = 0,
   .PaletteFile = 0,
   .PaletteGpuHandle = {
      .Id = MAX_NUM_ALLOCATIONS,
      .Seq = 0
   },
   .Cells = 1,
   .Compressed = 1,
   .Persistent = 0,
   .Flash = 1,//0,
   .PreferRam = 0,
   .CoLoad = 0,
};

I changed flash parts because I put my image's bin file to STM flash memory at 0x0800C000. This binary file is also created by ESD 4.8 . Binary file's size is 2241 bytes but in the config struct above size is 15750. This is my first problem.


There are these functions:
bool EVE_Util_loadRawFile(EVE_HalContext *phost, uint32_t address, const char *filename);
bool EVE_Util_loadInflateFile(EVE_HalContext *phost, uint32_t address, const char *filename);
bool EVE_Util_loadImageFile(EVE_HalContext *phost, uint32_t address, const char *filename, uint32_t *format);
Should I use one of those before widgets initialized? If yes, how? Those functions are all reading from file, I can handle that part to read from flash but I dont know what should I put for *phost and address. How can I solve these problems? or is there any reference ESD project which displays images? Thank you.

Pages: [1]