element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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 6924 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
Comment
  • 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
Children
  • 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 found what's wrong, by stepping through a CubeIDE generated project and a TouchGFX generated project.

     

    The following virtual function is not available in the CubeIDE generated TouchGFX/target/TouchGFXHAL.*pp files - and it's the one that enables the screen:

    in .hpp:

     

    public:
    ...
    virtual void taskEntry();

     

    in .cpp:

     

    /* USER CODE BEGIN TouchGFXHAL.cpp */
    
    #include <touchgfx/hal/OSWrappers.hpp>
    
    ...
    
    void TouchGFXHAL::taskEntry()
    {
        enableLCDControllerInterrupt();
        enableInterrupts();
    
        OSWrappers::waitForVSync();
        backPorchExited();
    
        // Turning on display after first frame is rendered
        HAL_GPIO_WritePin(GPIOK, GPIO_PIN_7, GPIO_PIN_RESET);
        /* Assert display enable LCD_DISP_CTRL pin */
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_2, GPIO_PIN_SET);
        /* Assert back light LCD_BL_CTRL pin */
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_1, GPIO_PIN_SET);
    
        for (;;)
        {
            OSWrappers::waitForVSync();
            backPorchExited();
        }
    }

     

    tadaaa:

    image

     

     

    ... no touch screen though ...

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

    Jan Cumps image

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

    Nice!

     

    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?

     

    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.

     

    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.

    • Cancel
    • Vote Up +3 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
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