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

Hello Bernard,

Sounds great. Thanks for clarifying.

The first for is not ignored by the compiler.

I have attached the SW4STM32 project and two video clips showing evidence of this and for you to reproduce the phenomenon at your location.

Before calling your help I also tried rectifying the situation using different variables for each for-loop which didn’t help. I am not sure why the compiler would deem a variable fixed, that’s awkward, especially when used in a variable changing function such as a ‘for’. Under any other circumstances this has never caused me issues. Probably Arduino IDE is to blame for this :-) ... and our good old Microsoft Basic.

I believe there must be a compiler setting in Eclipse for such awkward compiling events to be prevented from happening. If a variable is clarified and a for-loop uses it it is obvious not to be a fixed number just to be stored somewhere. So I think the Eclipse/Plugin compiler optimizations here are rather pedantic and not offering any smooth learning curve for the autodidact. I like to call them quircks that cause forums and helpdesks to clog up.

Greets,
Ben

PS: In the attached video you see the SMD green led (PC13 3.3v to GPIOC_13) and 2 conventional green leds (PC14 and PC15 GND to GPIOC_14 and GND to GPIOC_15) hence the SMD led’s inversal.

 

Newest Forum Posts

  1. Analog servomotors with nucleo f334r8 by SkelePaw, 2025-11-01 05:57
  2. So happy to finally meet you! by Danielrug, 2025-10-28 11:01
  3. STM32 MCU model shortlisting for Making RC remote by Palvish, 2025-07-07 15:05
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  6. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  7. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  8. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05

Last-Modified Blogs