cancel
Showing results for 
Search instead for 
Did you mean: 

Program does not go to entry point on debug i.e. main() with STemWin Library

Priyank Parmar
Associate
Posted on December 22, 2016 at 08:52

Hello,

Greetings,

I am working on a STM32F103 Micro-controller Board that has interfaced with TFT LCD having ST7735 controller.

Micro-controller: STM32F103RGT6

Flash Memory: 1 MB

RAM Memory: 96 KB

IDE: IAR Embedded Workbench

ST Library: HAL Library & STemwin for Graphics

I am trying to add STemWin Library in program but as I am adding it in code, the program doesn't move to entry point on debug i.e. main(). I have tried following approaches to fix it.

1. Changing Linker File data (RAM Range, ROM Range, Stack and Heap Size) [File_1]

2. Changing memory allocation in LCDConf.c and GUIConf.c that allocates memory to STemWin.[File_2]

3. Changing IAR Settings in debugger 'Tick and Untick' > Run to 'main'[File_3]

I have attached all the related files.

Observation : All the registers including PC are not initialising with their initial values on debug.

It would be highly appreciated for any kind of suggestion or options.

Thank you in advance.

Priyank

#stemwin #st7735 #lcd-tft #stm32f103 #emwin
3 REPLIES 3
AvaTar
Lead
Posted on December 22, 2016 at 09:44

3. Changing IAR Settings in debugger 'Tick and Untick' > Run to 'main'[File_3]

Have tried to untick 'run to main', and then debug through the startup code - from the reset vector on ?

I guess either clock settings or some peripheral initializations (graphics) fail, perhaps with a memory-related problem.

I don't have your hardware.

Priyank Parmar
Associate
Posted on December 22, 2016 at 10:22

meyer.frank

‌ : Thank you for your quick response. I really appreciate it.

I have tried without adding STemWin Library in code and that is working properly with LCD .

For testing I displayed some circles on LCD. There might be problem related to memory allocation to stack in RAM so I tried changing RAM range according to STM32103RGT6 datasheet.

I request you to go through Linker File(File_1_Linker_File.icf) and STemWin Configuration Files(File_2_GUIConf.c & File_2_LCDConf.c ) attached in Question. and Please suggest changes if required.

Regards,

Priyank

AvaTar
Lead
Posted on December 22, 2016 at 10:54

For testing I displayed some circles on LCD. There might be problem related to memory allocation to stack in RAM so I tried changing RAM range according to STM32103RGT6 datasheet.

If you selected the proper MCU variant for the project, there should be no need to modify the ICF file. The IDE selects the proper one for you - that is one of the reasons the toolchain is not for free ...

Have you tried to increase the stack size (for the project) instead ?

I never used STemWin, but I guess the have size recommendations in their tutorials. I would suggest at least 1 kB.

I request you to go through Linker File(File_1_Linker_File.icf) and STemWin Configuration Files(File_2_GUIConf.c & File_2_LCDConf.c ) attached in Question.

Sorry, but I don't have the time to do that - I have a (not ST-affiliated) day job on my own.

At least the ICF file are well documented within the IAR WB.