cancel
Showing results for 
Search instead for 
Did you mean: 

Copying code to RAM

Pavel A.
Evangelist III
Posted on October 02, 2017 at 14:52

When code is copied to RAM (for example the code for rewriting internal flash)  how the RAM is allocated? Is it allocated statically or just uses any free space remaining below the stack? I cannot find this in the documentation.

1 ACCEPTED SOLUTION

Accepted Solutions
luca239955_stm1_st
Senior II
Posted on October 03, 2017 at 10:36

Hello,

what compiler?

For the Cosmic compiler look for 'Moveable Code' in the user manual (page 286), there is an explanation and a short example.

Regards,

Luca

View solution in original post

3 REPLIES 3
Posted on October 02, 2017 at 16:03

Unless there are specific execution requirements, RAM is allocated in normal fashion, off the stack, from the heap or statically.

Understand how the core executes code, address dependency, control transfer, etc.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
luca239955_stm1_st
Senior II
Posted on October 03, 2017 at 10:36

Hello,

what compiler?

For the Cosmic compiler look for 'Moveable Code' in the user manual (page 286), there is an explanation and a short example.

Regards,

Luca

Posted on October 05, 2017 at 03:53

Thank you Luca