cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX generates TouchGFX DMA2D with error

kronikary
Associate III

Hi!

I am using STM32L496 on Nucleo 144 board CubeMX 6.1.1 CubeIDE 1.5.1 TouchGFX 4.16.0.

After generating code with TouchGFX using DMA2D error occurs during MX_DMA2D_Init.

../Core/Src/main.c: In function 'MX_DMA2D_Init':
../Core/Src/main.c:249:14: error: 'DMA2D_InitTypeDef {aka struct <anonymous>}' has no member named 'BytesSwap'
   hdma2d.Init.BytesSwap = DMA2D_BYTES_REGULAR;
              ^
../Core/Src/main.c:249: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:249:27: note: each undeclared identifier is reported only once for each function it appears in
../Core/Src/main.c:250:14: error: 'DMA2D_InitTypeDef {aka struct <anonymous>}' has no member named 'LineOffsetMode'
   hdma2d.Init.LineOffsetMode = DMA2D_LOM_PIXELS;
              ^
../Core/Src/main.c:250:32: error: 'DMA2D_LOM_PIXELS' undeclared (first use in this function); did you mean 'DMA2D_PIXEL'?
   hdma2d.Init.LineOffsetMode = DMA2D_LOM_PIXELS;
                                ^~~~~~~~~~~~~~~~
                                DMA2D_PIXEL
make: *** [Core/Src/subdir.mk:41: Core/Src/main.o] Error 1

Also I am using internal frame buffer for display but for some reason it is placed in .data section taking space from Flash and RAM memory. Why is that so? 0693W000007EEvWQAW.png 

EDIT: First problem is not related with TouchGFX. It is related only with DMA2D.

EDIT2: Note AN4943 page 16, 5.2.2 says that ByteSwap feature is only provided on L4+. Didn't find information about line offset.

0 REPLIES 0