Skip to main content
Louis__0
Associate II
March 10, 2021
Question

DynamicBitmapCreat in keil causes the program to enter a hardfault.

  • March 10, 2021
  • 2 replies
  • 1353 views

I generated a Keil based TouchGFX project in stme2cubemx.The DynamicBitmapCreat function was called to create the first Bitmap without any problems, the ID and startAddress were all correct, but when I created the second Bitmap the program went straight into HardFault.I'm using TouchGFx16.0, and have used TouchGFx13.0 before, but have not resolved this issue.Any good suggestions?

This topic has been closed for replies.

2 replies

Romain DIELEMAN
ST Employee
March 10, 2021

Hi,

Could you edit the Topic tags to add the TouchGFX topic ? This will increase the visibility of your post.

/Romain

Tesla DeLorean
Guru
March 10, 2021

What kind of bill-of-goods did SalesForce sell you guys? Other forum software's have assignable / tiered moderation rights.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Tesla DeLorean
Guru
March 10, 2021

In Keil make sure you have an adequate Heap defined in startup.s, and that is placed in the largest available RAM arena.

Have code sanity check pointers, and malloc() for NULL pointer returns when it runs out of resources.

Make sure to free() resources when done with them.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Louis__0
Louis__0Author
Associate II
March 11, 2021

It doesn't seem to be the stack or RAM issue.I just found a way to solve this problem.

But why this should be done is unclear.

https://community.st.com/s/question/0D53W00000W92L3SAJ/firmware-crashes-with-dynamicbitmap-while-immigrating-from-touchgfx-4100-to-touchgfx-4150?t=1615438083524