建立工程,成功创建两个虚拟串口
This commit is contained in:
3
source/OpenAMP/libmetal/lib/processor/CMakeLists.txt
Normal file
3
source/OpenAMP/libmetal/lib/processor/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
add_subdirectory (${PROJECT_PROCESSOR})
|
||||
|
||||
# vim: expandtab:ts=2:sw=2:smartindent
|
@@ -0,0 +1,4 @@
|
||||
collect (PROJECT_LIB_HEADERS atomic.h)
|
||||
collect (PROJECT_LIB_HEADERS cpu.h)
|
||||
|
||||
# vim: expandtab:ts=2:sw=2:smartindent
|
15
source/OpenAMP/libmetal/lib/processor/aarch64/atomic.h
Normal file
15
source/OpenAMP/libmetal/lib/processor/aarch64/atomic.h
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Xilinx Inc. and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file gcc/atomic.h
|
||||
* @brief GCC specific atomic primitives for libmetal.
|
||||
*/
|
||||
|
||||
#ifndef __METAL_AARCH64_ATOMIC__H__
|
||||
#define __METAL_AARCH64_ATOMIC__H__
|
||||
|
||||
#endif /* __METAL_ARM_ATOMIC__H__ */
|
17
source/OpenAMP/libmetal/lib/processor/aarch64/cpu.h
Normal file
17
source/OpenAMP/libmetal/lib/processor/aarch64/cpu.h
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Xilinx Inc. and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file cpu.h
|
||||
* @brief CPU specific primatives
|
||||
*/
|
||||
|
||||
#ifndef __METAL_AARCH64_CPU__H__
|
||||
#define __METAL_AARCH64_CPU__H__
|
||||
|
||||
#define metal_cpu_yield() asm volatile("yield")
|
||||
|
||||
#endif /* __METAL_AARCH64_CPU__H__ */
|
4
source/OpenAMP/libmetal/lib/processor/arm/CMakeLists.txt
Normal file
4
source/OpenAMP/libmetal/lib/processor/arm/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
collect (PROJECT_LIB_HEADERS atomic.h)
|
||||
collect (PROJECT_LIB_HEADERS cpu.h)
|
||||
|
||||
# vim: expandtab:ts=2:sw=2:smartindent
|
15
source/OpenAMP/libmetal/lib/processor/arm/atomic.h
Normal file
15
source/OpenAMP/libmetal/lib/processor/arm/atomic.h
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Xilinx Inc. and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file arm/atomic.h
|
||||
* @brief ARM specific atomic primitives for libmetal.
|
||||
*/
|
||||
|
||||
#ifndef __METAL_ARM_ATOMIC__H__
|
||||
#define __METAL_ARM_ATOMIC__H__
|
||||
|
||||
#endif /* __METAL_ARM_ATOMIC__H__ */
|
17
source/OpenAMP/libmetal/lib/processor/arm/cpu.h
Normal file
17
source/OpenAMP/libmetal/lib/processor/arm/cpu.h
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Xilinx Inc. and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file cpu.h
|
||||
* @brief CPU specific primatives
|
||||
*/
|
||||
|
||||
#ifndef __METAL_ARM_CPU__H__
|
||||
#define __METAL_ARM_CPU__H__
|
||||
|
||||
#define metal_cpu_yield()
|
||||
|
||||
#endif /* __METAL_ARM_CPU__H__ */
|
@@ -0,0 +1,4 @@
|
||||
collect (PROJECT_LIB_HEADERS atomic.h)
|
||||
collect (PROJECT_LIB_HEADERS cpu.h)
|
||||
|
||||
# vim: expandtab:ts=2:sw=2:smartindent
|
15
source/OpenAMP/libmetal/lib/processor/microblaze/atomic.h
Normal file
15
source/OpenAMP/libmetal/lib/processor/microblaze/atomic.h
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Xilinx Inc. and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file microblaze/atomic.h
|
||||
* @brief Microblaze specific atomic primitives for libmetal
|
||||
*/
|
||||
|
||||
#ifndef __METAL_MICROBLAZE_ATOMIC__H__
|
||||
#define __METAL_MICROBLAZE_ATOMIC__H__
|
||||
|
||||
#endif /* __METAL_MICROBLAZE_ATOMIC__H__ */
|
20
source/OpenAMP/libmetal/lib/processor/microblaze/cpu.h
Normal file
20
source/OpenAMP/libmetal/lib/processor/microblaze/cpu.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Xilinx Inc. and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file cpu.h
|
||||
* @brief CPU specific primatives on microblaze platform.
|
||||
*/
|
||||
|
||||
#ifndef __METAL_MICROBLAZE__H__
|
||||
#define __METAL_MICROBLAZE__H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <metal/atomic.h>
|
||||
|
||||
#define metal_cpu_yield()
|
||||
|
||||
#endif /* __METAL_MICROBLAZE__H__ */
|
@@ -0,0 +1,4 @@
|
||||
collect (PROJECT_LIB_HEADERS atomic.h)
|
||||
collect (PROJECT_LIB_HEADERS cpu.h)
|
||||
|
||||
# vim: expandtab:ts=2:sw=2:smartindent
|
16
source/OpenAMP/libmetal/lib/processor/x86_64/atomic.h
Normal file
16
source/OpenAMP/libmetal/lib/processor/x86_64/atomic.h
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Xilinx Inc. and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file gcc/atomic.h
|
||||
* @brief GCC specific atomic primitives for libmetal.
|
||||
*/
|
||||
|
||||
#ifndef __METAL_X86_64_ATOMIC__H__
|
||||
#define __METAL_X86_64_ATOMIC__H__
|
||||
|
||||
|
||||
#endif /* __METAL_X86_64_ATOMIC__H__ */
|
17
source/OpenAMP/libmetal/lib/processor/x86_64/cpu.h
Normal file
17
source/OpenAMP/libmetal/lib/processor/x86_64/cpu.h
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Xilinx Inc. and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
/*
|
||||
* @file cpu.h
|
||||
* @brief CPU specific primatives
|
||||
*/
|
||||
|
||||
#ifndef __METAL_X86_64_CPU__H__
|
||||
#define __METAL_X86_64_CPU__H__
|
||||
|
||||
#define metal_cpu_yield() asm volatile("rep; nop")
|
||||
|
||||
#endif /* __METAL_X86_64_CPU__H__ */
|
Reference in New Issue
Block a user