From b5a66df5163670f7238c903287e31ec03512bb1f Mon Sep 17 00:00:00 2001 From: gaurav-aws Date: Wed, 20 Feb 2019 20:27:07 +0000 Subject: [PATCH] Fix Build and Links failure in MPU projects. Minor cosmetic changes in some V8M files. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2640 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- .../NonSecure/main_ns.c | 28 +++++++++---------- .../ReadMe.txt | 2 +- .../Secure/main_s.c | 28 +++++++++---------- .../FreeRTOSConfig.h | 2 +- .../FreeRTOSConfig.h | 2 +- .../GCC_Specific/sections.ld | 2 +- .../Keil_Specific/RTOSDemo.sct | 2 +- FreeRTOS/Source/portable/ARMv8M/ReadMe.txt | 4 +-- FreeRTOS/Source/portable/ARMv8M/copy_files.py | 2 +- .../portable/ARMv8M/non_secure/ReadMe.txt | 5 ++-- .../Source/portable/ARMv8M/non_secure/port.c | 2 +- .../Source/portable/ARMv8M/secure/ReadMe.txt | 4 +-- .../portable/GCC/ARM_CM33/non_secure/port.c | 2 +- .../GCC/ARM_CM33_NTZ/non_secure/port.c | 2 +- .../IAR/ARM_CM33/non_secure/portmacro.h | 1 + .../IAR/ARM_CM33_NTZ/non_secure/port.c | 2 +- .../IAR/ARM_CM33_NTZ/non_secure/portmacro.h | 1 + 17 files changed, 47 insertions(+), 44 deletions(-) diff --git a/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/NonSecure/main_ns.c b/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/NonSecure/main_ns.c index 6faa97b31..13e18ab22 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/NonSecure/main_ns.c +++ b/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/NonSecure/main_ns.c @@ -66,20 +66,20 @@ static void prvCreateTasks( void ); /*-----------------------------------------------------------*/ /* - Instructions to Build and Run: - - The Keil multi-project workspace FreeRTOSDemo.uvmpw contains projects for - both the secure project, and non secure project. - - Set the FreeRTOSDemo_s project as Active - Right click on - "Project: FreeRTOSDemo_s" and select "Set as Active Project". - - Build the FreeRTOSDemo_s project using "Project --> Build" or by pressing - F7. - - Set the FreeRTOSDemo_ns project as Active – Right click on - "Project: FreeRTOSDemo_ns" and select "Set as Active Project". - - Build the FreeRTOSDemo_ns project using "Project --> Build" or by - pressing "F7". - - Start Debug Session using "Debug -> Start/Stop Debug Session" or by - pressing "Ctrl+F5". -*/ + * Instructions to Build and Run: + * - The Keil multi-project workspace FreeRTOSDemo.uvmpw contains projects for + * both the secure project, and non secure project. + * - Set the FreeRTOSDemo_s project as Active - Right click on + * "Project: FreeRTOSDemo_s" and select "Set as Active Project". + * - Build the FreeRTOSDemo_s project using "Project --> Build" or by pressing + * "F7". + * - Set the FreeRTOSDemo_ns project as Active - Right click on + * "Project: FreeRTOSDemo_ns" and select "Set as Active Project". + * - Build the FreeRTOSDemo_ns project using "Project --> Build" or by + * pressing "F7". + * - Start Debug Session using "Debug -> Start/Stop Debug Session" or by + * pressing "Ctrl+F5". + */ /* Non-Secure main. */ int main( void ) diff --git a/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/ReadMe.txt b/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/ReadMe.txt index 42ab96b7c..d2d6653e8 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/ReadMe.txt +++ b/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/ReadMe.txt @@ -2,7 +2,7 @@ Instructions to Build and Run: - The Keil multi-project workspace FreeRTOSDemo.uvmpw contains projects for both the secure project, and non secure project. - Set the FreeRTOSDemo_s project as Active - Right click on "Project: FreeRTOSDemo_s" and select "Set as Active Project". - Build the FreeRTOSDemo_s project using "Project --> Build" or by pressing F7. - - Set the FreeRTOSDemo_ns project as Active – Right click on "Project: FreeRTOSDemo_ns" and select "Set as Active Project". + - Set the FreeRTOSDemo_ns project as Active - Right click on "Project: FreeRTOSDemo_ns" and select "Set as Active Project". - Build the FreeRTOSDemo_ns project using "Project --> Build" or by pressing "F7". - Start Debug Session using "Debug -> Start/Stop Debug Session" or by pressing "Ctrl+F5". diff --git a/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/Secure/main_s.c b/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/Secure/main_s.c index 72b81131c..98f98ed47 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/Secure/main_s.c +++ b/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/Secure/main_s.c @@ -45,20 +45,20 @@ void BootNonSecure( uint32_t ulNonSecureStartAddress ); /*-----------------------------------------------------------*/ /* - Instructions to Build and Run: - - The Keil multi-project workspace FreeRTOSDemo.uvmpw contains projects for - both the secure project, and non secure project. - - Set the FreeRTOSDemo_s project as Active - Right click on - "Project: FreeRTOSDemo_s" and select "Set as Active Project". - - Build the FreeRTOSDemo_s project using "Project --> Build" or by pressing - F7. - - Set the FreeRTOSDemo_ns project as Active – Right click on - "Project: FreeRTOSDemo_ns" and select "Set as Active Project". - - Build the FreeRTOSDemo_ns project using "Project --> Build" or by - pressing "F7". - - Start Debug Session using "Debug -> Start/Stop Debug Session" or by - pressing "Ctrl+F5". -*/ + * Instructions to Build and Run: + * - The Keil multi-project workspace FreeRTOSDemo.uvmpw contains projects for + * both the secure project, and non secure project. + * - Set the FreeRTOSDemo_s project as Active - Right click on + * "Project: FreeRTOSDemo_s" and select "Set as Active Project". + * - Build the FreeRTOSDemo_s project using "Project --> Build" or by pressing + * "F7". + * - Set the FreeRTOSDemo_ns project as Active - Right click on + * "Project: FreeRTOSDemo_ns" and select "Set as Active Project". + * - Build the FreeRTOSDemo_ns project using "Project --> Build" or by + * pressing "F7". + * - Start Debug Session using "Debug -> Start/Stop Debug Session" or by + * pressing "Ctrl+F5". + */ /* Secure main() */ int main( void ) diff --git a/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/FreeRTOSConfig.h index 55786a5ca..442a67d12 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/FreeRTOSConfig.h @@ -150,7 +150,7 @@ standard names. */ /* Normal assert() semantics without relying on the provision of an assert.h header file. */ -#define configASSERT( x ) if( ( x ) == 0UL ) { taskDISABLE_INTERRUPTS(); for( ;; ); } +#define configASSERT( x ) if( ( x ) == 0UL ) { portDISABLE_INTERRUPTS(); for( ;; ); } /* LED not used at present, so just increment a variable to keep a count of the number of times the LED would otherwise have been toggled. */ diff --git a/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/FreeRTOSConfig.h index 43e01b6f5..e626ad804 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/FreeRTOSConfig.h @@ -152,7 +152,7 @@ standard names. */ /* Normal assert() semantics without relying on the provision of an assert.h header file. */ -#define configASSERT( x ) if( ( x ) == 0UL ) { taskDISABLE_INTERRUPTS(); for( ;; ); } +#define configASSERT( x ) if( ( x ) == 0UL ) { portDISABLE_INTERRUPTS(); for( ;; ); } /* LED not used at present, so just increment a variable to keep a count of the number of times the LED would otherwise have been toggled. */ diff --git a/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/GCC_Specific/sections.ld b/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/GCC_Specific/sections.ld index 5ba471449..723631644 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/GCC_Specific/sections.ld +++ b/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/GCC_Specific/sections.ld @@ -7,7 +7,7 @@ MEMORY /* Variables used by FreeRTOS-MPU. */ _Privileged_Functions_Region_Size = 32K; -_Privileged_Data_Region_Size = 2048; +_Privileged_Data_Region_Size = 4096; __FLASH_segment_start__ = ORIGIN( ROM ); __FLASH_segment_end__ = __FLASH_segment_start__ + LENGTH( ROM ); diff --git a/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/Keil_Specific/RTOSDemo.sct b/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/Keil_Specific/RTOSDemo.sct index ee30fbd50..6e20179f6 100644 --- a/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/Keil_Specific/RTOSDemo.sct +++ b/FreeRTOS/Demo/CORTEX_MPU_Static_Simulator_Keil_GCC/Keil_Specific/RTOSDemo.sct @@ -15,7 +15,7 @@ LR_IROM1 0x00000000 { ; load region size_region RW_IRAM1 0x20000000 { ; RW data *( privileged_data ) } - RW_IRAM2 0x20000800 { ; RW data + RW_IRAM2 0x20001000 { ; RW data .ANY (+RW +ZI) } } diff --git a/FreeRTOS/Source/portable/ARMv8M/ReadMe.txt b/FreeRTOS/Source/portable/ARMv8M/ReadMe.txt index 4ac3bad55..c7ae0dd47 100644 --- a/FreeRTOS/Source/portable/ARMv8M/ReadMe.txt +++ b/FreeRTOS/Source/portable/ARMv8M/ReadMe.txt @@ -6,5 +6,5 @@ FreeRTOS release. If your Cortex-M33 application uses TrustZone then use the files from the FreeRTOS/Source/portable/[compiler]/ARM_CM33 directories. -If you Cortex-M33 application is not going to use TrustZone then use the files -from the FreeRTOS/Source/portable/[compiler]/ARM_CM33_NTZ directories. +If you Cortex-M33 application does not use TrustZone then use the files from +the FreeRTOS/Source/portable/[compiler]/ARM_CM33_NTZ directories. diff --git a/FreeRTOS/Source/portable/ARMv8M/copy_files.py b/FreeRTOS/Source/portable/ARMv8M/copy_files.py index 07e068265..6a932859a 100644 --- a/FreeRTOS/Source/portable/ARMv8M/copy_files.py +++ b/FreeRTOS/Source/portable/ARMv8M/copy_files.py @@ -53,7 +53,7 @@ _NONSECURE_FILE_PATHS_ = [ def copy_files_in_dir(src_abs_path, dst_abs_path): for src_file in os.listdir(src_abs_path): src_file_abs_path = os.path.join(src_abs_path, src_file) - if os.path.isfile(src_file_abs_path): + if os.path.isfile(src_file_abs_path) and src_file != 'ReadMe.txt': if not os.path.exists(dst_abs_path): os.makedirs(dst_abs_path) print('Copying {}...'.format(os.path.basename(src_file_abs_path))) diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/ReadMe.txt b/FreeRTOS/Source/portable/ARMv8M/non_secure/ReadMe.txt index 4ac3bad55..91ad81f8d 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/ReadMe.txt +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/ReadMe.txt @@ -6,5 +6,6 @@ FreeRTOS release. If your Cortex-M33 application uses TrustZone then use the files from the FreeRTOS/Source/portable/[compiler]/ARM_CM33 directories. -If you Cortex-M33 application is not going to use TrustZone then use the files -from the FreeRTOS/Source/portable/[compiler]/ARM_CM33_NTZ directories. +If you Cortex-M33 application does not use TrustZone then use the files from +the FreeRTOS/Source/portable/[compiler]/ARM_CM33_NTZ directories. + diff --git a/FreeRTOS/Source/portable/ARMv8M/non_secure/port.c b/FreeRTOS/Source/portable/ARMv8M/non_secure/port.c index 9d9229050..57c5e23bb 100644 --- a/FreeRTOS/Source/portable/ARMv8M/non_secure/port.c +++ b/FreeRTOS/Source/portable/ARMv8M/non_secure/port.c @@ -64,7 +64,7 @@ * configRUN_FREERTOS_SECURE_ONLY = 0 and configENABLE_TRUSTZONE = 0 */ #if( ( configRUN_FREERTOS_SECURE_ONLY == 1 ) && ( configENABLE_TRUSTZONE == 1 ) ) - #error Trust Zone needs to be disabled in order to run FreeRTOS on the Secure Side. + #error TrustZone needs to be disabled in order to run FreeRTOS on the Secure Side. #endif /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Source/portable/ARMv8M/secure/ReadMe.txt b/FreeRTOS/Source/portable/ARMv8M/secure/ReadMe.txt index 4ac3bad55..c7ae0dd47 100644 --- a/FreeRTOS/Source/portable/ARMv8M/secure/ReadMe.txt +++ b/FreeRTOS/Source/portable/ARMv8M/secure/ReadMe.txt @@ -6,5 +6,5 @@ FreeRTOS release. If your Cortex-M33 application uses TrustZone then use the files from the FreeRTOS/Source/portable/[compiler]/ARM_CM33 directories. -If you Cortex-M33 application is not going to use TrustZone then use the files -from the FreeRTOS/Source/portable/[compiler]/ARM_CM33_NTZ directories. +If you Cortex-M33 application does not use TrustZone then use the files from +the FreeRTOS/Source/portable/[compiler]/ARM_CM33_NTZ directories. diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/port.c index 9d9229050..57c5e23bb 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/port.c @@ -64,7 +64,7 @@ * configRUN_FREERTOS_SECURE_ONLY = 0 and configENABLE_TRUSTZONE = 0 */ #if( ( configRUN_FREERTOS_SECURE_ONLY == 1 ) && ( configENABLE_TRUSTZONE == 1 ) ) - #error Trust Zone needs to be disabled in order to run FreeRTOS on the Secure Side. + #error TrustZone needs to be disabled in order to run FreeRTOS on the Secure Side. #endif /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/port.c b/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/port.c index 9d9229050..57c5e23bb 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/port.c +++ b/FreeRTOS/Source/portable/GCC/ARM_CM33_NTZ/non_secure/port.c @@ -64,7 +64,7 @@ * configRUN_FREERTOS_SECURE_ONLY = 0 and configENABLE_TRUSTZONE = 0 */ #if( ( configRUN_FREERTOS_SECURE_ONLY == 1 ) && ( configENABLE_TRUSTZONE == 1 ) ) - #error Trust Zone needs to be disabled in order to run FreeRTOS on the Secure Side. + #error TrustZone needs to be disabled in order to run FreeRTOS on the Secure Side. #endif /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM33/non_secure/portmacro.h b/FreeRTOS/Source/portable/IAR/ARM_CM33/non_secure/portmacro.h index a5242006e..504257070 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM33/non_secure/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM33/non_secure/portmacro.h @@ -53,6 +53,7 @@ extern "C" { #ifndef configENABLE_TRUSTZONE #error configENABLE_TRUSTZONE must be defined in FreeRTOSConfig.h. Set configENABLE_TRUSTZONE to 1 to enable TrustZone or 0 to disable TrustZone. #endif /* configENABLE_TRUSTZONE */ + /*-----------------------------------------------------------*/ /** diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/port.c b/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/port.c index 9d9229050..57c5e23bb 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/port.c +++ b/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/port.c @@ -64,7 +64,7 @@ * configRUN_FREERTOS_SECURE_ONLY = 0 and configENABLE_TRUSTZONE = 0 */ #if( ( configRUN_FREERTOS_SECURE_ONLY == 1 ) && ( configENABLE_TRUSTZONE == 1 ) ) - #error Trust Zone needs to be disabled in order to run FreeRTOS on the Secure Side. + #error TrustZone needs to be disabled in order to run FreeRTOS on the Secure Side. #endif /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/portmacro.h b/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/portmacro.h index a5242006e..504257070 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM33_NTZ/non_secure/portmacro.h @@ -53,6 +53,7 @@ extern "C" { #ifndef configENABLE_TRUSTZONE #error configENABLE_TRUSTZONE must be defined in FreeRTOSConfig.h. Set configENABLE_TRUSTZONE to 1 to enable TrustZone or 0 to disable TrustZone. #endif /* configENABLE_TRUSTZONE */ + /*-----------------------------------------------------------*/ /** -- 2.39.2