cancel
Showing results for 
Search instead for 
Did you mean: 

warning: 'at' attribute directive being ignored in stm32cubeide 1.6.1

Rajssss
Associate II

I don't know why but I am getting this warning in STM32CUBE IDE 1.6.1:

'at' attribute directive ignored [-Wattributes]

Any explanations please? Any solutions?

7 REPLIES 7

Where? When? In what context? Show us the complete compile output and/or relevant piece of code.

JW

I am trying to port an camera application originally created on keil MDK, The buffer for the camera data is meant to be stored at external SDRAM.

Below is the code which works on Keil.

const uint8_t  jpeg_data_buf[JPEG_BUF_SIZE_MAX] __attribute__((at(SDRAM_DEVICE_ADDR+0x400000)));

I now know that, GNU GCC that the stm32cube IDE uses doesn't support 'at' attribute, is there any other similar method to acheive this besides copying the data to SDRAM manually, as I have found in the example:

https://github.com/STMicroelectronics/STM32CubeF7/blob/master/Projects/STM32746G-Discovery/Examples/FMC/FMC_SDRAM/Src/main.c#L129

Example from lcd code

    // Use the section "TouchGFX_Framebuffer" in the linker to specify the placement of the buffer
    LOCATION_PRAGMA("TouchGFX_Framebuffer")
    uint32_t frameBuf[(320 * 1024 + 3) / 4] LOCATION_ATTRIBUTE("TouchGFX_Framebuffer");

then edit ld file and add section def.

Thanks, Can you point me to the exact line in the example code you are referring to?

I am not very much into writing linker scripts, so a reference will be useful.

This standart generated code for TouchGFX with set Adress framebuffer BY ALLOCATION in file \TouchGFXProjects\testLCD\TouchGFX\target\generated\TouchGFXGeneratedHAL.cpp 

but in ld file isnt generated, this need you write sections.

Pavel A.
Evangelist III

Attribute at is specific to the Keil's ARMCC compiler. GCC does not know it.

Anyway - to place stuff at absolute address you don't need any pragmas or attributes or link script. Just use pointers.

-- pa

Thanks, can you provide me a reference of such ld file please ?