Error: failed to download Segment[1] when programming with USB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-22 3:05 AM
I have written a program in the STM32CubeIDE V1.16, creating a .elf file for the STM32H723.
I then followed the Phils Lab tutorial https://www.youtube.com/watch?v=VlCYI2U-qyM to program the Nucleo development board using USB using STM32CubeProgrammer V2.17.
When I pull the boot pin high and press reset, it goes into boot mode, and the programmer detects it.
However, when I download the elf file, I get these errors:
Error: failed to download Segment[1]
Error: failed to download the File
It used to be segment [2] that failed, but I updated CubeIDE and and .IOC file and it changed to segemet[1].
I updated all my versions and followed solutions in other similar questions, though these are segment[0] errors
https://community.st.com/t5/stm32cubeide-mcus/stm32cubeide-upgrade/td-p/628738
Some solutions say to change a setting in the CubeProgrammer, but there's no obvious settings option I can change.
The code uploads into the MCU when the LED turns on, which indicates it does work. However, I want to clarify this error so that there isn't an issue in the future.
Thanks in advance for any help
- Labels:
-
Bug-report
-
STM32CubeProgrammer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-26 3:39 AM
Hello @KSOdin2,
I couldn't reproduce the issue on my end, could you share your .elf file for further investigation?
Thanks,
Amine.
In order 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
‎2024-08-27 1:36 AM
After reading your comment, I just realised that I was trying to upload the .elf of the 64-pin H723 chip to the Nucleo board, which has 144 pins. I've tried a code generated with a .ioc file for the 144-pin version, and it now downloads, though it has no proper functionality apart from writing to Flash.
I tried to upload with the same method to an STM32H7A3 nucleo board with some code designed for that board. And it has the error for segment [2]
I've attached the .elf file as a .7z file to see if you have the same issue. I have changed some of the memory protection in the .ioc. I don't know if that changes it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-05 9:06 AM
Hello @KSOdin2,
In order to test it on a Nucleo-H7A3 you can use an example for that board from the STM32CubeH7 Firmware Package, and since you already used STM32CubeMx with that board you will find it under: C:\users\yourname\STM32Cube\repository\STM32Cube_FW_H7_V1.11.1\Projects\NUCLEO-H7A\Examples\....
In order 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
‎2024-09-05 9:42 AM
Your linker script (.LD) is wrong, you're trying to write content to RAM (0x24000000 and 0x30000000) directly.
The initial RAM content needs to be parked/stashed in FLASH and copied out via code in startup.s
Up vote any posts that you find helpful, it shows what's working..
