Fix build failure in STM32 Discovery MPU Projects (#449)

* Fix build failure in STM32 Discovery MPU Projects

Privileged data region size needs to be increased because heap is now
placed in this region.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
Gaurav-Aggarwal-AWS
2020-12-12 16:33:00 -08:00
committed by GitHub
parent d668f3c26d
commit adbc27f11d
11 changed files with 27 additions and 35 deletions

View File

@ -19,13 +19,11 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* *
* http://www.FreeRTOS.org * https://www.FreeRTOS.org
* http://aws.amazon.com/freertos * https://github.com/FreeRTOS
* *
* 1 tab == 4 spaces!
*/ */
#ifndef FREERTOS_CONFIG_H #ifndef FREERTOS_CONFIG_H
#define FREERTOS_CONFIG_H #define FREERTOS_CONFIG_H

View File

@ -19,11 +19,11 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* *
* http://www.FreeRTOS.org * https://www.FreeRTOS.org
* http://aws.amazon.com/freertos * https://github.com/FreeRTOS
* *
* 1 tab == 4 spaces!
*/ */
/* Scheduler includes. */ /* Scheduler includes. */
#include "FreeRTOS.h" #include "FreeRTOS.h"
#include "task.h" #include "task.h"

View File

@ -19,10 +19,9 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* *
* http://www.FreeRTOS.org * https://www.FreeRTOS.org
* http://aws.amazon.com/freertos * https://github.com/FreeRTOS
* *
* 1 tab == 4 spaces!
*/ */
#ifndef __APP_MAIN_H__ #ifndef __APP_MAIN_H__

View File

@ -19,10 +19,9 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* *
* http://www.FreeRTOS.org * https://www.FreeRTOS.org
* http://aws.amazon.com/freertos * https://github.com/FreeRTOS
* *
* 1 tab == 4 spaces!
*/ */
/* FreeRTOS includes. */ /* FreeRTOS includes. */

View File

@ -19,10 +19,9 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* *
* http://www.FreeRTOS.org * https://www.FreeRTOS.org
* http://aws.amazon.com/freertos * https://github.com/FreeRTOS
* *
* 1 tab == 4 spaces!
*/ */
#ifndef __MPU_DEMO_H__ #ifndef __MPU_DEMO_H__

View File

@ -68,9 +68,9 @@ MEMORY
} }
/* Initial 32K Flash is used to store kernel functions and /* Initial 32K Flash is used to store kernel functions and
* initial 512 bytes of RAM is used to store kernel data. */ * initial 32K RAM is used to store kernel data. */
__privileged_functions_region_size__ = 32K; __privileged_functions_region_size__ = 32K;
__privileged_data_region_size__ = 512; __privileged_data_region_size__ = 32K;
__FLASH_segment_start__ = ORIGIN( FLASH ); __FLASH_segment_start__ = ORIGIN( FLASH );
__FLASH_segment_end__ = __FLASH_segment_start__ + LENGTH( FLASH ); __FLASH_segment_end__ = __FLASH_segment_start__ + LENGTH( FLASH );

View File

@ -19,10 +19,9 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* *
* http://www.FreeRTOS.org * https://www.FreeRTOS.org
* http://aws.amazon.com/freertos * https://github.com/FreeRTOS
* *
* 1 tab == 4 spaces!
*/ */
/** /**

View File

@ -19,10 +19,9 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* *
* http://www.FreeRTOS.org * https://www.FreeRTOS.org
* http://aws.amazon.com/freertos * https://github.com/FreeRTOS
* *
* 1 tab == 4 spaces!
*/ */
EXTERN vHandleMemoryFault EXTERN vHandleMemoryFault

View File

@ -38,16 +38,16 @@ define symbol __reigon_ROM_unprivileged_end__ = __ICFEDIT_region_ROM_end__;
/* RAM Organization /* RAM Organization
* 1. Privileged Data: * 1. Privileged Data:
* Start : 0x20000000 * Start : 0x20000000
* End : 0x200003FF * End : 0x20007FFF
* Size : 1 Kbytes * Size : 32 Kbytes
* 2. Unprivileged Data: * 2. Unprivileged Data:
* Start : 0x20000400 * Start : 0x20008000
* End : 0x20017FFF * End : 0x20017FFF
* Size : 95 Kbytes * Size : 64 Kbytes
*/ */
define symbol __region_RAM_privileged_start__ = __ICFEDIT_region_RAM_start__; define symbol __region_RAM_privileged_start__ = __ICFEDIT_region_RAM_start__;
define symbol __region_RAM_privileged_end__ = 0x200003FF; define symbol __region_RAM_privileged_end__ = 0x20007FFF;
define symbol __region_RAM_unprivileged_start__ = 0x20000400; define symbol __region_RAM_unprivileged_start__ = 0x20008000;
define symbol __region_RAM_unprivileged_end__ = __ICFEDIT_region_RAM_end__; define symbol __region_RAM_unprivileged_end__ = __ICFEDIT_region_RAM_end__;
define symbol __region_SRAM2_start__ = 0x10000000; define symbol __region_SRAM2_start__ = 0x10000000;
define symbol __region_SRAM2_end__ = 0x10007FFF; define symbol __region_SRAM2_end__ = 0x10007FFF;

View File

@ -38,7 +38,7 @@ LR_APP 0x08000000 0x100000 ; load region size_region
*(privileged_data) *(privileged_data)
} }
RW_IRAM_UNPRIVILEGED 0x20000400 RW_IRAM_UNPRIVILEGED 0x20008000
{ {
.ANY (+RW +ZI) .ANY (+RW +ZI)
} }

View File

@ -19,10 +19,9 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* *
* http://www.FreeRTOS.org * https://www.FreeRTOS.org
* http://aws.amazon.com/freertos * https://github.com/FreeRTOS
* *
* 1 tab == 4 spaces!
*/ */
#include <stdint.h> #include <stdint.h>
@ -40,7 +39,7 @@ const uint32_t * __SRAM_segment_end__ = ( uint32_t * ) 0x20018000;
const uint32_t * __privileged_functions_start__ = ( uint32_t * ) 0x08000000; const uint32_t * __privileged_functions_start__ = ( uint32_t * ) 0x08000000;
const uint32_t * __privileged_functions_end__ = ( uint32_t * ) 0x08008000; const uint32_t * __privileged_functions_end__ = ( uint32_t * ) 0x08008000;
const uint32_t * __privileged_data_start__ = ( uint32_t * ) 0x20000000; const uint32_t * __privileged_data_start__ = ( uint32_t * ) 0x20000000;
const uint32_t * __privileged_data_end__ = ( uint32_t * ) 0x20000400; const uint32_t * __privileged_data_end__ = ( uint32_t * ) 0x20008000;
const uint32_t * __syscalls_flash_start__ = ( uint32_t * ) &( Image$$ER_IROM_FREERTOS_SYSTEM_CALLS$$Base ); const uint32_t * __syscalls_flash_start__ = ( uint32_t * ) &( Image$$ER_IROM_FREERTOS_SYSTEM_CALLS$$Base );
const uint32_t * __syscalls_flash_end__ = ( uint32_t * ) &( Image$$ER_IROM_FREERTOS_SYSTEM_CALLS$$Limit ); const uint32_t * __syscalls_flash_end__ = ( uint32_t * ) &( Image$$ER_IROM_FREERTOS_SYSTEM_CALLS$$Limit );