element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Blog STM32H7B3I - First Experience with CubeIDE
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 2 Aug 2020 11:59 AM Date Created
  • Views 6554 views
  • Likes 5 likes
  • Comments 22 comments
  • stm32h7b3i
  • rt
  • stm32h7b3i-dk
Related
Recommended

STM32H7B3I - First Experience with CubeIDE

Jan Cumps
Jan Cumps
2 Aug 2020

I'm selected for the STM32H7B3I-DK -  DISCOVERY KIT.

I have just set up a clean CubeIDE install, and also installed the resource packages for this kit.

Additional I installed TouchGFX and the standalone Cube Programmer.

Versions:

  • STM32CubeIDE Version: 1.4.1
  • GNU for STM32, 7-2018 -q2 update
  • TouchGFX Designer 4.14.0
  • STMCubeProgrammer  2.5.0

 

The kit has arrived, and the first results have been mostly successful, except for graphic projects using TouchGFX.

 

image

 

What works for me:
image A graphical STemWin project. I imported the example in CubeIDE, built it, loaded via STLink and debugged it.

image Out of Box binary downloaded from product page and then upload it via STLink using the STMCube Programmer.

 

image

 

 

image what I can't get to work yet: Compile a ToughGFX (example import or a self-made project) and load it on the board from CubeIDE.

The compilation / build succeeds. The STLink debug session starts but then the firmware load fails.

 

Error in final launch sequence:

Failed to execute MI command:
load D:\\users\\jancu\\STM32CubeIDE\\workspace_1.4.0\\TouchGFX\\STM32CubeIDE\\TouchGFX-STM32H7B3I-DK_OoB-Release\\TouchGFX.elf 

Error message from debugger back end:
Load failed
Failed to execute MI command:
load D:\\users\\jancu\\STM32CubeIDE\\workspace_1.4.0\\TouchGFX\\STM32CubeIDE\\TouchGFX-STM32H7B3I-DK_OoB-Release\\TouchGFX.elf 

Error message from debugger back end:
Load failed
Failed to execute MI command:
load D:\\users\\jancu\\STM32CubeIDE\\workspace_1.4.0\\TouchGFX\\STM32CubeIDE\\TouchGFX-STM32H7B3I-DK_OoB-Release\\TouchGFX.elf 

Error message from debugger back end:
Load failed
Load failed

 

Some investigation to do ...

(solved, see comment below)

 

Related Posts
First Experience with CubeIDE
Create a TouchGFX Project with support for the Designer, CubeIDE and Debugger - Pt 1: Screen Works
Create a TouchGFX Project with support for the Designer, CubeIDE and Debugger - Pt 2: Touch Works
TouchGFX Simple Example: react on a button click
USB, freeRTOS ,Task Notifications and Interrupts
the Development Kit STMod+ Connector and Using UART2
TouchGFX Application Framework: Model, View, Presentation, Message Queue
TouchGFX Application Framework: A Mock GUI - Show Statuses, Switch Screens
TouchGFX Application Framework: MVP and the ModelListener
Write a CubeIDE MX application: Hardware Cryptography with DMA
Attachments:
STM32H7B3I-DK-TGFX-eload.zip
  • Sign in to reply

Top Comments

  • Jan Cumps
    Jan Cumps over 5 years ago in reply to Jan Cumps +3
    I have it working on the CubeIDE too now. I reused a .ioc file from a TouchGFX generated project for this board, and created a new CubeIDE project based on that. Then used the generated hyperlink to load…
  • Jan Cumps
    Jan Cumps over 5 years ago +3
    Yes, got the CubeIDE and debugger integration working with the screen! www.youtube.com/watch
  • jomoenginer
    jomoenginer over 5 years ago +3
    There must be a config file somewhere in TouchGFX to allow for setting the path to STM32CubeProgrammer and such. One option would be to set it in the gcc/Makefile for the project: stm32cubeProgrammer …
Parents
  • jomoenginer
    jomoenginer over 5 years ago

    There must be a config file somewhere in TouchGFX to allow for setting the path to STM32CubeProgrammer and such.

     

    One option would be to set it in the gcc/Makefile for the project:

     

    stm32cubeProgrammer := STMicroelectronics\\STM32Cube\\STM32CubeProgrammer\\bin\\STM32_Programmer_CLI.exe
    stm32cubeLoader := STMicroelectronics\\STM32Cube\\STM32CubeProgrammer\\bin\\ExternalLoader\\MX25L512G_STM32F769I-DISCO.stldr
    
    ifneq ("$(shell find "$(PROGRAMFILES)\\$(stm32cubeProgrammer)" 2> nul )","")
    # STM32CubeProgrammer is placed in Program Files (x86)
    st_stm32cube_programmer := "$(PROGRAMFILES)\\$(stm32cubeProgrammer)"
    st_stm32cube_external_loader := "$(PROGRAMFILES)\\$(stm32cubeLoader)"
    else
    # STM32CubeProgrammer is placed in Program Files
    st_stm32cube_programmer := "$(PROGRAMW6432)\\$(stm32cubeProgrammer)"
    st_stm32cube_external_loader := "$(PROGRAMW6432)\\$(stm32cubeLoader)"
    endi

     

    TouchGFX 4.14.0 just recently came out so perhaps there are some issues with it.  I did not seem to have these issues with 4.13.0 though.

     

    Nice work getting past this though.

     

    The installation page for TouchGFX does have messages concerning the location of the STM32CubeProgrammer. This still should be something that can be set tough.

    https://support.touchgfx.com/docs/introduction/installation/

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 5 years ago in reply to jomoenginer

    I haven't been able to get something on a screen with a fresh project started from CubeIDE yet.

    RTOS runs, but my screen isn't shown - investigating.

     

    What I did get to work, is have the CubeIDE load the TouchGFX example that you can import, and TGFX-generated examples,

    by changing Debug settings, and selecting external loader MX25LM51245G_STM32H7B3I_DISCO, 0x90000000, NOR_FLASH, MX25LM51245G_STM32H7B3I-DISCO.stldr.

    Using the default STM32 Cortex debug settings (that work with a CubeIDE generated project) fails during load.

    But using the external script works.

     

    Action photo below: debugger breaking on clicking the light control ON in the bathroom.

    image

     

     

     

    I still want to fiddle out how to get a CubeIDE generated project working with TGX-Designer. Because I want to use the configurator to manage other hardware.

    That's not working with TGX-Designer and the imported project.

    I think it's a silly thing, but yet to find out ...

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 5 years ago in reply to Jan Cumps

    I got the touch screen working too now.

    This is a little complex. I'll write a separate blog about it.

    For the interested and fellow road testers, I attached a project zip to the main article above.

    It works with TouchGFX Designer, CubeIDE,the MX Configurator.and the debugger.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 5 years ago in reply to jomoenginer

    jomoenginer  wrote:

     

    Nice!

     

    1 Out of curiosity, when you are creating a new project in CubeIDE, are you creating it as a STM32 Project or just a plain C/C++ Project?

     

    2 Also, with TouchGFX, You should be able to create a project from TouchGFX for the board you are designing for, Generate Code from the Interface, and then click "Browse Code" at the bottom right of the screen to get to the generated code.  This takes you to the TouchGFX folder, but if you go up one, there should be a STM32CubeIDE folder with a .cproject file that you can just click on to open the project in CubeIDE.  That seemed to work for me with other boards, although I have not done this with the STM32H7B3i.

     

    3 One issue I did run into with CubeIDE was that after upgrading to 1.3.0 it would no longer create projects using STM32 Project.  I had intially installed CubeIDE in a non default location under a 'H:' drive, so I ended up removing it and then reinstalling CubeIDE and just let it install it in the default location.  This seemed to solve the issue.  It's a bit quirky like that.

    1: I create an STM Project, then select C++. For the TouchGFX ones, I prefer to create one from a .ioc file generated by TouchGFX Designer. Because that has all LCD settings right. (but uses an older firmware version of STM35H7xxxx).

     

    2: yes. But those projects don't work with CubeIDE's HAL configurator (the *.ioc file). And that's a bit of a bummah when you want to use HAL for not-yet-configured peripherals, such as an extra UART (that I need)

    And debug didn't work. But that's an easy fix (ok - I spent 2 days figuring it out, but now it's easy). Select a custom loader in the debug config, instead of the standard debugger you get when starting a first session as STM32 Core XXx type.

     

    3: I have the latest. 1.4.1, with the TouchGFX 4.14. It does not have that issue. It has others, but I found fixes for those. Took me 3 days of debugging though image.

    It's either me missing how to add/enable certain functionalities, or errors in the wizards.

    For the LCD, the CubeIDE wizard (GFX Generator 4.14) doesn't create particular virtual functions in a class that TouchGFX Designer 4.14 does create, and that the runtime needs.

    For the Touch screen, it involved adding HAL drivers by hand, configuring header files and implementing methods that TouchGFX Designer 4.14 implements, when it creates a program, but CubeIDE TouchGFX Generator 4.14 doesn't.

     

    Now that I know it, it should be repeatable. It was a lot of work and step-by-step debugging an RTOS program though. Deep deep into the HAL layer (michaelkellett will probably pop open a Champaign bottle when he reads this image ).

     

    From here on, things are going to be much easier, I expect.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jomoenginer
    jomoenginer over 5 years ago in reply to Jan Cumps

    Yeah, I tried to create a basic AnimatedImage Example for the STM32H73Bi from TouchGFX 4.13.0 and went through he same process I had done for other boards and it failed to load in the CubeIde.

     

    Failed to execute MI command:
     load C:\\TouchGFXProjects\\STM32H73Bi-Test1\\STM32CubeIDE\\Debug\\STM32H7B3I_DISCO.elf  
    
     Error message from debugger back end:
     Load failed
    Failed to execute MI command:
     load C:\\TouchGFXProjects\\STM32H73Bi-Test1\\STM32CubeIDE\\Debug\\STM32H7B3I_DISCO.elf  
    
     Error message from debugger back end:
     Load failed
    Failed to execute MI command:
     load C:\\TouchGFXProjects\\STM32H73Bi-Test1\\STM32CubeIDE\\Debug\\STM32H7B3I_DISCO.elf  
    
     Error message from debugger back end:
     Load failed
    Load

     

     

    I tried to use the STM32CubeProgrammer directly, and it failed as well.  Then I tried to load just one of the STM32H73Bi-DK-Demo examples and that failed as well.  I noticed in the CubeProgrammer that it listed an older FW rev as was updated from CubeIDE so I had it load that as well and reset the config.

     

    CudeIDE FW: V3JM2

    CubeProgrammer FW: V3J5M2 Debug+Mass storage+VCP

     

    After selecting to erase the full chip flash, I was able to load the example and the Out of Box example without issue. 

     

    There is something not right either with the CudeIDE or what is be created from TouchGFX for this board.

     

    One thing I did notice with the TouchGFX (4.13 and 4.14) code gen for this board, after opening the project in CudeIDE, there is a warning listed where it can not find the RTOS folder:

    Invalid project path: Include path not found (C:\TouchGFXProjects\STM32H7B3iTest2\Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS).

     

    Looking on my system, this folder does not exist but a V2 one does:

    C:\TouchGFXProjects\STM32H7B3iTest2\Middlewares\Third_Party\FreeRTOS\Source\CMSIS_RTOS_V2

     

    In the CudeIDE Path and Symbol settings, but folders are listed, so I deleted the missing one.

    Looking at some previous projects, for the STM32F769i I created, the code that was generated did not include a V2 folder. This looks like a bug in the TouchGFX code gen for the H73Bi board.  I'll have to post this at ST.

     

     

    Sorry, didn't mean to hijack your post.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 5 years ago in reply to jomoenginer

    jomoenginer  wrote:

    ...

    One thing I did notice with the TouchGFX (4.13 and 4.14) code gen for this board, after opening the project in CudeIDE, there is a warning listed where it can not find the RTOS folder:

    I have that warning too. The wizard creates an include in the project of a folder that does not exist.

    It can be removed via Project -> Properties -> C/C++ Build -> Settings ->  Tool Settings -> MCU G++ Compiler -> Include Paths. (or in the CudeIDE Path and Symbol settings, as you mention)

    Select "All Configurations" at the top of the dialog before doing that.

    It's a bit sloppy, but harmless.

     

    I'll have to post this at ST.

    I plan to post things I can't get resolved. All others, I am going to put in my road test report as experience.

    I always hope that the manufacturer follows along with road tests.

     

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jomoenginer
    jomoenginer over 5 years ago in reply to Jan Cumps

    Yeah, I was able to get a project from TouchGFX, built with STM32CubeIDE and loaded using CubeProgrammer without fiddling with anything; outside of down grading the FW to use the CubeProgrammer and doing a full chip erase. There was an error at load time but the code does run.

     

    I did post the error from the Debug with the CubeIDE and it appears that others are seeing this with other boards.

     

    I have found these vids to be helpful when working with TouchGFX and the CubeIDE.

     

    From CubeIDE to TouchGFX.

    https://www.youtube.com/watch?v=o42r4xXOnbo

     

    This one shows how to go from TouchGFX to STM32CubeIDE

    https://www.youtube.com/watch?v=eiPtQp4chG0


     

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • jomoenginer
    jomoenginer over 5 years ago in reply to Jan Cumps

    Yeah, I was able to get a project from TouchGFX, built with STM32CubeIDE and loaded using CubeProgrammer without fiddling with anything; outside of down grading the FW to use the CubeProgrammer and doing a full chip erase. There was an error at load time but the code does run.

     

    I did post the error from the Debug with the CubeIDE and it appears that others are seeing this with other boards.

     

    I have found these vids to be helpful when working with TouchGFX and the CubeIDE.

     

    From CubeIDE to TouchGFX.

    https://www.youtube.com/watch?v=o42r4xXOnbo

     

    This one shows how to go from TouchGFX to STM32CubeIDE

    https://www.youtube.com/watch?v=eiPtQp4chG0


     

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
  • Jan Cumps
    Jan Cumps over 5 years ago in reply to jomoenginer

    jomoenginer  wrote:

     

    ... I have found these vids to be helpful when working with TouchGFX and the CubeIDE.

     

    From CubeIDE to TouchGFX.

    https://www.youtube.com/watch?v=o42r4xXOnbo

     

    This one shows how to go from TouchGFX to STM32CubeIDE

    https://www.youtube.com/watch?v=eiPtQp4chG0


     

    Things are different enough in the new IDE and support packages that you don't get a working exercise with the latest toolset , when you follow the steps. But they did help me to understand certain mechanisms and locations to start looking.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 5 years ago in reply to Jan Cumps

    I've posted a step-by-step to show I got i working (lcd only - I still need to write the touch screen instructions):

    STM32H7B3I - Create a TouchGFX Project with support for the Designer, CubeIDE and Debugger - Pt 1: Screen Works

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube