warning: 'at' attribute directive being ignored in stm32cubeide 1.6.1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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?
- Labels:
-
STM32CubeIDE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-04-10 01:14 AM
Where? When? In what context? Show us the complete compile output and/or relevant piece of code.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-04-10 11:03 PM
Thanks, can you provide me a reference of such ld file please ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-10-09 10:45 AM
I am a bit confused as to how it can be implemented. Can you please elaborate on how do you define variable in flash at a perticular location using pointers? Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-10-09 04:33 PM
> how do you define variable in flash at a perticular location using pointers?
Not quite a variable, rather an expression that points to the location.
#define THE_ADDRESS 0x08100000
struct foo {
int v1;
int v2;
};
#define foo_at_address (*(struct foo*)THE_ADDRESS)
// or a pointer
const struct foo *pfoo = (struct foo*)THE_ADDRESS;