From b4bcf6fd964f541facc28feb127a6f0674c48f0e Mon Sep 17 00:00:00 2001 From: Sami Korhonen Date: Wed, 7 Dec 2016 16:34:56 +0200 Subject: [PATCH] Fix F7 link output --- src/main/drivers/system_stm32f7xx.c | 2 +- src/main/target/link/stm32_flash_f745.ld | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/drivers/system_stm32f7xx.c b/src/main/drivers/system_stm32f7xx.c index fed1c61f9..93a6c9e8d 100644 --- a/src/main/drivers/system_stm32f7xx.c +++ b/src/main/drivers/system_stm32f7xx.c @@ -155,7 +155,7 @@ void systemInit(void) //SystemClock_Config(); // Configure NVIC preempt/priority groups - //NVIC_PriorityGroupConfig(NVIC_PRIORITY_GROUPING); + HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITY_GROUPING); // cache RCC->CSR value to use it in isMPUSoftreset() and others cachedRccCsrValue = RCC->CSR; diff --git a/src/main/target/link/stm32_flash_f745.ld b/src/main/target/link/stm32_flash_f745.ld index 6c60e5c2c..c8da9a3aa 100644 --- a/src/main/target/link/stm32_flash_f745.ld +++ b/src/main/target/link/stm32_flash_f745.ld @@ -15,12 +15,14 @@ ENTRY(Reset_Handler) /* Specify the memory areas */ MEMORY { - FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1008K - FLASH_CONFIG (r) : ORIGIN = 0x080FC000, LENGTH = 16K + FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 768K + FLASH_CONFIG (r) : ORIGIN = 0x080C0000, LENGTH = 256K - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 320K + TCM (rwx) : ORIGIN = 0x20000000, LENGTH = 64K + RAM (rwx) : ORIGIN = 0x20010000, LENGTH = 256K MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K } /* note CCM could be used for stack */ +REGION_ALIAS("STACKRAM", TCM) INCLUDE "stm32_flash.ld"