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


importing a CubeMX project

Hello,

I tried something different, struggling for two weeks to try and get a shell to compile...
I got blinky and Hello world to compile elsewhere, but I want a real shell with all the
peripherals I am going to use, plus USB CDC (the most difficult thing for me to write
myself).

Anyway, it did pretty well, but I get these three related errors in main.c:

Symbol ‘DMA1_Channel1_IRQn’ could not be resolved main.c
Symbol ‘DMA1_Channel1_IRQn’ could not be resolved main.c
Symbol ‘SysTick_IRQn’ could not be resolved main.c

void MX_DMA_Init(void)
{
/* DMA controller clock enable */
__HAL_RCC_DMA1_CLK_ENABLE();

/* DMA interrupt init */
/* DMA1_Channel1_IRQn interrupt configuration */
HAL_NVIC_SetPriority(DMA1_Channel1_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(DMA1_Channel1_IRQn);
}

...
HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK);

/* SysTick_IRQn interrupt configuration */
HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0);
}

Question is: was I supposed to place interrupt vectors in main.c myself???

TIA

Glenb

Hi

If you are struggeling for two weeks you should find some time to describe more exactly what your problem is.

With new CubeMX 4.14 the default for creating a SW4STM32 type project is “Generate under root”. Project-> Settings... -> tab “Project” (check box)
Then under tab “Code generation” “Copy all used libraries into the project folder” is greyed out, the second option is checked instead.

By my experience this kind of export leads to errors you have found. At least this is the case if not a board but just a MCU is configured by CubeMX.

Try the “classic” way and uncheck “Generate under root”

Maybe the professional users can give a better answer?

Dieter

Dieter,

Thanks for your input! Being new to Eclipse, and STM32 this is all new, and I have no way of
knowing the Classic way...I do not know any way at all.

There a number of folks here who have the SAME issue. The _IRQn cannot be resolved.

I really do not know how to solve this myself, but I am trying...

It would be great if, after I followed the OpenSTM32 ‘way’ of importing the CubeMX project exactly,
that it should work...else CHANGE the link information so that it will work.

I have 5,000 lines of C code working in a PIC18F that I am ready to put into a 32F072 as soon as I
can get a compile going.

Take care and thanks for the input...

Glenb


France

Hi GlenB,

The errors you mention
Symbol 'DMA1_Channel1_IRQn' could not be resolved main.c
Symbol 'DMA1_Channel1_IRQn' could not be resolved main.c
Symbol 'SysTick_IRQn' could not be resolved main.c
are usually errors in symbol indexing caused by Eclipse. The compilation should work correctly if you build your project.


These errors are caused by the initial indexing of your project which is not finishing correctly as Eclipse tend to do that concurrently with project creation... To solve that you should right-click on your project then select Index >> Rebuild then, if the errors do not disapear, just select them in the Problems view and delete them.

Hope this helps,

Bernard (Ac6)

Hi Bernard,

I gave the “Generate Under Root” option in CubeMX another try.

The semantic error “Symbol SysTick_IRQn could not be resolved” persist.
The project never the less compiles fine.
Reindexing and deleting the error does not help.

I have found a clean solution:

Rigth click project name -> Properties -> C/C++ General (Tree) -> Indexer -> click on link “Configure Workspace Settings” (new window) -> uncheck “index unused headers” -> apply/ok

So I’m reconciled now with “Generate Under Root” in CubeMX.

Except that any time the project becomes regenerated by CubeMX I need to copy
/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc/usbd_cdc.h
to
/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc/USBD_CDC.h

Because of the line:

#include "USBD_CDC.h"

in /Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc/usbd_cdc.h
and the same in file
/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc/usbd_cdc..c

Dieter


 

Newest Forum Posts

  1. reservation car service Seattle by Jamesprede, 2025-05-01 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