Emwin Fonts in SDRAM + LPC1788

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Emwin Fonts in SDRAM + LPC1788

642 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by anuj.tanksali on Sat Aug 30 08:57:26 MST 2014
Hi,

I have successfully run Emwin on my LPC 1788 board with Emwin fonts. The Emwin Fonts are stored in external NAND flash and on boot up of my system l copy the fonts from NAND flash to SDRAM. I have defined the mapping of fonts in scatter file. In the actual font.c file i have added __attribute to each font array and defined section which i use in my scatter file. I am using keil IDE and extract the font file image using fromelf utility provided by keil to get a bin file. I have defined the load and execution regions in which i have included the sections. i have defined the execution region of SDRAM from 0xA1000000 with 16mb size.

I download the hex file and font file which i extract using fromelf to my board using a PC utility. All is working file and i get to see the fonts on my 7" 800 x 480 pixel display. 

As i download the fonts once in my external NAND i assume that i need not download again and just program only the hex file.
all works well when i compile and download all my files at once i.e. hex + font file. but the second time when i download only the hex file with some changes only in hex not font file i get a hard fault error.

After compiling if i download hex + font file everytime then it works fine.
as the font bin is already present in NAND and i copy from NAND to SDRAM on boot up i feel it should work if the font is already present and i need to download only hex every time but its not working. I am stuck up , dont know what am i doing wrong. has anybody come across such a problem. Please help

Thanks in advance,

Anuj
Labels (1)
0 Kudos
2 Replies

485 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by anuj.tanksali on Tue Sep 02 03:27:31 MST 2014
Hi,

Thanks for your reply. I verified the data and addresses 2 to 3 times. it is correct and the i get same values every time. still the issue remains.

my scatter file for SDRAM is below

LR_RAM2 0x0xA1000000 0x00E00000  {
01_CodeFile 0xA1000000 0x00E00000  { 
  *(CALIB72, CALIB48, CALIB28, CALIB24, CALIB20, BCKGND , SCR_SPF, SCR_PV, SCR_IRRA, SCR_BIO, UP_ARW, DN_ARW, SCR_SET, SCR_MAT, BCKDES, CLICK, BEEP, ENDOP, SCONN, RED_BUTTON, RED_BUT_MATERIAL)
   }
}

is it because i have defined the sections and not fixed addresses. I plan to hard code the addresses and again check.

Anuj

0 Kudos

485 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mrabbasi61 on Sat Aug 30 09:38:39 MST 2014
hi,
I was thinking that you can make a little change in your program,
1- download your code + font , then copy font into Nand Flash (just like what you did before)
2 change your code in a way that
after start up read from Nand Flash where you put your font, and verify if there is correct data at the correct location.
3- download your code (with out font) and see the result.
0 Kudos