2019-07-24 12:26 AM
i have generated code from motor control workbench and when i build this code the error came as,
region `FLASH' overflowed by 18000 bytes StSpin_Hall_24_07 C/C++ Problem
StSpin_Hall_24_07.elf section `.text' will not fit in region `FLASH' StSpin_Hall_24_07 C/C++ Problem
i tried for optimised the code code then the there is no error but motor is not working well........
please help...
2019-07-24 01:15 AM
> region `FLASH' overflowed by 18000 bytes StSpin_Hall_24_07 C/C++ Problem
> StSpin_Hall_24_07.elf section `.text' will not fit in region `FLASH' StSpin_Hall_24_07 C/C++ Problem
This one is obvious, I think.
> i tried for optimised the code code then the there is no error but motor is not working well........
This usually means your code is semantically not really correct.
Modern compilers are quite good, but still cannot sense your intentions.
If the find no further references to variables, they tend to optimize them rigorously out.
Put a "volatile" qualifier before every variable that is touched in different modules, and especially every variable touched in interrupt context.
For reference, check the stm32xxx device header. It declares structs/variables superimposed on the peripheral registers. All of them are declared "volatile".
2019-07-24 03:37 AM
i have successfully compiled this code with size optimization but the motor didnt work, how i can know whether it is the problem with optimization or other.....?
2021-06-22 01:22 AM
The question has been moved from the section "Motor Control Hardware" to the "STM32 Motor Control" section (the question is about the STM32 MC SDK).
Best regards