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


how to add stdint.h?

Greetings to all

Im kind of new, finally this week i had some time to test this ide, i already had an project working, so i try to port it to openstm32 (it´s just a blinky project) but my question is how to include the stdint.h file on the main.c.
On the attached file you can see how i use uint32_t on the main.c file, but i can’t use it on the stm32f4xx_it.c, i got this error:

Description Resource Path Location Type
Type ‘uint32_t’ could not be resolved stm32f4xx_it.c /Test/src line 126 Semantic Error

as a workarround i declare it as unsigned long and i got it working.

So, how can i add the path where stdint.h is to the project properties to use it on all my next projects? in my case is:

C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.externaltools.arm-none.win32_1.1.0.201503101257\tools\compiler\arm-none-eabi\include

France

Hi,

You just have to add ‘#include ’ at the top of the stm32f4xx_it.c file...

The only thing is that you must save the file before adding references to uint32_t in the file, or you will get this error as System Workbench will only re-index the file when saved (to save computing power); the error will disapear when saving the file. Note that this error is not a compiler error, but an error reported by System Workbench for STM32 “code-assist” feature.

As a rule of thumb it’s thus always better to save after a modification in the include directives, otherwise System Workbench will not be able to “see” the content of the added files.

Note that on System Workbench, you can save your files as often as you want: you will always be able to roll-back modifications using the “Local history” feature: by “file >> Compare With >> Local history...” you can see all intermediate versions of your file and see what changed from this version, rollback incorrect changes, etc...

If this behavior is disturbing you too much, and you have a powerful enough CPU, you can click the “Index source and header files opened in editor” check-box in “Window >> Preferences >> C/C++ >> Indexer”; Instead of changing this globally you can also change it for a single project in “project >> Properties >> C/C++ General >> Indexer” (after clicking “Enable project specific settings” of course).

Bernard

Bernard thanks for the reply, it´s was a newbie mistake , adding solve it.

Thanks again

Carlos


 

Newest Forum Posts

  1. reservation car service Seattle by Jamesprede, 10:06
  2. Last day: drone bonus by Danielrug, 2025-04-19 16:55
  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. Insightful Perspectives on This Subject by davidsycle, 2025-03-04 05:45
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  10. Build a project in "release" mode by tang, 2025-02-20 10:36

Last-Modified Blogs