cancel
Showing results for 
Search instead for 
Did you mean: 

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

egoltzman
Senior

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?

8 REPLIES 8
Martin KJELDSEN
Chief III

I'll try to verify this.

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.

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

/Martin

Nope, not a problem when starting from CubeIDE 1.3.0 either. Can you tell me more about your process?

/Martin

Here is what I done:

Start new stm32 project > Search for STM32L496ZG and select the STM32L496ZGTx reference > Name my project test02 and use default location (under user folder), C++, Executable, STM32Cube > Firmware Package: STM32Cube FW_L4 v1.15.1, Copy only the necessary library files then finish.

In the MX perspective, I just activate DMA2D (Multimedia tab) without more configuration. Code is generated without any error. Building it rise errors:

0693W000001q352QAA.png

0693W000001q35CQAQ.png

0693W000001q35HQAQ.png

0693W000001q35MQAQ.png

Did you find anything ? Or am I doing something wrong...

I'm not sure what's going wrong for you - This seems more like a general CubeMX issue. I can't replicate it. I'm not sure if i was using STM32Cube FW_L4 v1.15.1 though.

/Martin

I tried with v1.15.1 and v1.15.0 and got the same issue. It seems to be a generation error from cubeMX, these wrong code lines are generated for a L4 series (my case) but are only compatible with L4+ series