cancel
Showing results for 
Search instead for 
Did you mean: 

BUG? STemWin libraries not included in project

johnjohn9105
Associate III

I'm trying to play with STemWin (I can't use TouchGFX because I'm on Linux) on the STM32F429iDiscovery board. When I create my project in STM32CubeIDE and build, it's clear that the STemWin libraries are not part of my project. I can create a folder in my project, copy STemWin_CM4_wc16.a there, rename it with a 'lib' prefix, and add a library path and file in the project settings and get it to compile (though the code will then compile and download to the target, it still won't run properly.)

FEATURE REQUEST: When GRAPHICS -> STemWin is enabled in CubeMX, the GUI should ask the user whether to use the 16- or 32- bit wchar version, whether or not to use speed optimized version, and whether or not to use the RGBA version of the library, and the library should automatically be included in the project. The project should build with no linker errors without the user manually moving libraries around or changing the project settings for library paths.

5 REPLIES 5
johnjohn9105
Associate III

STEPS TO REPRODUCE:

Using STM32CubeIDE 1.0.0 on Lubuntu 18.04.

  1. Launch STM32CubeIDE
  2. Select File -> New -> STM32 Project
  3. Chose the STM32429IDISCOVERY board and click Next
  4. Enter a project name. Target C language, Executable binary, and STM32Cube project type. Click Next
  5. I'm using firmware version 1.24.1, leaving the location at default, and copying only the necessary library files. Click Finish.
  6. Select 'Yes' to initializing peripherals to default mode.
  7. For some reason I get a code generation error here. I'd call this a bug, too, but it's not a showstopper. Click 'No' on still wanting to generate code.
  8. At this point I get a Code Generation error about a missing firmware package. I'd call this a bug too, but again not a showstopper. Click OK.
  9. To simplify debugging, in Middleware, disable FREERTOS and USB_HOST
  10. In Middleware, click GRAPHICS
  11. Select STemWin from the dropdown, then Display Parallel Interface Using LTDC in the second dropdown.
  12. On the Platform Settings tab, select:
    1. GPIO pin PC2 for Chip Select
    2. GPIO pin PD13 for WRX high
    3. SPI Full-Duplex Master pin SPI5 for SPI_PIN
    4. SPIO pin PD12 for RDX high
    5. (Note: I have not confirmed these choices against the board schematic. I hope they're correct.)
  13. Go to the Clock Configuration tab and run the autosolver.
  14. Save the file.
  15. Select Yes to generate code.
  16. Note that you get the spinning donut, but code doesn't actually generate. (Another bug?)
  17. Open main.c in the editor window.
  18. From the Project menu, choose "Build Project"
  19. Note 11 errors from the linker.

WORKAROUND:

  1. In the filesystem, go to home/<username>/STM32Cube/Repository/<version>/Middlewares/ST/STemWin/Lib
  2. Copy an appropriate library file. (Use one without _OS_ in the name since we're not using FREERTOS, though this entire problem and solution applies if FREERTOS is included in the project) I'm using STemWin_CM4_wc16.a as an example. I'm not 100% sure that this is compatible with all the project settings or not.
  3. In the filesystem, go to your project folder under your workspace and create a new folder, STemWin.
  4. Paste the library into the new folder.
  5. Rename the file, adding "lib" to the front of the filename.
  6. In STM32CubeIDE, refresh the project explorer to find the new folder/file.
  7. Go to Project->Properties
  8. In the left pane, expand C/C++General and select Paths and Symbols.
  9. Select the Libraries tab.
  10. Click Add, and add "STemWin_CM4_wc16" (Yes, omit the "lib" part of the filename and the ".a" extension.)
  11. Select the Library Paths tab.
  12. Click Add, then Workspace, and select the STemWin folder.
  13. Click Apply and Close
  14. Build the project. Note no linker errors.

I don't know for sure if this is the 'right' solution, but it is 'a' solution that, I believe, is 'correct enough' to get the code to compile and link properly.

Just because it builds doesn't mean the code runs. My code hangs in _DMA_ExecOperation and I need to find out why. Other folks have run into this in the past and there are unanswered questions in the forums. I will start looking at that and may post further questions.

johnjohn9105
Associate III

Another bug: the code generated by STM32Cube never calls __HAL_RCC_DMA2D_CLK_ENABLE(), so none of the DMA2D settings have any effect.

I still haven't got anything working, but this is clearly a necessary step.

EKirs
Associate II

I am having the same problem on Windows 10, STM32CubeIDE 1.0.0.

I have created a project in the new IDE with the same configuration as in separate CubeMX and it does not generate STemWin library file. If I copy the file from the project generated by separate CubeMX and manually add it as a library to the STM32CubeIDE project, I am receiving the following compilation error:

arm-none-eabi-gcc -o "UIV1_ci.elf" @"objects.list" -l"##/workspace_1.0.0/UIV1_ci/Middlewares/ST/STemWin/Lib/STemWin_CM4_OS_wc16_ot_ARGB.a" -mcpu=cortex-m4 -T"##\workspace_1.0.0\UIV1_ci\STM32L4R7VITX_FLASH.ld" --specs=nosys.specs -Wl,-Map="UIV1_ci.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group

c:\st\stm32cubeide_1.0.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.0.0.201904181610\tools\arm-none-eabi\bin\ld.exe: cannot find -l##/workspace_1.0.0/UIV1_ci/Middlewares/ST/STemWin/Lib/STemWin_CM4_OS_wc16_ot_ARGB.a

collect2.exe: error: ld returned 1 exit status

make: *** [makefile:48: UIV1_ci.elf] Error 1

"make -j8 all" terminated with exit code 2. Build might be incomplete.

(I replaced my local paths above with ##)

Solution provided by johnjohn9105 helps to compile, but the LCD does not function properly (in particular, I end up with a blank white screen).

I thought of moving my project(s) to the new platform, but apparently it will not happen immediately.

I hope issues like this will be resolved soon.

LBrov
Associate

Hi guys.

I have similar problem, I intend put STemWin into smt32f103.

in the link above is all information.

https://community.st.com/s/profile/0050X000008AmyJQAS

Can you help me...

Thank in advance.

RLecu
Associate II

The solution of johnjohn9105 has just saved my life usingthe PDMFilter Library from pdm2pcm module. I has constant errors linking to thisl ibrary and now finally it compiles.

Remeber, remove the lib and .a --> libPDMFilter_CM4_GCC_wc32.a becomes --> PDMFilter_CM4_GCC_wc32.

I am adding the name of STM32F4 DISCOVERY and pdm2pcm in case the indexers help someone else.

Thanks!!