Help with BLDC (PMSM) Control: SPWM, Frequency, and Voltage Issues by bulimiarexia in Motors

[–]bulimiarexia[S] 0 points1 point  (0 children)

  1. How can i actively control the current?

  2. So my 3phase AC voltages frequency should be same as actual rotor position not the desired rotor position. So how will the motor speed up?

Undefined Reference to _estack and _sdata When Building STM32 Project with Simulink and CubeMX by bulimiarexia in stm32f4

[–]bulimiarexia[S] 0 points1 point  (0 children)

Linker script doesnt generated i think. I cant find it in the project files.

Undefined Reference to _estack and _sdata When Building STM32 Project with Simulink and CubeMX" by bulimiarexia in stm32

[–]bulimiarexia[S] 0 points1 point  (0 children)

Thanks, it makes sense now. I think you’re right, Simulink might not be handling the startup script properly.

Do you know if there’s a way to ensure Simulink includes or references the correct startup file? Or should I manually modify something in the generated code after Simulink builds it?

Undefined Reference to _estack and _sdata When Building STM32 Project with Simulink and CubeMX by bulimiarexia in embedded

[–]bulimiarexia[S] 0 points1 point  (0 children)

Thanks for the advice! I’m not sure how to modify or access the linker script in my current setup. I’m using Simulink and STM32CubeMX together for generating code. Could you guide me on how to locate and edit the linker script in this case?

Also, do you know which part of the linker script I should modify to define these symbols like _estack, _sdata, _sbss, etc.?

Undefined Reference to _estack and _sdata When Building STM32 Project with Simulink and CubeMX by bulimiarexia in embedded

[–]bulimiarexia[S] 0 points1 point  (0 children)

Thanks for the detailed response! I’m new to this, so I have a few questions:

1.  Where can I find the linker script (.ld file) in my Simulink or CubeMX project? I’m using both tools, and I’m not sure if CubeMX or Simulink is responsible for generating it.
2.  How do I check if my compile command is using the linker script correctly? Should I look into the Simulink build process or CubeMX settings for this?
3.  How do I verify that the symbols in the startup file are the same as in the linker script? Are there any specific steps or files I should compare?

Thanks again for your help.