Skip to content

Commit

Permalink
CoreValidation: reworked rtebuild files.
Browse files Browse the repository at this point in the history
  • Loading branch information
GuentherMartin committed Feb 24, 2021
1 parent 1cc6043 commit 0d7e4fa
Show file tree
Hide file tree
Showing 12 changed files with 1,917 additions and 81 deletions.
31 changes: 29 additions & 2 deletions CMSIS/CoreValidation/Tests/bootloader/ac6.rtebuild
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
options:
optimize : [ O1, O2, Oz, Ofast, Os ]
import:
- armclang.rtebuild
- bootloader.rtebuild
targets:
arm:
csettings : [ -fno-rtti, -funsigned-char, -fshort-enums, -fshort-wchar, -mlittle-endian, -gdwarf-3, "-%{optimize}", -ffunction-sections ]
cwarnings : [ -Weverything, -Wno-undef, -Wno-packed, -Wno-reserved-id-macro, -Wno-unused-macros, -Wno-documentation-unknown-command, -Wno-documentation, -Wno-license-management ]
armcm:
toolchain: ARMCC6_MDK
toolchain : ARMCC6_MDK
features : ""
cflags : [ -xc, -std=gnu99, --target=arm-arm-none-eabi, "-mcpu=${cpu}${features}", "-mfloat-abi=${float}", -c, "${csettings}", "${cwarnings}" ]
asmflags : [ "--cpu ${cpu}", --li, -g ]
info : [ --info summarysizes, --map, --load_addr_map_info, --xref, --callgraph, --symbols, --info sizes, --info totals, --info unused, --info veneers, "--list ${builddir}/${targetName}.map" ]
linkflags : [ "--cpu ${cpu}", --strict, --no_remove, --entry Reset_Handler, "--import-cmse-lib-out ${builddir}/cmse.lib", --diag_suppress=L6314, --diag_suppress=L6092w, "${info}" ]
linkscript : "config/core_m/rtebuild.sct"
armcm23ns:
cpu : cortex-m23
float : soft
cflags : [ -mcmse ]
armcm33ns:
cpu : cortex-m33
float : hard
cflags : [ -mcmse ]
armcm35pns:
cpu : cortex-m35p
float : hard
cflags : [ -mcmse ]
armcm55ns:
cpu : cortex-m55
float : hard
cflags : [ -mcmse ]
31 changes: 29 additions & 2 deletions CMSIS/CoreValidation/Tests/bootloader/ac6ltm.rtebuild
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
options:
optimize : [ O1, O2, Oz, Ofast, Os ]
import:
- armclang.rtebuild
- bootloader.rtebuild
targets:
arm:
csettings : [ -fno-rtti, -funsigned-char, -fshort-enums, -fshort-wchar, -mlittle-endian, -gdwarf-3, "-%{optimize}", -ffunction-sections ]
cwarnings : [ -Weverything, -Wno-undef, -Wno-packed, -Wno-reserved-id-macro, -Wno-unused-macros, -Wno-documentation-unknown-command, -Wno-documentation, -Wno-license-management ]
armcm:
toolchain: ARMCC6_LTM_MDK
toolchain : ARMCC6_LTM_MDK
features : ""
cflags : [ -xc, -std=gnu99, --target=arm-arm-none-eabi, "-mcpu=${cpu}${features}", "-mfloat-abi=${float}", -c, "${csettings}", "${cwarnings}" ]
asmflags : [ "--cpu ${cpu}", --li, -g ]
info : [ --info summarysizes, --map, --load_addr_map_info, --xref, --callgraph, --symbols, --info sizes, --info totals, --info unused, --info veneers, "--list ${builddir}/${targetName}.map" ]
linkflags : [ "--cpu ${cpu}", --strict, --no_remove, --entry Reset_Handler, "--import-cmse-lib-out ${builddir}/cmse.lib", --diag_suppress=L6314, --diag_suppress=L6092w, "${info}" ]
linkscript : "config/core_m/rtebuild.sct"
armcm23ns:
cpu : cortex-m23
float : soft
cflags : [ -mcmse ]
armcm33ns:
cpu : cortex-m33
float : hard
cflags : [ -mcmse ]
armcm35pns:
cpu : cortex-m35p
float : hard
cflags : [ -mcmse ]
armcm55ns:
cpu : cortex-m55
float : hard
cflags : [ -mcmse ]
5 changes: 0 additions & 5 deletions CMSIS/CoreValidation/Tests/bootloader/ac6stbl.rtebuild

This file was deleted.

31 changes: 0 additions & 31 deletions CMSIS/CoreValidation/Tests/bootloader/armclang.rtebuild

This file was deleted.

2 changes: 1 addition & 1 deletion CMSIS/CoreValidation/Tests/bootloader/bootloader.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

/* typedef for non-secure callback functions */
typedef void (*funcptr_void) (void) __attribute__((cmse_nonsecure_call));

/* Secure main() */
int main(void) {
funcptr_void NonSecure_ResetHandler;
Expand Down
14 changes: 8 additions & 6 deletions CMSIS/CoreValidation/Tests/bootloader/bootloader.rtebuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,31 @@ import:
- ${home}/.rtebuild/toolchain.rtebuild
targets:
arm:
defines : [ "${device}${dsuffix}=1" ]
defines: [ "${device}${dsuffix}=1" ]
armcm:
extends : arm
extends: arm
include:
- ./config/core_m
- ../../../Core/Include
source:
- ../../../../Device/ARM/${device}/Source/startup_${device}.c
- ../../../../Device/ARM/${device}/Source/system_${device}.c
armcm23ns:
armcm_v8ns:
extends: armcm
armcm23ns:
extends: armcm_v8ns
device : ARMCM23
dsuffix: "_TZ"
armcm33ns:
extends: armcm
extends: armcm_v8ns
device : ARMCM33
dsuffix: "_DSP_FP_TZ"
armcm35pns:
extends: armcm
extends: armcm_v8ns
device : ARMCM35P
dsuffix: "_DSP_FP_TZ"
armcm55ns:
extends: armcm
extends: armcm_v8ns
device : ARMCM55
dsuffix: ""
include:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ __STATIC_INLINE void TZ_SAU_Setup (void)
#if defined (__FPU_USED) && (__FPU_USED == 1U) && \
defined (TZ_FPU_NS_USAGE) && (TZ_FPU_NS_USAGE == 1U)

SCB->NSACR = (SCB->NSACR & ~(SCB_NSACR_CP10_Msk | SCB_NSACR_CP10_Msk)) |
SCB->NSACR = (SCB->NSACR & ~(SCB_NSACR_CP10_Msk | SCB_NSACR_CP11_Msk)) |
((SCB_NSACR_CP10_11_VAL << SCB_NSACR_CP10_Pos) & (SCB_NSACR_CP10_Msk | SCB_NSACR_CP11_Msk));

FPU->FPCCR = (FPU->FPCCR & ~(FPU_FPCCR_TS_Msk | FPU_FPCCR_CLRONRETS_Msk | FPU_FPCCR_CLRONRET_Msk)) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ __STATIC_INLINE void TZ_SAU_Setup (void)
#if defined (__FPU_USED) && (__FPU_USED == 1U) && \
defined (TZ_FPU_NS_USAGE) && (TZ_FPU_NS_USAGE == 1U)

SCB->NSACR = (SCB->NSACR & ~(SCB_NSACR_CP10_Msk | SCB_NSACR_CP10_Msk)) |
SCB->NSACR = (SCB->NSACR & ~(SCB_NSACR_CP10_Msk | SCB_NSACR_CP11_Msk)) |
((SCB_NSACR_CP10_11_VAL << SCB_NSACR_CP10_Pos) & (SCB_NSACR_CP10_Msk | SCB_NSACR_CP11_Msk));

FPU->FPCCR = (FPU->FPCCR & ~(FPU_FPCCR_TS_Msk | FPU_FPCCR_CLRONRETS_Msk | FPU_FPCCR_CLRONRET_Msk)) |
Expand Down
36 changes: 18 additions & 18 deletions CMSIS/CoreValidation/Tests/bootloader/gcc.rtebuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ import:
- bootloader.rtebuild
targets:
arm:
toolchain: GCC
csettings : [ -mlittle-endian, -gdwarf-3, "-%{optimize}", -fmessage-length=0, -ffunction-sections, -fdata-sections ]
cwarnings : [ -Wall, -Wextra, -Wshadow, -Wundef, -Wstrict-prototypes ]
csettings : [ -gdwarf-2, "-%{optimize}", -ffunction-sections, -fdata-sections ]
cwarnings : [ -Wall, -Wextra, -Wshadow, -Wundef, -Wstrict-prototypes, -Wpedantic ]
armcm:
toolchain : GCC
features : ""
cflags : [ -xc, -std=gnu99, -c, "-mcpu=${cpu}${features}", "-mfloat-abi=${float}", "${csettings}", "${cwarnings}" ]
asmflags : [ -c, "-mcpu=${cpu}${features}", "-mfloat-abi=${float}", "${csettings}", "${cwarnings}" ]
linkflags : [ "-mcpu=${cpu}${features}", "-mfloat-abi=${float}", "${csettings}", "${cwarnings}", "-Xlinker -Map=${builddir}/${targetName}.map", --specs=nano.specs, --specs=rdimon.specs ]
cflags : [ "-mcpu=${cpu}${features}", "-mfloat-abi=${float}", "-mfpu=auto", "${csettings}", "${cwarnings}", -c, -mapcs-frame, -std=gnu99 ]
asmflags : [ "-mcpu=${cpu}${features}", "-mfloat-abi=${float}", "-mfpu=auto", "${csettings}", "${cwarnings}", -c ]
linkflags : [ "-mcpu=${cpu}${features}", "-mfloat-abi=${float}", "${csettings}", "${cwarnings}", "-Xlinker -Map=${builddir}/${targetName}.map", --specs=nano.specs, --specs=rdimon.specs ]
linkscript : "config/core_m/rtebuild.ld"
armcm23ns:
cpu : cortex-m23
float : soft
cflags : [ -mcmse ]
cpu : cortex-m23
float : soft
cflags : [ -mcmse ]
armcm33ns:
cpu : cortex-m33
float : hard
cflags : [ -mcmse ]
cpu : cortex-m33
float : hard
cflags : [ -mcmse ]
armcm35pns:
cpu : cortex-m35p
float : hard
cflags : [ -mcmse ]
cpu : cortex-m35p
float : hard
cflags : [ -mcmse ]
armcm55ns:
cpu : cortex-m55
float : hard
cflags : [ -mcmse ]
cpu : cortex-m55
float : hard
cflags : [ -mcmse ]
Loading

0 comments on commit 0d7e4fa

Please sign in to comment.