Skip to content

Commit 47025b8

Browse files
AlessandroAmeriac
authored andcommitted
uVisor: Define UVISOR_PRESENT based on target labels
Now there is no need any more to specify the UVISOR_PRESENT symbol from the mbed command line tools. By using a target that has UVISOR_SUPPORTED has a label, the uVisor-internal UVISOR_PRESENT symbol will be set automatically.
1 parent 829ca33 commit 47025b8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

features/FEATURE_UVISOR/includes/uvisor-lib/uvisor-lib.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,14 @@
2020
/* This file translates mbed-specific pre-processor symbols into
2121
* uVisor-specific ones. Then the main uvisor-lib.h file is included. */
2222

23-
/* By default uVisor is not there. */
24-
#if !defined(UVISOR_PRESENT)
23+
/* mbed uses UVISOR_SUPPORTED to determine whether the full uVisor binaries
24+
* should be included or not. This symbol maps to the uVisor-internal symbol
25+
* UVISOR_PRESENT. */
26+
/* By default uVisor is not supported. */
27+
#if !defined(FEATURE_UVISOR) || !defined(TARGET_UVISOR_SUPPORTED) || defined(TARGET_UVISOR_UNSUPPORTED)
2528
#define UVISOR_PRESENT 0
29+
#else
30+
#define UVISOR_PRESENT 1
2631
#endif
2732

2833
/* Detect the target using the mbed-specific symbols and determine the MPU

0 commit comments

Comments
 (0)