Can anyone help for my first C++ code build and execution on STM32MP1?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-04 04:30 AM
Hi, I need help to compile, build and upload a C++ code on an STM32MP157F-DK2 board. Can anyone help me? Thanks
Solved! Go to Solution.
- Labels:
-
STM32MP15 Lines
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-04 07:04 AM
Hello @FAuza.1 (Community Member)
I can suggest you to follow the STM32MPU wiki below:
Create a simple hello-world application - stm32mpu
The given example explains a cross compilation of a C code with GTK and its makefile using the stm32mp1-openstlinux Developer-Package.
Then it is transferred and executed on the STM32MP15x-DK2.
For a C++ code, the method is identical.
Thank in advance to select my post as best answer.
Best regards,
Romain,
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-04 07:04 AM
Hello @FAuza.1 (Community Member)
I can suggest you to follow the STM32MPU wiki below:
Create a simple hello-world application - stm32mpu
The given example explains a cross compilation of a C code with GTK and its makefile using the stm32mp1-openstlinux Developer-Package.
Then it is transferred and executed on the STM32MP15x-DK2.
For a C++ code, the method is identical.
Thank in advance to select my post as best answer.
Best regards,
Romain,
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-04 07:35 AM
Thank you Romain
I should have explained that I'm working on Windows 10, and I'd like to use the STM32CubeIDE tool. The example you suggest is on Linux, which I don't have.
What I need is a clear explanation on how to connect the board and to use the STM32CubeIDE software to run a simple code that prints Hello World in a console such as putty or MobaXterm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-04 07:47 AM
How to connect the board, follow Wiki Getting Started:
Developing with STM32CubeIDE on Cortex-M4 in the same wiki (next chapters) in a way very similar to an STM32 MCU:
Develop on Arm® Cortex®-M4 - stm32mpu
It should work under Windows, but using Linux will give you a better experience.
Best regards,
Romain,
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-04 07:51 AM
Thank you Romain
I have the supply and the ST link connections, do I need the USB OTG connection as well ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-04 08:01 AM
You must apply what is documented in Wiki Getting started for your board.
I'm sorry to insist but you should follow this tutorial to the end.
Best regards,
Romain,
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-05 05:52 AM
Hi Romain
I'm going through the tutorial, and I have a problem at the step "Modify, rebuild and reload a firmware". Everything has gone fine until that point. I have imported and built the firmware, but the CubeIDE does not detect my board.
What I do is:
- connect the board to the computer with the ST-link cable. I can see the ST Link virtual COM port in the device manager.
- power on the board. The red led between the user buttons is blinking. But the board is not detected, status remains "offline" in the IDE lower right corner.
Should I do something on the Boot switches? I tried bith ON and both OFF with no luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-05 06:40 AM
Hello FAuza.1 (Community Member)
It depend if you are trying to load firmware thru Linux (Production mode with Boot2=Boot0=1) or if you are thru JTAG/SWD (Engineering mode with Boot2=1; Boot0 = 0) ?
Here below videos that will help you, in particular part 03 How to debug M4 in engineering mode with STM32CubeIDE.
https://www.youtube.com/playlist?list=PLnMKNibPkDnFp5YvrvWjgfjrOs0Vi34Mt
Best regards
Romain
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-06 04:13 AM
Thanks. I managed to load a firmware.