Problems with __attribute__ directive

Sysprogs forums Forums VisualGDB Problems with __attribute__ directive

This topic contains 1 reply, has 2 voices, and was last updated by  support 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #13014

    stefanococo
    Participant

    Hi,

    I just ported an mbed project into VisualGDB but I’m experiencing problem using expression like this:

    const uint8_t Eeprom_area0[PAGE_SIZE] __attribute__((at(PAGE0_BASE_ADDRESS),used))={ [0 … (PAGE_SIZE-1)] = 0xFF };

    This worked well into mbed online compiler and Keil, but here in VisualGBD the compiler says at this line:

    warning :  ‘at’ attribute directive ignored [-Wattributes]

    error :  expected identifier before numeric constant

    error :  expected ‘{‘ before ‘=’ token

    error :  no match for ‘operator=’ (operand types are ‘<lambda()>’ and ‘int’)

     

    I’m using the latest version of VisualGDB (all extensions & toolchains updated) into VisualStudio2017.

    Thanks in advance for your help.

    Stefano

    #13017

    support
    Keymaster

    Hi,

    This is a known issue. The GCC compiler used by VisualGDB is not 100% compatible with the Keil compiler and uses a completely different syntax for placing parts of your program at fixed addresses.

    We have a detailed tutorial explaining the entire process here: https://visualgdb.com/tutorials/arm/bootloader/

    It is also worth mentioning that VisualGDB can be configured to use the Keil compiler instead of GCC. Please follow this tutorial for details:  https://visualgdb.com/tutorials/arm/keil/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.