Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


assembly interrupt is ineffective; Default_Handler acts instead

Hello and thank you for the reply.
My problem is solved.

I read your response.
So it must be a linker thing, apparently.
Like, the linker does only see this weak definition in startup_stm32l053xx.s:
.weak TIM6_DAC_IRQHandler
.thumb_set TIM6_DAC_IRQHandler,Default_Handler
But does not see my definition in klavirko_asm.s.

Your suggestion was to remove the weak definition.
But I thought that this can not be the solution.
This way the weak definition will no longer be seen,
but my intended definition will most likely not “appear” because of it.
and this should result in a failure to assemble because it would be putting an unknown symbol into the interrupt vector.

So I focused on the topic of why would it not be seen.
I thought,
In klavirko_asm.s I tell that this is a global symbol,
.global TIM6_DAC_IRQHandler
but maybe in startup_stm32l053xx.s, where the interrupt vector is defined this information is not known.
I thought that I should add there the information that there is this global symbol elsewhere.
But before I could try it, I have done somehing else which turned out to be the solution.

I added these statements (copied from startup_stm32l053xx.s) so that the assembler would be at the same correct state when reaching my statements:
.syntax unified
.cpu cortex-m0plus
.fpu softvfp
.thumb
(also added size information while doing it.)
So my file klavirko_asm.s now looks like this:

.syntax unified
.cpu cortex-m0plus
.fpu softvfp
.thumb

.global TIM6_DAC_IRQHandler
.section .text.TIM6_DAC_IRQHandler,"ax",%progbits
.type TIM6_DAC_IRQHandler, %function
TIM6_DAC_IRQHandler:
bx lr

.size TIM6_DAC_IRQHandler, .-TIM6_DAC_IRQHandler

Now everything works.
The processor corrwectly enters and leaves the interrupt now.
Now I can focus on the actual work to write the interrupt function.

success

 

Newest Forum Posts

  1. Монтаж камина с грилем в Москве - установка и барбекю by KpddomErorb, 2025-05-10 18:28
  2. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  9. Build a project in "release" mode by tang, 2025-02-20 10:36
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35

Last-Modified Blogs