Skip to content

Commit

Permalink
add ram section for functions
Browse files Browse the repository at this point in the history
  • Loading branch information
bkleiner committed Nov 8, 2023
1 parent e17417b commit b9f7261
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 15 deletions.
2 changes: 2 additions & 0 deletions src/core/project.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@
#else
#define DMA_RAM
#endif

#define RAM_FUNC __attribute__((section(".ram_functions")))
2 changes: 1 addition & 1 deletion src/system/at32f435/flash_layout.ld
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ SECTIONS
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */

*(.ram_functions)
. = ALIGN(4);
_edata = .; /* define a global symbol at data end */
} >RAM AT> FLASH
Expand Down
2 changes: 1 addition & 1 deletion src/system/stm32f405/flash_layout.ld
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ SECTIONS
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */

*(.ram_functions)
. = ALIGN(4);
_edata = .; /* define a global symbol at data end */
} >RAM AT> FLASH
Expand Down
2 changes: 1 addition & 1 deletion src/system/stm32f411/flash_layout.ld
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ SECTIONS
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */

*(.ram_functions)
. = ALIGN(4);
_edata = .; /* define a global symbol at data end */
} >RAM AT> FLASH
Expand Down
4 changes: 1 addition & 3 deletions src/system/stm32f722/flash_layout.ld
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ SECTIONS
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */
*(.RamFunc) /* .RamFunc sections */
*(.RamFunc*) /* .RamFunc* sections */

*(.ram_functions)
. = ALIGN(4);
_edata = .; /* define a global symbol at data end */

Expand Down
4 changes: 1 addition & 3 deletions src/system/stm32f745/flash_layout.ld
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ SECTIONS
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */
*(.RamFunc) /* .RamFunc sections */
*(.RamFunc*) /* .RamFunc* sections */

*(.ram_functions)
. = ALIGN(4);
_edata = .; /* define a global symbol at data end */

Expand Down
4 changes: 1 addition & 3 deletions src/system/stm32f765/flash_layout.ld
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,7 @@ SECTIONS
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */
*(.RamFunc) /* .RamFunc sections */
*(.RamFunc*) /* .RamFunc* sections */

*(.ram_functions)
. = ALIGN(4);
_edata = .; /* define a global symbol at data end */

Expand Down
4 changes: 1 addition & 3 deletions src/system/stm32h743/flash_layout.ld
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ SECTIONS
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */
*(.RamFunc) /* .RamFunc sections */
*(.RamFunc*) /* .RamFunc* sections */

*(.ram_functions)
. = ALIGN(4);
_edata = .; /* define a global symbol at data end */

Expand Down

0 comments on commit b9f7261

Please sign in to comment.