cancel
Showing results for 
Search instead for 
Did you mean: 

ARM6 Compiler Support

PBull
Associate III

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?

31 REPLIES 31
PBull
Associate III

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.

0690X00000BxScFQAV.png

Detailed information here:

http://www.keil.com/support/docs/3975.htm

Thanks for the heads up!

I'll try to get around to it today.

/Martin

Try this:

http://sw-center-st-com.s3-eu-west-1.amazonaws.com/touchgfx/TouchGFX/Patches/4.13.0/touchgfx_core_clang.zip

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

Hi @Martin KJELDSEN​ 

Thanks.

Now I get a lot less linker errors: (I enabled the "Short enums/wchar" option)

0690X00000Bxxj7QAB.png

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.

0690X00000By2JJQAZ.png

But I don't feel particularly comfortable doing this...

I thought this linker error is what we just fixed with the short enums/wchar option.

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...)

There are no special settings for those files and they inherit the global settings of "short wchar". I'll have to look into it.

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

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)