2021-04-09 09:25 PM
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?
2021-04-10 01:14 AM
Where? When? In what context? Show us the complete compile output and/or relevant piece of code.
JW
2021-04-10 02:39 AM
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:
2021-04-10 04:59 AM
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.
2021-04-10 07:40 AM
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.
2021-04-10 08:49 AM
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.
2021-04-10 11:00 AM
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
2021-04-10 11:03 PM
Thanks, can you provide me a reference of such ld file please ?