Skip to main content
egoltzman
Senior
January 28, 2020
Question

Fail to build project under CubeIDE with DMA2D after generating with Cube

  • January 28, 2020
  • 8 replies
  • 1787 views

Hi,

I tried to add DMA2D to a successful generated and built L496 based CubeIDE\TouchGFX project .

I get compilation error regarding two elements in the DMA2D initialization function as below:

../Core/Src/main.c: In function 'MX_DMA2D_Init':
../Core/Src/main.c:286:14: error: 'DMA2D_InitTypeDef {aka struct <anonymous>}' has no member named 'BytesSwap'
 hdma2d.Init.BytesSwap = DMA2D_BYTES_REGULAR;
 ^
../Core/Src/main.c:286:27: error: 'DMA2D_BYTES_REGULAR' undeclared (first use in this function); did you mean 'DMA2D_RB_REGULAR'?
 hdma2d.Init.BytesSwap = DMA2D_BYTES_REGULAR;
 ^~~~~~~~~~~~~~~~~~~
 DMA2D_RB_REGULAR
../Core/Src/main.c:286:27: note: each undeclared identifier is reported only once for each function it appears in
../Core/Src/main.c:287:14: error: 'DMA2D_InitTypeDef {aka struct <anonymous>}' has no member named 'LineOffsetMode'
 hdma2d.Init.LineOffsetMode = DMA2D_LOM_PIXELS;
 ^
../Core/Src/main.c:287:32: error: 'DMA2D_LOM_PIXELS' undeclared (first use in this function); did you mean 'DMA2D_PIXEL'?
 hdma2d.Init.LineOffsetMode = DMA2D_LOM_PIXELS;
 ^~~~~~~~~~~~~~~~
 DMA2D_PIXEL

I see that if I take a a project that was created from a V3 AT those initialization are not there and also do not generated by CubeMX if I try to regenerate the code.

Note that my DMA2D bytes swap and line offset mode is the same as in the AT:

0690X00000BwikIQAR.jpg

Any idea how to handle this?

This topic has been closed for replies.

8 replies

Martin KJELDSEN
Principal III
January 28, 2020

I'll try to verify this.

Jackapran
Visitor II
June 3, 2020

I got same issue, did you figure it out ? I am using STM32CubeIDE v1.3.1 and all packages are updated. Trying this with STM32L496ZG.

Martin KJELDSEN
Principal III
June 4, 2020

I don't have this issue with CubeIDE 1.3.0, but i created the project through CubeMX 5.6.1 stand alone.

/Martin