Skip to main content
dscdsc
Associate III
April 8, 2021
Solved

STM32CubeIDE compiler multiplication bug

  • April 8, 2021
  • 1 reply
  • 1332 views

Using:

  • Latest STM32CubeIDE
  • Nucleo-64 G071 (Cortex-M0+)
  • GNU Tools for STM32 (9-2020-q2-update) (default)

There seems to be a problem multiplying long numbers. Here's what a multiplication of two 32 bit ints looks like.

0693W000008z2cpQAA.pngAnd this is what a multiplication of a 64 bit with a 32 bit int looks like. It works, but in addition to writing the result it also writes a bunch of junk in the memory addresses preceding the variables.

0693W000008z2cuQAA.png 

`bl   0x80004e8 <__muldi3>` seems to be the culprit here.

This topic has been closed for replies.
Best answer by waclawek.jan

It's normal. What you see changing is the stack.

JW

1 reply

waclawek.jan
waclawek.janBest answer
Super User
April 8, 2021

It's normal. What you see changing is the stack.

JW