STM32U545 External Loader "Init Function Fail"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-06 11:25 PM
I have an External Loader Project made for STM32G0/G4/L4.
I ported it to STM32U5: all the functions work fine when debugged from STM32CubeIDE (so the connections are ok). With the STM32CubeProgrammer the .stldr file is recognized but the Read/Write/SectoreErase operations fails due to "Init Function fail".
Any suggestion will be appreciated!
- Labels:
-
SPI
-
STM32U5 series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-11-07 4:15 AM
Hello @GiBi_01 ,
Which CubeProgrammer version used ?
Make sure to use the latest STM32CubeProgrammer release v2.17.0.
If the problem persists, please attach your option bytes configuration.
Thanks
Imen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-05 2:16 PM
Hi, I have same problem, did you solved?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-05 7:25 PM
The Init() function returning zero is the failure condition.
Your log, and that of the OP, show it returning, not timing out.
You can confirm the PC entry point for Init using objcopy or objdump
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-06 1:03 AM
Hi all.
Upgrading the STM32CubeProgrammer to v2.17 we found that the issue was related to the size of the ExternalLoader.
We fixed it in this way:
- Discard unused functions flag enabled in STM32CubeIDE linker options.
- EXT_LOADER.ld file modified to keep only the needed functions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-06 4:17 AM
Can you show a template of this modified linker?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-06 5:20 AM
EXT_LOADER file attached as a .txt file, rename it as a .ld one.
The key point is the KEEP command.
Here the linker configuration:
#define VECT_TAB_OFFSET 0x00000200UL
