HardFault when initializing TouchGFX with proprietary RTOS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-25 11:28 PM - last edited on ‎2024-03-05 6:11 AM by GaetanGodart
I am trying to port a Project using TouchGFX (Designer 4.17) and FreeRTOS to our own RTOS using IAR 8.40 Toolchain and th STM32F769I-Disco Board (Same controller will be used in the final product).
When calling MX_TouchGFX_Init() the System runs into an a HardFault
The HardFault occurs in the Library code (touchgfx::Screen::draw accroding to disassemly PC: 0x3ade9e, calles from touchgfx::Application)
_ZN8touchgfx6Screen4drawEv:
0x3a'de7e: 0xb53e PUSH {R1-R5, LR}
0x3a'de80: 0x2200 MOVS R2, #0
0x3a'de82: 0xf8df 0x4264 LDR.W R4, [PC, #0x264] ; _ZN8touchgfx3HAL13DISPLAY_WIDTHE
touchgfx::HAL::DISPLAY_WIDTH
0x3a'de86: 0x9200 STR R2, [SP]
0x3a'de88: 0xf8df 0x3258 LDR.W R3, [PC, #0x258] ; _ZN8touchgfx3HAL14DISPLAY_HEIGHTE
touchgfx::HAL::DISPLAY_HEIGHT
0x3a'de8c: 0x5ea2 LDRSH R2, [R4, R2]
0x3a'de8e: 0xf9b3 0x5000 LDRSH.W R5, [R3]
0x3a'de92: 0xf8ad 0x2004 STRH.W R2, [SP, #0x4]
0x3a'de96: 0x4669 MOV R1, SP
0x3a'de98: 0xf8ad 0x5006 STRH.W R5, [SP, #0x6]
0x3a'de9c: 0x6802 LDR R2, [R0]
0x3a'de9e: 0x6893 LDR R3, [R2, #0x8]
0x3a'dea0: 0x4798 BLX R3
0x3a'dea2: 0xb003 ADD SP, SP, #0xc
0x3a'dea4: 0xbd30 POP {R4, R5, PC}
As far as I see this i do not have much options to break the
Solved! Go to Solution.
- Labels:
-
DEBUG
-
STM32F7 Series
-
TouchGFX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-03 3:48 AM
Hi,
CRC is necessary to work with TouchGFX Designer and other ST packs. You get a warning message in the X-CUBE-TOUCHGFX.4.18.0 settings within STM32CubeMX when it is not enabled.
/Romain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-26 3:42 AM
Is your screen empty ? Try start with one screen one box empty project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-26 10:54 PM
I do have a version with empty screen. Unfortunately the HardFault does occur also with the empty app
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-27 12:34 AM
What version of TouchGFX are you using ? Could you share your FreeRTOS tasks just to check ? May be completely unrelated but i just want to see if you have named it properly and if the stack size is big enough.
/Romain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-27 3:28 AM
Add something to screen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-29 12:43 PM
I have added a green screen. Still the same hardFault
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-29 12:47 PM
I am using version 4.17 of the designer. Is this automatically the version of the lib? or where do I find it?
I do not use FreeRTOS. When I do, the application runs fine.
I have now doubled both stack an heap size (since TouchGFX und Control application on there own are happy with the initial 0x2000), no change
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-02 11:30 PM
Meanwhile. I have found the error. I have not initialized the CRC module but it is used within the library. Maybe it would be worth it to point out that this module is used in a future version of the lib? Thank you for your support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-03 3:48 AM
Hi,
CRC is necessary to work with TouchGFX Designer and other ST packs. You get a warning message in the X-CUBE-TOUCHGFX.4.18.0 settings within STM32CubeMX when it is not enabled.
/Romain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-01 8:56 AM
You get a warning when it's not enabled, but not a warning when "Do Not Generate Function Call" is checked. And I assume also no error if it is initialized after TouchGFX. In our code we had hardfaults and got no warnings because of this. Thank you MMenz.1 for giving your solution!
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.
