Difference between revisions of "How to place a function in RAM"
(Redirected page to SEGGER Embedded Studio) |
|||
Line 1: | Line 1: | ||
+ | #REDIRECT [[SEGGER_Embedded_Studio]] |
||
− | __TOC__ |
||
− | |||
− | For some situations it may be beneficial or even necessary to place a function in RAM instead of flash. This for example is needed in case a bootloader (that runs from flash) shall update a firmware (running from the same flash but different sectors). As the flash is not accessible for read accesses while it is programmed, the flash programming routines itself need to run from RAM. |
||
− | |||
− | In order to put a function into RAM, it needs to be placed into the '''.fast''' section. This is done as follows: |
||
− | __attribute__ ((section(".fast"))) // Place the following function in RAM |
||
− | void _Delay(void) { |
||
− | [...] |
||
− | } |
Revision as of 17:57, 23 October 2018
Redirect to: