cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the circleProgress widget value goes to HardFault_Handler() on STM32G071_NUCLEO

Q8
Associate II

When I set the circleProgress widget value to something that is not 0 it goes to HardFault_Handler()  and stop working.

I started crating the application with the TouchGFX Designer for the  STM32G071_NUCLEO.

I finished my simple application and on the simulator the applications runs perfectly, but when I flash it to the board this problem occur.

Then I made a screen with only a circlePorgress. If from the start I set the circlePorgress.value() to 0 it opens the screen and shows the background. But if I set the circlePorgress.value() to something else, it does not show the widget and freezes, going to HardFault_Handler(). Ones it is set to 0 I also tried to increment the values and the same happens, HardFault_Handler(). It does not matter the background and image, always fails, and only happens with this widget, from the ones I tried.

I don't know if the chip is not powerful enough, or what is happening.

I use CubeMX v6.2, CubeIDE v1.6, TouchGFX v4.16 but I try it before with CubeMX v5.5, CubeIDE v1.2, TouchGFX v4.15, and then upgrade to see if it worked on newer versions.

I attached the application I have done.

4 REPLIES 4
Romain DIELEMAN
ST Employee

Hi,

I was able to replicate it with a project from scratch as well, this is very odd indeed.

Thank you for reporting this :thumbs_up:

/Romain

Romain DIELEMAN
ST Employee

It does not happen to me on other boards so it must be linked to the application template for the STM32G0 nucleo.

If you use "Color" instead of "Image" in the settings of the circle progress settings in TouchGFX Designer, you do not face the Hard fault issue anymore. For now if it is enough for your UI you can use this workaround while we investigate a bit more.

/Romain

Romain DIELEMAN
ST Employee

Ok so third message :grinning_face_with_sweat:

I knew this issue rang a bell. You need to put the image into the internal flash section and not external flash. This can be set in TouchGFX Designer in the "Images" tab. Since the G0 has limited space you should put only the indicator image in internal flash. You will also need to set the image to the image format ARGB888 (automatically done for the images found in the SKIN folder but it is always better to set it to make sure).

I personally work with IAR (EWARM) and it was working fine, however when I tried to run from Designer afterwards the progressCircle widget would not be animated. It turns out that the TouchGFX footprint is not of the same size with gcc, IDE and IAR, we will investigate on the reason and if needed to fix it. So try to work around, maybe with IAR if you have a license, on the size of the indicator image and available space in internal flash, or use "color" instead if relevant.

/Romain

Q8
Associate II

Thank you very much for the answer.

I tried smaller images but didn't work either:

Compile

make -f ../gcc/Makefile -j8

Reading TouchGFX/application.config

Compiling TouchGFX/generated/images/src/image_SmallRedCircle.cpp

Linking TouchGFX/build/bin/target.elf

c:/touchgfx/4.16.0/env/mingw/msys/1.0/gnu-arm-gcc/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: TouchGFX/build/bin/target.elf section `IntFlashSection' will not fit in region `FLASH'

c:/touchgfx/4.16.0/env/mingw/msys/1.0/gnu-arm-gcc/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: region `FLASH' overflowed by 6408 bytes

collect2.exe: error: ld returned 1 exit status

gcc/Makefile:263: recipe for target 'TouchGFX/build/bin/target.elf' failed

make[2]: *** [TouchGFX/build/bin/target.elf] Error 1

gcc/Makefile:259: recipe for target 'generate_assets' failed

make[1]: *** [generate_assets] Error 2

../gcc/Makefile:44: recipe for target 'all' failed

make: *** [all] Error 2

Failed

Failed

What I undestand is that with my Nucleo I can't load any image to the flash because it is not large enough. I only could do it if I change the compiler, because it reduces the project footprint.

So I will use flat colors instead. Or use a board with more flash...

Thanks,

Q