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


You are viewing a reply to Brilliant For-loop Bug  

Brilliant For-loop Bug

France

Hi Ben,

This is exactly what I’ve said in my first answer; the compiler will always try to optimize out all code that has no visible effect; adding some delays is not considered a visible effect as the compiler has no idea about the time taken by any operation, so reducing this time is considered a good optimization (that is the real objective of optimization, isn’t it?).

I have however to investigate why, when i is declared as volatile, the last loop is ignored, as the purpose of volatile is to force the compiler to do all actions requested on the variable, as it may have some side effect...

Bernard (Ac6)