2025-12-20 1:17 PM
I created project in stmcube32mx for h5 microcontroller and it works if I manually replace bl main to bl entry
in file startup_stm32h563zitx.s.
If this manual replacing is a bug or on purpose?
Jan
Solved! Go to Solution.
2025-12-27 12:58 PM
This seems to be a very rt-thread specific topic and you might find specific help in their forum.
hth
KnarfB
2025-12-21 11:55 AM
Never heard of such a purpose.
What does " it works" (or not) mean precisely? Linker errors?
What version of STM32CubeMX and H5 firmware are you using?
Middlewares?
Maybe you can post your .ioc file.
hth
KnarfB
2025-12-23 2:27 PM
Thank you for noticing my post.
After generating the project I noticed that in the file startup_stm32h563zitx.s (discovery board) still
there is bl main. I think it should be bl entry.
Program compiles in every situation but without changing to entry tasks don't run.
/* Call the application's entry point.*/
/* bl main */
bl entry
2025-12-24 8:08 AM
Could you please provide the version of CubeMX and CubeIDE you are using?
I generated the project using your .ioc file with CubeMX version 6.16 and STM32CubeIDE version 1.19. I also tested it with bl main, and the execution runs without any issues.
Could you please specify the exact problem you encountered?
BR
Lobna
2025-12-27 2:26 AM - last edited on 2025-12-31 6:42 AM by Andrew Neil
I created the simple task in main() :
/* USER CODE BEGIN 0 */
int counter;
struct rt_thread mythread1;
uint8_t mystack1[512];
static void thread_entry(void *parameter)
{
while (1)
{
// Kod wykonywany przez wątek
counter++;
rt_thread_mdelay(1000); // Opóźnienie 1s
}
}
/* USER CODE END 0 */
then I added :
/* USER CODE BEGIN 0 */
int counter;
struct rt_thread mythread1;
uint8_t mystack1[512];
static void thread_entry(void *parameter)
{
while (1)
{
// Kod wykonywany przez wątek
counter++;
rt_thread_mdelay(1000); // Opóźnienie 1s
}
}
/* USER CODE END 0 */
when in the file startup_stm32h563zitx.s there is :
bl main
the program goes into HardFault at rt_thread_startup(&mythread1);.
When in startup_stm32h563zitx.s there is
bl entrymythread1 works counter counts.
Jan
Edited to apply source code formatting - please see How to insert source code for future reference.
2025-12-27 2:31 AM
Aha, I use stm32cubeide 2.0 and stm32cubemx 6.16.0
Jan
2025-12-27 9:58 AM
I founded the example project from Embetronicx on GitHub
RT-Thread-RTOS/STM32F411/HelloWorld at master · Embetronicx/RT-Thread-RTOS · GitHub
and there also in the startup file there is
/* Call the application's entry point.*/
bl entry
Jan
2025-12-27 12:58 PM
This seems to be a very rt-thread specific topic and you might find specific help in their forum.
hth
KnarfB
2025-12-28 12:08 PM
Ok, it works for me now but I would expect that ST did something that it worked without manual adjusting
or clearly wrote what to do.
Jan
2025-12-29 2:44 AM
I will escalate this issue internally to enhance the ST documentation. Meanwhile, you may implement the recommended solution in the file Middlewares\Third_Party\RealThread_RTOS_RT-Thread\src\components.c when using the GCC compiler.
Specifically, at line 159:
/* Add -eentry to the arm-none-eabi-gcc linker arguments */
BR
Lobna