cancel
Showing results for 
Search instead for 
Did you mean: 

f030c8t6 and emWin

Ala
Senior

Hi there, I have a STM32f030c8t6 and I want to run emWin on it. in documents it is said that minimum requirements for emWin is as follows

RAM: 100 Bytes

Stack: 600 Bytes

ROM: 10-25 KBytes

and based on datasheet stm32f030c8t6 has following characteristics:

16 to 64 Kbytes of Flash memory

4 to 8 Kbytes of SRAM

so I assume I can run emWin on it. but when I write GUI_Init(); I get following error

Error: L6406E: No space in execution regions with .ANY selector

why is that?

1 ACCEPTED SOLUTION

Accepted Solutions
Ala
Senior

Solved it!

as I have mentioned above, GUI_Init() really affects occupied RAM, but why is that?

searching in emWin files, you can find a source file called GUIConf.c(or it might have a similar name). here you should define the available number of bytes available for the GUI. in my case, I used my preset number of bytes which was 30KB! but now that I was using stm32f030c8t6, the entire RAM that I've got was only 8KB! so here I changed this parameter to 5KB. and it worked! note that this configuration and limitation of RAM didn't give me much of opportunity for having any window or widgets. yet I managed to do all the stuff that I needed using 2-D GUI graphics(chapter 5.3 2-D Graphic Library in emWin document)

(I also had some problems for running it in 8bit mode and some other issues of everything on same port but above explanation is the complete description of the posted topic)

View solution in original post

4 REPLIES 4
Imen.D
ST Employee

Hello @Ala​ ,

Are you able to compile and run the project without emwin?

Are you using Keil IDE?

Check the scatter file for your project? If the size is defined through the Target options dialog (link), expand the memories, then check the .MAP file and the output (log/progress window).

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

yes! not only without emwin, but also just as I comment out line of GUI_Init();

yes I am using Keil, I have already expanded stack to 0xD00 and Heap to 0x400. I also checked .map file, here is what I've figured(this result is without GUI_Init() being in the code):

RAM occupied: 4.03KB(total RAM of stm32f030c8t6==8KB)=>50% occupied

ROM occupied: 9.20KB(total ROM of stm32f030c8t6==64KB)=>14% occupied

then I tested this with another code that I had and ran on stm32f407vgt6. as I commented GUI_Init() out, this affected occupied RAM and ROM enormously!

as 10KB reduced from occupied ROM and 30KB reduced from occupied RAM! this is I think important! because this shows GUI_Init() has can affect RAM by 30KB!

as my RAM is already occupied(4.03KB) and has total size of 8KB, then I guess the RAM itself(8KB) can not handle 30KB of GUI_Init() function.

am I right?

Ala
Senior

Solved it!

as I have mentioned above, GUI_Init() really affects occupied RAM, but why is that?

searching in emWin files, you can find a source file called GUIConf.c(or it might have a similar name). here you should define the available number of bytes available for the GUI. in my case, I used my preset number of bytes which was 30KB! but now that I was using stm32f030c8t6, the entire RAM that I've got was only 8KB! so here I changed this parameter to 5KB. and it worked! note that this configuration and limitation of RAM didn't give me much of opportunity for having any window or widgets. yet I managed to do all the stuff that I needed using 2-D GUI graphics(chapter 5.3 2-D Graphic Library in emWin document)

(I also had some problems for running it in 8bit mode and some other issues of everything on same port but above explanation is the complete description of the posted topic)

Imen.D
ST Employee

Hi @Ala​ ,

Good to hear you made it work and thanks for sharing your update and solution :thumbs_up:

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen