建立工程,成功创建两个虚拟串口

This commit is contained in:
ranchuan
2023-06-21 18:00:56 +08:00
commit 3604192d8f
872 changed files with 428764 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
add_subdirectory (${PROJECT_PROCESSOR})
# vim: expandtab:ts=2:sw=2:smartindent

View File

@@ -0,0 +1,4 @@
collect (PROJECT_LIB_HEADERS atomic.h)
collect (PROJECT_LIB_HEADERS cpu.h)
# vim: expandtab:ts=2:sw=2:smartindent

View 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__ */

View 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__ */

View File

@@ -0,0 +1,4 @@
collect (PROJECT_LIB_HEADERS atomic.h)
collect (PROJECT_LIB_HEADERS cpu.h)
# vim: expandtab:ts=2:sw=2:smartindent

View 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__ */

View 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__ */

View File

@@ -0,0 +1,4 @@
collect (PROJECT_LIB_HEADERS atomic.h)
collect (PROJECT_LIB_HEADERS cpu.h)
# vim: expandtab:ts=2:sw=2:smartindent

View 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__ */

View 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__ */

View File

@@ -0,0 +1,4 @@
collect (PROJECT_LIB_HEADERS atomic.h)
collect (PROJECT_LIB_HEADERS cpu.h)
# vim: expandtab:ts=2:sw=2:smartindent

View 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__ */

View 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__ */