2019-05-02 03:33 AM
Hello,
I tried to port an TouchGFX-Application from ARM5-Compiler (ARMCC) to ARM6 (ARMCLANG). Both compilers are from KEIL (µVision).
Well it does compile, but it doesn't link:
Warning: L6869W: abstractpainter.o requested the Rogue Wave Standard C++ Library which has been removed from the product. This might cause link errors because libc++ is used instead.
Error: L6242E: Cannot link object abstractshape.o as its attributes are incompatible with the image attributes.
(There are a lot more linker errors)
I do believe the provided TouchGFX-Library is not compatible with ARMCLANG (and there is no other library supplied in ...\TouchGFX\4.10.0\touchgfx\lib\core\cortex_m7\Keil)
Is that the case, or did I miss something else?
Solved! Go to Solution.
2020-02-01 07:51 AM
Hi Martin,
thanks for the library!
I created a new project from scratch (with the stm32f746-disco board)
and TouchGFX works fine with ARMCLANG, as long as you don't use the Middleware from Keil (at least the File System & USB libary).
Then linker error occurs.
I figured out that:
TouchGFX only links when "Short enums/wchar" is disabled
Middleware only links when "Short enums/wchar" is enabled
Keil mentioned : "The wchar_t type must be the same in all source and libraries to successfully link."
Can you build the library with "Short enums/wchar" enabled? This should fix the problem.
Detailed information here:
2020-02-03 01:07 AM
Thanks for the heads up!
I'll try to get around to it today.
/Martin
2020-02-03 01:39 AM
Try this:
Extract it at the root of your 4.13.0 installation and it should update the correct folder (m7 only currently). The lib is called touchgfx_core_clang.lib.
/Martin
2020-02-03 02:30 AM
Hi @Martin KJELDSEN
Thanks.
Now I get a lot less linker errors: (I enabled the "Short enums/wchar" option)
2020-02-03 02:50 PM
I tried it myself and got the same linker errors.
You can demote the linker error message to a warning by adding "--diag-warning=6242" in the Linker-Tab.
But I don't feel particularly comfortable doing this...
2020-02-04 02:33 AM
I thought this linker error is what we just fixed with the short enums/wchar option.
2020-02-04 02:40 AM
As you can see in an above screenshot, we had a lot more errors (we came from about 44 errors down to 3). They disappeared with the new library.
Why they didn't fix the errors on stm32_crc_lock, texturemaptypes, renderingbuffer is a good question.
Do these files have a seperate configuration? (in Keil I think you can change the setting also per file basis...)
2020-02-04 02:45 AM
There are no special settings for those files and they inherit the global settings of "short wchar". I'll have to look into it.
2020-02-05 01:30 AM
I updated the library at the same link. I've managed to create a compiling (cmsis os code does not work well with ARMCLANG!) and linking project (Don't enable MicroLib).
/Martin
2020-02-05 01:34 AM
compiling Kerning_verdana_40_4bpp.cpp...
compiling Screen1ViewBase.cpp...
compiling Table_verdana_10_4bpp.cpp...
compiling Table_verdana_20_4bpp.cpp...
compiling Table_verdana_40_4bpp.cpp...
compiling TypedTextDatabase.cpp...
compiling Texts.cpp...
linking...
STM32F769I_DISCO.sct(18): warning: L6314W: No section matches pattern *.o(ExtFlashSection).
Program Size: Code=104996 RO-data=15748 RW-data=168 ZI-data=7136
Finished: 0 information, 1 warning and 0 error messages.
FromELF: creating hex file...
"STM32F769I_DISCO\STM32F769I_DISCO.axf" - 0 Error(s), 1 Warning(s).
Build Time Elapsed: 00:00:18
(warning is just because i have no images or fonts in my application to go into external flash)