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


Where are the standard ints defined?

I am a newbie for this IDE and compiled my first flashing LED program. However I had to typedef the standard ints (uint16_t and uint32_t) before the includes “stm32l1xx.h” and “stm32l1xx_nucleo.h” that were in the templete .c before it would compile.

I tried adding “stdint.h” but that didnt work either. Where are these definitions and why arent they included to in the default .h’s

Thanks for any replies
Robert

Hi,

Maybe the project is not correctly created.

I check one of my project and the defines are in header stdint.h and the location of this file is added when the project is created (AC6 project).
By pressing F3 on uint32_t identifier, stdint.h file should open.

In the “Include” section of the project in Project Explorer window should be this path (and another 2 created by default):
C:/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.3.0.201507241045/tools/compiler/arm-none-eabi/include

Check to see if you have this includes. Attached is a picture. Observe the red highlighted items.

If you did not create your project using the steps described in below links, do it and post the results:

Creating a new project:
http://www.openstm32.org/Creating+a+new+project?structure=DocumentationQuestion

Importing a STCubeMX generated project:
http://www.openstm32.org/Importing+a+STCubeMX+generated+project?structure=DocumentationQuestion


Maybe the easy way is to start with a CubeMX generated project. CubeMx is a graphical configuration tool that will generate all initialization code for the microcontroller. It is using ST HAL library. And the best, you could graphically select GPIO, configure clock, set all peripherals, etc.
If you have a L1 Nucleo board start CubeMX then select your board. Clock and GPIOs are already configured for this board.
Choose one director to generate the project and then import the project in System Workbench. It is important to follow the second link exactly.

If you need more help I have made a lot of screen captures while I generate the project then import under System Workbench, then compile, download and debug. I think I can make a zip with the screen shots - but I don’t think I have the time to add the description for the process.

Hi

Thanks for the reply... I have found the IDE to be very inconsistant, some bits work other dont. Removing the declarations of uint32_t in the code below gives an unable to resolve but F3 on the declaration of u32_i shows it is declared in the sdtint.h file as you described.However system_stm32l1xx.c compiles and it also has varibles declared as std ints.

  1. include “stm32l1xx.h”
  2. include “stm32l1xx_nucleo.h”



int main(void)
{
uint32_t u32_i;

}

I have all the includes fro C:/Ac6... in the includes list.

I built the project using the described sequence, but if it has the correct includes it should compile and as it clearly knows where the include is I suspect there is a problem with the IDE.

I had also moved on to produce my unit test project where I include the files from the main project, now in that it seems to get very confused with some defines (enums) being resolved and others in the same enum not, and those it does resolve being old values.

I dont like using imported code from code engines as the code I write requires a strict safety standard so I would have to rewrite it to that standard anyway so I might as well code it and understand it myself.


I have given up on this IDE and moved to keil.

Robert


 

Newest Forum Posts

  1. Монтаж камина с грилем в Москве - установка и барбекю by KpddomErorb, 2025-05-10 18:28
  2. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  9. Build a project in "release" mode by tang, 2025-02-20 10:36
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35

Last-Modified Blogs