Memory regions described in the ld file
This commit is contained in:
@@ -83,6 +83,8 @@ TIM_HandleTypeDef htim17;
|
|||||||
|
|
||||||
/* USER CODE BEGIN PV */
|
/* USER CODE BEGIN PV */
|
||||||
|
|
||||||
|
//volatile const uint8_t config_flash[1024 * 2] __attribute__((__section__(".conf_data")));
|
||||||
|
|
||||||
union FLASH_conf {
|
union FLASH_conf {
|
||||||
conf_t config;
|
conf_t config;
|
||||||
struct FLASH_sector sector;
|
struct FLASH_sector sector;
|
||||||
|
@@ -46,6 +46,7 @@ MEMORY
|
|||||||
{
|
{
|
||||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 8K
|
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 8K
|
||||||
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 62K
|
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 62K
|
||||||
|
CONF (rwx) : ORIGIN = 0x800F800, LENGTH = 2K
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sections */
|
/* Sections */
|
||||||
@@ -173,6 +174,13 @@ SECTIONS
|
|||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
} >RAM
|
} >RAM
|
||||||
|
|
||||||
|
.conf_data :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
*(.conf_data)
|
||||||
|
. = ALIGN(4);
|
||||||
|
} > CONF
|
||||||
|
|
||||||
/* Remove information from the compiler libraries */
|
/* Remove information from the compiler libraries */
|
||||||
/DISCARD/ :
|
/DISCARD/ :
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user