mirror of https://github.com/ARMmbed/mbed-os.git
Copy memory management code over from uVisor
Add the memory management code from uVisor to a shared location that is suitable for both supported and unsupported use. To do this, we copy all the RTX-specific files from the RTX folders in uVisor. Note that the page allocator code is so identical between uVisor supported and unsupported mode that we can copy the file as-is from uVisor for use on unsupported targets. This commit performs that copying, to a file called page_allocator.c_inc, which is included from unsupported_page_allocator.c only for targets where uVisor is not present.pull/1753/head
parent
10d9c2fa97
commit
55f464da27
|
@ -28,6 +28,8 @@ TARGET_PREFIX:=../
|
|||
TARGET_SUPPORTED:=$(TARGET_PREFIX)targets/TARGET_UVISOR_SUPPORTED
|
||||
TARGET_UNSUPPORTED:=$(TARGET_PREFIX)targets/TARGET_UVISOR_UNSUPPORTED
|
||||
TARGET_INC:=$(TARGET_PREFIX)includes/uvisor/api
|
||||
TARGET_LIB_SRC:=$(TARGET_PREFIX)source
|
||||
TARGET_LIB_INC:=$(TARGET_PREFIX)includes/uvisor-lib
|
||||
|
||||
# uVisor source directory - hidden from mbed via TARGET_IGNORE
|
||||
UVISOR_GIT_URL:=https://github.com/ARMmbed/uvisor
|
||||
|
@ -60,11 +62,18 @@ rsync:
|
|||
rm -rf $(TARGET_INC)
|
||||
mkdir -p $(TARGET_INC)
|
||||
rsync -a --delete $(UVISOR_API)/inc $(TARGET_INC)
|
||||
rsync -a --delete $(UVISOR_API)/rtx/inc/ $(TARGET_LIB_INC)/rtx
|
||||
#
|
||||
# Copying uVisor unsupported sources to unsupported target source...
|
||||
mkdir -p $(TARGET_UNSUPPORTED)
|
||||
cp $(UVISOR_API)/src/unsupported.c $(TARGET_UNSUPPORTED)/
|
||||
#
|
||||
# Copying uVisor shared sources to mbed source...
|
||||
rm -rf $(TARGET_LIB_SRC)
|
||||
mkdir -p $(TARGET_LIB_SRC)
|
||||
cp $(UVISOR_DIR)/core/system/src/page_allocator.c $(TARGET_LIB_SRC)/page_allocator.c_inc
|
||||
rsync -a --delete $(UVISOR_API)/rtx/src/ $(TARGET_LIB_SRC)/rtx
|
||||
#
|
||||
# Copying licenses
|
||||
cp $(UVISOR_DIR)/LICENSE* $(TARGET_SUPPORTED)
|
||||
|
||||
|
|
|
@ -35,5 +35,8 @@
|
|||
|
||||
/* The uVisor API main header file will use the above definitions. */
|
||||
#include "uvisor/api/inc/uvisor-lib.h"
|
||||
#include "uvisor-lib/rtx/process_malloc.h"
|
||||
#include "uvisor-lib/rtx/rtx_box_index.h"
|
||||
#include "uvisor-lib/rtx/secure_allocator.h"
|
||||
|
||||
#endif /* __UVISOR_LIB_UVISOR_LIB_H__ */
|
||||
|
|
Loading…
Reference in New Issue