Jump to content

supported compiler versions


Knut

Recommended Posts

wich compiler versions are supported with KEIL MDK pro and ARM-Developer Silver.

we are currently testing your software to buy the license. After one day of work we have not managed to compile your sources without errors. 

best regards

 

Knut

Link to comment
Share on other sites

We've successfully used Keil µVision MDK v5 in multiple projects - including customer projects. You can find the corresponding guide here: https://wiki.ugfx.io/index.php/Using_Keil_µVision_5_MDK-ARM.

Don't forget to set the GFX_COMPILER macro to GFX_COMPILER_KEIL in your configuration file!

If you tell us more about the errors you're facing we might be able to help you.

Link to comment
Share on other sites

There is no reason that we know of that it should not compile with Keil v6 as we actively support and use around a dozen different compilers including lcvm, gcc, arm, msvc, tcc and even arduino reference based compilers. At least Keil v5 is based on the arm reference compiler.

We have not found a c compiler yet that cannot be used, from 8 bit compilers all the way to 64 bit compilers.

As a result I expect that the problem is either something to do with the build configuration or the compiler switches being used.

Send us a list of your errors and we will look closely at it. We will also look at adding Keil v6 to our supported list but that will take time (and money) so don't expect that quickly.

Link to comment
Share on other sites

I fully agree with @inmarket here. We've yet to come across a C-Compiler that can't handle µGFX. We're running this project for over 7 years now and never encountered any issue on this end of things.

As before: We're happy to help where we can - but you need to provide a bit more information. 

Link to comment
Share on other sites

With F7 CPU and a minimal config file I get these errors(2) and warings(14 

 

../../ugfx/src/gfx_mk.c(14): warning: In file included from...
../../ugfx/src/gfx.c(16): warning: In file included from...
../../ugfx/src/../gfx.h(7): warning: In file included from...
../../ugfx/src/gfx.h(93): warning: In file included from...
../../ugfx/src/gfx_compilers.h(624): warning: '#pragma anon_unions' is an ARM Compiler 5 extension, and is not supported by ARM Compiler 6 [-Warmcc-pragma-anon-unions]
                #pragma anon_unions                                                     // Allow anonymous unions
                        ^
../../ugfx/src/gfx_mk.c(14): warning: In file included from...
../../ugfx/src/gfx.c(16): warning: In file included from...
../../ugfx/src/gdisp/../../gfx.h(7): warning: In file included from...
../../ugfx/src/gfx.h(177): warning: In file included from...
../../ugfx/src/gdisp/gdisp.h(54): warning: redefinition of typedef 'gPoint' is a C11 feature [-Wtypedef-redefinition]
} gPoint;
  ^
../../ugfx/src/gmisc/gmisc.h(29): note: previous definition is here
typedef struct gPoint gPoint;
                      ^
../../ugfx/src/gfx_mk.c(14): warning: In file included from...
../../ugfx/src/gfx.c(16): warning: In file included from...
../../ugfx/src/gwin/../../gfx.h(7): warning: In file included from...
../../ugfx/src/gfx.h(178): warning: In file included from...
../../ugfx/src/gwin/gwin.h(60): warning: redefinition of typedef 'GHandle' is a C11 feature [-Wtypedef-redefinition]
} GWindowObject, * GHandle;
                   ^
../../ugfx/src/gwin/gwin.h(33): note: previous definition is here
typedef struct GWindowObject *GHandle;
                              ^
../../ugfx/src/gfx_mk.c(15): warning: In file included from...
../../ugfx/src/gos/gos_mk.c(14): warning: In file included from...
../../ugfx/src/gos/gos_raw32.c(30): warning: "GOS: Raw32 - Make sure you initialize your hardware and the C runtime before calling gfxInit() in your application!" [-W#warnings]
                        #warning "GOS: Raw32 - Make sure you initialize your hardware and the C runtime before calling gfxInit() in your application!"
                         ^
../../ugfx/src/gfx_mk.c(15): warning: In file included from...
../../ugfx/src/gos/gos_mk.c(21): warning: In file included from...
../../ugfx/src/gos/gos_x_threads.c(201): warning: In file included from...
../../ugfx/src/gos/gos_x_threads_cortexm47fp.h(49): error: expected identifier or '('
        static __asm void _gfxTaskSwitch(thread *oldt, thread *newt) {
               ^
../../ugfx/src/gos/gos_x_threads_cortexm47fp.h(63): error: expected identifier or '('
        static __asm void _gfxStartThread(thread *oldt, thread *newt) {
               ^
../../ugfx/src/gfx_mk.c(15): warning: In file included from...
../../ugfx/src/gos/gos_mk.c(21): warning: In file included from...
../../ugfx/src/gos/gos_x_threads.c(484): warning: implicit declaration of function '_gfxTaskSwitch' is invalid in C99 [-Wimplicit-function-declaration]
        _gfxTaskSwitch(me, _gfxCurrentThread);
        ^
../../ugfx/src/gos/gos_x_threads.c(506): warning: implicit declaration of function '_gfxTaskSwitch' is invalid in C99 [-Wimplicit-function-declaration]
        _gfxTaskSwitch(me, _gfxCurrentThread);
        ^
../../ugfx/src/gos/gos_x_threads.c(540): warning: implicit declaration of function '_gfxStartThread' is invalid in C99 [-Wimplicit-function-declaration]
        _gfxStartThread(me, t);
        ^
../../ugfx/src/gfx_mk.c(16): warning: In file included from...
../../ugfx/src/gdriver/gdriver_mk.c(8): warning: In file included from...
../../ugfx/src/gdriver/gdriver.c(12): warning: In file included from...
../../ugfx/src/gdriver/gdriver.h(90): warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
typedef const struct GDriverVMT const   GDriverVMTList[1];
                                ^
../../ugfx/src/gfx_mk.c(18): warning: In file included from...
../../ugfx/src/gdisp/gdisp_mk.c(21): warning: In file included from...
../../ugfx/src/gdisp/gdisp.c(586): warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
                        extern const GDISPVMT const             GDISPVMT_OnlyOne[1];
                                              ^
9 warnings and 2 errors generated.
compiling gfx_mk.c...
compiling GLCD.c...
../../ugfx/drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c(8): warning: In file included from...
../../ugfx\gfx.h(7): warning: In file included from...
../../ugfx/src/gfx.h(93): warning: In file included from...
../../ugfx/src/gfx_compilers.h(624): warning: '#pragma anon_unions' is an ARM Compiler 5 extension, and is not supported by ARM Compiler 6 [-Warmcc-pragma-anon-unions]
                #pragma anon_unions                                                     // Allow anonymous unions
                        ^
../../ugfx/drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c(8): warning: In file included from...
../../ugfx/src/gdisp/../../gfx.h(7): warning: In file included from...
../../ugfx/src/gfx.h(177): warning: In file included from...
../../ugfx/src/gdisp/gdisp.h(54): warning: redefinition of typedef 'gPoint' is a C11 feature [-Wtypedef-redefinition]
} gPoint;
  ^
../../ugfx/src/gmisc/gmisc.h(29): note: previous definition is here
typedef struct gPoint gPoint;
                      ^
../../ugfx/drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c(8): warning: In file included from...
../../ugfx/src/gwin/../../gfx.h(7): warning: In file included from...
../../ugfx/src/gfx.h(178): warning: In file included from...
../../ugfx/src/gwin/gwin.h(60): warning: redefinition of typedef 'GHandle' is a C11 feature [-Wtypedef-redefinition]
} GWindowObject, * GHandle;
                   ^
../../ugfx/src/gwin/gwin.h(33): note: previous definition is here
typedef struct GWindowObject *GHandle;
                              ^
../../ugfx/drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c(14): warning: In file included from...
../../ugfx/drivers/gdisp/SSD1289/../../../src/gdisp/gdisp_driver.h(22): warning: In file included from...
../../ugfx/src/gdisp/../gdriver/gdriver.h(90): warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
typedef const struct GDriverVMT const   GDriverVMTList[1];
                                ^
../../ugfx/drivers/gdisp/SSD1289/gdisp_lld_SSD1289.c(14): warning: In file included from...
../../ugfx/drivers/gdisp/SSD1289/../../../src/gdisp/gdisp_driver.h(735): warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
        const GDISPVMT const GDISP_DRIVER_VMT[1] = {{
                       ^
5 warnings generated.
compiling gdisp_lld_SSD1289.c...
".\PA_F7_B201\PA_F7_B201.axf" - 2 Error(s), 14 Warning(s).

Link to comment
Share on other sites

There are two errors in this. The warnings can be ignored, there is actually nothing wrong with those, the compiler is being unnecessarily noisy.

The two errors relate to assembler code usd for the F7 specific version of the RAW32 task switcher. There are two alternate ways around this...

1. Turn off the F7 specific code in the task switcher by setting the appropriate macro in your gfxconf.h file. (I am not at my desktop right now so I can't immediately tell you which that macro is). We wrote the assembler routines for some cpu's and some compilers because the setjmp routines in their C libraries were broken. Keil was one of those. Hopefully in upgrading the compiler they have also fixed their C library. Alternatively you could fix the assembler so i works for Keil v6 and contribute the code back to us :)

2. Use a different underlying operating system. You are currently using RAW32 (our own implmentation of a minimal os). You could try the Keil ROS for which both versions are supported, the later being the better os. You could also try FreeRTOS or ChibiOS

Link to comment
Share on other sites

Did you set your GFX_CPU macro to the appropriate value (eg. GFX_CPU_CORTEX_M7_FP in your case)? If you keep using the Raw32 port setting that macro will ensure that the assembly code is understandable by Keil (together with GFX_COMPILER_KEIL).

You can find more information in the documentation: https://wiki.ugfx.io/index.php/GOS

Link to comment
Share on other sites

hello,

after some more hours of senseless working and testing. I can not compile ugfx. 

In my opinion, when GFX_CPU_CORTEX_M7_FP is activated, Arm Complier 6.12 can not compile this version fo ugfx.  

 

my compiler settings: 

// Options that (should where relevant) apply to all operating systems
//    #define GFX_NO_INLINE                            GFXOFF
    #define GFX_COMPILER                             GFX_COMPILER_KEIL
//    #define GFX_SHOW_COMPILER                        GFXOFF
      #define GFX_CPU                                  GFX_CPU_CORTEX_M7_FP
//    #define GFX_CPU_NO_ALIGNMENT_FAULTS              GFXOFF
//    #define GFX_CPU_ENDIAN                           GFX_CPU_ENDIAN_UNKNOWN
//    #define GFX_OS_HEAP_SIZE                         0
//    #define GFX_OS_NO_INIT                           GFXON    #define GFX_OS_INIT_NO_WARNING                   GFXON
//    #define GFX_OS_PRE_INIT_FUNCTION                 myHardwareInitRoutine
//    #define GFX_OS_EXTRA_INIT_FUNCTION               myOSInitRoutine
//    #define GFX_OS_EXTRA_DEINIT_FUNCTION             myOSDeInitRoutine
//    #define GFX_OS_CALL_UGFXMAIN                     GFXOFF
//    #define GFX_OS_UGFXMAIN_STACKSIZE                0
//    #define GFX_EMULATE_MALLOC                       GFXOFF
//    #define GFX_MEM_LT64K                            GFXOFF

 

 

Compiler 5 compiles with 0 errors and 47 warnings

same code with compiler 6 compiles with 2 errors and 37 warnins

Errors are:

../../ugfx/src/gos/gos_x_threads_cortexm47fp.h(63): error: expected identifier or '('
        static __asm void _gfxStartThread(thread *oldt, thread *newt) {

 

Link to comment
Share on other sites

As I said, you either need to...

1. Not use the F7 specific code for RAW32, or

2. Fix the assembler so that it works with your compiler, or

3. Use a different underlying operating system.

Whilst the c code in ugfx is extremely portable, any assembler code is optional and both cpu and compiler dependant. With Keil v6 it is passing our protection tests limiting that assembler to arm code chain compilers however it is not compiling it.

So, you have 3 alternative actions you can take above that will solve the problem. Persisting without doing one of the above will not work.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...