cancel
Showing results for 
Search instead for 
Did you mean: 

Place a structure at a specified Memory location

Pje
Associate III

Hi All.

I need help please ,I have a structure that contains 6 uint16_t varaibles the request from the team is that we place this structure at a specific memeory address (STM32F103C8) .

As said before I am new to ARM controllers and any help indicators or small code snippert is highly apprecated 

Regards 

Pje

1 ACCEPTED SOLUTION

Accepted Solutions

It will depend on what tools you're using - you didn't say.

It's the Linker's job to do memory allocation, so it will involve configuring the linker ...

For GCC, you create a Section in the Linker script, and use Compiler attributes to put the item into that section:

https://stackoverflow.com/a/54128613

 

View solution in original post

2 REPLIES 2

It will depend on what tools you're using - you didn't say.

It's the Linker's job to do memory allocation, so it will involve configuring the linker ...

For GCC, you create a Section in the Linker script, and use Compiler attributes to put the item into that section:

https://stackoverflow.com/a/54128613

 

Dear Andrew ,

Thank you so much for your help I am using Keil with STM so I guess it is GCC compiler .

I really appreciate your help thanks again I will have a go at it as indicated by your link 

Regards

Pje