Skip to content

Align to CMSIS defines for Non-Secure #8025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Secure: 32KiB
* Non-secure: 64KiB
*/
#if defined(__DOMAIN_NS) && __DOMAIN_NS
#if defined(DOMAIN_NS) && DOMAIN_NS

#ifndef MBED_APP_START
#define MBED_APP_START 0x10040000
Expand Down Expand Up @@ -64,14 +64,14 @@

/* Initial/ISR stack size */
#if (! defined(NU_INITIAL_STACK_SIZE))
#if defined(__DOMAIN_NS) && __DOMAIN_NS
#if defined(DOMAIN_NS) && DOMAIN_NS
#define NU_INITIAL_STACK_SIZE 0x800
#else
#define NU_INITIAL_STACK_SIZE 0x800
#endif
#endif

#if defined(__DOMAIN_NS) && __DOMAIN_NS
#if defined(DOMAIN_NS) && DOMAIN_NS

LR_IROM1 MBED_APP_START
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Secure: 32KiB
* Non-secure: 64KiB
*/
#if defined(__DOMAIN_NS) && __DOMAIN_NS
#if defined(DOMAIN_NS) && DOMAIN_NS

#ifndef MBED_APP_START
#define MBED_APP_START 0x10040000
Expand Down Expand Up @@ -64,14 +64,14 @@

/* Initial/ISR stack size */
#if (! defined(NU_INITIAL_STACK_SIZE))
#if defined(__DOMAIN_NS) && __DOMAIN_NS
#if defined(DOMAIN_NS) && DOMAIN_NS
#define NU_INITIAL_STACK_SIZE 0x800
#else
#define NU_INITIAL_STACK_SIZE 0x800
#endif
#endif

#if defined(__DOMAIN_NS) && __DOMAIN_NS
#if defined(DOMAIN_NS) && DOMAIN_NS

LR_IROM1 MBED_APP_START
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Secure: 32KiB
* Non-secure: 64KiB
*/
#if defined(__DOMAIN_NS) && __DOMAIN_NS
#if defined(DOMAIN_NS) && DOMAIN_NS

#ifndef MBED_APP_START
#define MBED_APP_START 0x10040000
Expand Down Expand Up @@ -50,7 +50,7 @@

#endif

#if defined(__DOMAIN_NS) && __DOMAIN_NS
#if defined(DOMAIN_NS) && DOMAIN_NS
StackSize = 0x800;
#else
StackSize = 0x800;
Expand All @@ -71,7 +71,7 @@ StackSize = 0x800;
#endif


#if defined(__DOMAIN_NS) && __DOMAIN_NS
#if defined(DOMAIN_NS) && DOMAIN_NS

MEMORY
{
Expand Down Expand Up @@ -192,7 +192,7 @@ SECTIONS
KEEP(*(.eh_frame*))
} > FLASH

#if (! defined(__DOMAIN_NS)) || (! __DOMAIN_NS)
#if (! defined(DOMAIN_NS)) || (! DOMAIN_NS)
/* Veneer$$CMSE : */
.gnu.sgstubs :
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */

if (isdefinedsymbol(__DOMAIN_NS)) {
if (isdefinedsymbol(DOMAIN_NS)) {

if (! isdefinedsymbol(MBED_APP_START)) {
define symbol MBED_APP_START = 0x10040000;
Expand Down Expand Up @@ -85,7 +85,7 @@ do not initialize { section .noinit };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };

place in ROM_region { readonly };
if (! isdefinedsymbol(__DOMAIN_NS)) {
if (! isdefinedsymbol(DOMAIN_NS)) {
place at address mem:__ICFEDIT_region_NSCROM_start__ { readonly section Veneer$$CMSE };
}
place at start of IRAM_region { block CSTACK };
Expand Down
4 changes: 2 additions & 2 deletions tools/toolchains/arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,9 @@ def __init__(self, target, *args, **kwargs):
build_dir = kwargs['build_dir']
secure_file = join(build_dir, "cmse_lib.o")
self.flags["ld"] += ["--import_cmse_lib_out=%s" % secure_file]
# Add linking time preprocessor macro __DOMAIN_NS
# Add linking time preprocessor macro DOMAIN_NS
if target.core == "Cortex-M23-NS" or self.target.core == "Cortex-M33-NS":
define_string = self.make_ld_define("__DOMAIN_NS", "0x1")
define_string = self.make_ld_define("DOMAIN_NS", "0x1")
self.flags["ld"].append(define_string)

asm_cpu = {
Expand Down
2 changes: 1 addition & 1 deletion tools/toolchains/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def __init__(self, target, notify=None, macros=None, build_profile=None,
"-Wl,--out-implib=%s" % join(build_dir, "cmse_lib.o")
])
elif target.core == "Cortex-M23-NS" or target.core == "Cortex-M33-NS":
self.flags["ld"].append("-D__DOMAIN_NS=1")
self.flags["ld"].append("-DDOMAIN_NS=1")

self.flags["common"] += self.cpu

Expand Down