2025-12-19 4:19 PM - last edited on 2025-12-20 1:45 AM by Andrew Neil
I’m attempting to learn BLE and IoT and have purchased the following boards to get started.
NUCLEO-F401RE MCU brd
X-NUCLEO-IDB05A2 BLE Expansion brd
Downloaded:
STM32CubeIDE Version: 2.0.0 Build: 26820_20251114_1348 (UTC)
STM32CubeMX Version: 6.16.1
x-cube-ble1 BLE Demo
The main program calls HAL-Init() which goes directly to the HardFault_Handler()
My preliminary conclusion is that Version 20.0.0 is not compatible with the demo program based on help I sought on ChatGPT. It recommends Version 1.19.0. Is this correct?
May need to back up and start from scratch and would appreciate a point in the right direction to avoid going down any unnecessary rabbit holes.
Thank you, BareMetaler
2025-12-19 7:26 PM
Hello @BareMetaler
I don’t think this issue is related to the IDE version. Are you using a personal project or one of the available examples?
Best Regards.
II
2025-12-19 11:23 PM
The HAL source code version is independent of the IDE version.
HAL_Init does only the most basic initialization and is not specific to a demo.
So your HW+SW setup may have some general issue.
I doubt that changing the IDE version may fix that, but you may try.
The IDE comes with a hard fault analyzer and you may dig into that
or start with a new empty project to verify your HW+SW setup.
hth
KnarfB
2025-12-19 11:49 PM
Oh, that's quite simple as soon as you realize that "to avoid going down any unnecessary rabbit holes" is the same as "to avoid ChatGPT".
Stay away from AI-generated stuff, use the official ST demo code. Also, the proper platform for modern BLE development is STM32WB series.
2025-12-20 1:32 AM
@BareMetaler wrote:HAL-Init() which goes directly to the HardFault_Handler()
What do you mean by that?
Have you stepped into HAL_Init() to see exactly where the Hard Fault happens, and what causes it?
Debugging Cortex-M (including STM32) Hard Faults.
2025-12-20 1:43 AM - edited 2025-12-20 1:44 AM
@BareMetaler wrote:ChatGPT. It recommends Version 1.19.0. Is this correct?
It is out of date - v2.0.0 was released on 18 November:
Note that the big difference between v2.0.0 and v1.x.x is that CubeMX is no longer integrated - it is now just a standalone tool:
STM32CubeIDE 2.0.0 workflow tutorial
So this means that a lot of tutorials & documentation (both ST's and 3rd parties) are now out-of-date.
In that respect, you might find it easier to use an earlier version of CubeIDE - such as v1.19.0
Note that you can have multiple versions of CubeIDE all installed at the same time and working independently - you just need to keep a separate workspace for each.
If you want to use AI, ST's own "Sidekick" might be a better bet:
STM32 Sidekick: the AI-powered tool that accelerates your design journey
2026-01-07 10:00 AM
I'm using the x-cube-ble1 demo program that I downloaded. To test the program, I installed the ST BLE Sensor app on my my iPhone, then subsequently loaded the nRF Connect app, but haven't tried that yet because of how the program is jumping straight to the HAL-Init() > HardFault_Handler().
2026-01-07 10:04 AM
So you're saying that my NUCLEO-F401RE won't work to do a simple BLE demo?
I am using the ST demo code that I downloaded from the STMicroelectronics site. Where else would I get it?
2026-01-07 10:07 AM
I downloaded the BLE demo as a way to verify my HW-SW setup. What you do recommend I do?
2026-01-07 10:10 AM
Let me start over here. I need to know if I can even get there from here, one or zero, yes or no. I just bought these items through Digikey, brand new out of the box.
NUCLEO-F401RE MCU brd
X-NUCLEO-IDB05A2 BLE Expansion brd
Downloaded:
STM32CubeIDE Version: 2.0.0 Build: 26820_20251114_1348 (UTC)
STM32CubeMX Version: 6.16.1
x-cube-ble1 BLE Demo