# Stm32 freertos start different address

**URL:** <https://forums.freertos.org/t/stm32-freertos-start-different-address/19726>\
**Category:** Kernel\
**Created:** [April 5, 2024, 3:15pm UTC](https://forums.freertos.org/t/stm32-freertos-start-different-address/19726 "2024-04-05T15:15:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![peit](https://avatars.discourse-cdn.com/v4/letter/p/c67d28/32.png) [@peit](https://forums.freertos.org/u/peit)\
**Post date:** [April 5, 2024, 3:15pm UTC](https://forums.freertos.org/t/stm32-freertos-start-different-address/19726/1 "2024-04-05T15:15:53Z")

</div>

Hello!  
I have a bootloader based on openblt on STM32F0  
In this series (M0) there is no way to transfer the vector table, so the solution is to copy the vector table to RAM.

When I use the program without FreeRTOS everything works fine, as soon as I turn on RTOS the program stops working…

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [April 5, 2024, 3:50pm UTC](https://forums.freertos.org/t/stm32-freertos-start-different-address/19726/2 "2024-04-05T15:50:44Z")

</div>

Do you have interrupts executing in the case without FreeRTOS that works? If so, that would at least show moving of the vector table to RAM, and presumably updating the vector table base register, have worked.

---

<div class="post-metadata">

**Author:** ![peit](https://avatars.discourse-cdn.com/v4/letter/p/c67d28/32.png) [@peit](https://forums.freertos.org/u/peit)\
**Post date:** [April 5, 2024, 3:58pm UTC](https://forums.freertos.org/t/stm32-freertos-start-different-address/19726/3 "2024-04-05T15:58:57Z")

</div>

Of course, I had a ready-made working project that fully worked and the interrupts worked, now I decided to transfer the project to an RTOS, but something went wrong…  
I created a new project, which, using a timer and it just, blinked the LED (for demonstration) as soon as I launch the RTOS, nothing works…

---

<div class="post-metadata">

**Author:** ![skptak](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/skptak/32/3981_2.png) [@skptak](https://forums.freertos.org/u/skptak)\
**Post date:** [April 6, 2024, 1:56am UTC](https://forums.freertos.org/t/stm32-freertos-start-different-address/19726/4 "2024-04-06T01:56:23Z")

</div>

Hey @peit, are you able to run the code in a debugger? Do you have any idea where your code gets stuck when it stops working?

---

<div class="post-metadata">

**Author:** ![peit](https://avatars.discourse-cdn.com/v4/letter/p/c67d28/32.png) [@peit](https://forums.freertos.org/u/peit)\
**Post date:** [April 6, 2024, 3:34pm UTC](https://forums.freertos.org/t/stm32-freertos-start-different-address/19726/5 "2024-04-06T15:34:16Z")

</div>

I think I found the problem  
In my bootloader, before copying the vector table and making another configuration, I turned off interrupts, and before jumping to another ap, I turned on interrupts, without RTOS it worked, with RTOS it dоn’t work, but if i don’t turning on interrupts on side of bootloader, it everything worked…  
I haven’t figured out why this is yet…

---

<div class="post-metadata">

**Author:** ![hs2](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@hs2](https://forums.freertos.org/u/hs2)\
**Post date:** [April 6, 2024, 4:51pm UTC](https://forums.freertos.org/t/stm32-freertos-start-different-address/19726/6 "2024-04-06T16:51:12Z")

</div>

So you relocated the vector table matching the application with its ISRs you’re going to start/jump to but you enabled interrupt _before_ the application is initialized (the C-runtime init before `main`) and running ? This can’t work properly.
