Jump to content

deprecated(msg) error


jcc147

Recommended Posts

When setting both GINPUT_NEED_MOUSE and GWIN_NEED_WIDGET  TRUE, I got this error message:

..\..\ugfx_2.8\src\../src/gwin/gwin_widget.h(340): error:  #1204: attribute "deprecated" does not take arguments
        bool_t DEPRECATED("This call can now be removed. Attaching the mouse to GWIN is now automatic.") gwinAttachMouse(uint16_t instance);

How could this happen?

 

Thanks,

Josh

Link to comment
Share on other sites

The problem is gwinAttachMouse() is called nowhere in my code.

The error is complaining the deprecated attribution doesn't take argument while a message is passed as an argument in gwin_widget.c and gwin_widget.h.

#if GFX_USE_GINPUT && GINPUT_NEED_MOUSE
    bool_t DEPRECATED("This call can now be removed. Attaching the mouse to GWIN is now automatic.") gwinAttachMouse(uint16_t instance) {
        // This is now a NULL event because we automatically attach to all mice in the system.
        (void) instance;
        return TRUE;
    }
#endif

The compilation passes if I remove the msg from the deprecated attribute in gfx_compilers.h

#define DEPRECATED(msg)                        __attribute__((deprecated(msg))) to

#define DEPRECATED(msg)                        __attribute__((deprecated))

Link to comment
Share on other sites

I'm using Keil compiler.

This project is a tryout to run uGFX on FREERTOS + HY-miniSTM32 (STM32F103VC) board.

The base is a FREERTOS demo for HY-miniSTM32 board based on Standard Peripheral Lib.

I revised the LCD and Touchscreen driver example codes provided in the uGFX package because the Standard Peripheral Lib is used.

By following the instructions provided in the document, there is no problem to integrated uGFX to FREERTOS except the issue of deprecated attribute.

Four tasks were created,

Task1 : toggling LED1 every 200ms

Task2: toggleing LED2 every 300ms

Task3: read the input keys. If any key is pressed, the task information is sent to serial console

Task4: a uGFX button widget. If the button is pressed, the screen rotates 90 degree. This code is leveraged from a STM32F4 uGFX example.

 Now the whole project is working fine as long as the deprecated attribute changed to no argument as mentioned earlier.

 

Thanks,

Josh

Link to comment
Share on other sites

Can you please give us the exact version of the Keil compiler, and whether you are using it in ARMCC compile mode (the default) or GCC compiler mode.

What would also help is if you add

#define GFX_SHOW_COMPILER     TRUE 

to your gfxconf.h

It will display a warning about what it auto-detected the compiler as. This will help us track down what is causing the incompatibility.

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