CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Ardupilot

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: Ardupilot/ardupilot
Path: blob/master/Tools/ardupilotwaf/qurt.py
Views: 1798
1
# encoding: utf-8
2
3
"""
4
Waf tool for QURT build
5
"""
6
7
def build(bld):
8
AARCH64_SDK_DIR = "/opt/aarch64-sdk/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu"
9
AARCH64_CC = AARCH64_SDK_DIR + "/bin/aarch64-linux-gnu-gcc"
10
AARCH64_CXX = AARCH64_SDK_DIR + "/bin/aarch64-linux-gnu-g++"
11
12
STUB_C = bld.srcnode.make_node('libraries/AP_HAL_QURT/ap_host/libslpi-link-api/src/slpi_link_stub.c')
13
STUB_INC = bld.srcnode.make_node('libraries/AP_HAL_QURT/ap_host/libslpi-link-api/inc')
14
STUB_SO = bld.bldnode.find_or_declare('slpi_link_stub.so')
15
MAIN_CPP = bld.srcnode.make_node('libraries/AP_HAL_QURT/ap_host/src/main.cpp')
16
IFADDR_CPP = bld.srcnode.make_node('libraries/AP_HAL_QURT/ap_host/src/getifaddrs.cpp')
17
AP_HOST = bld.bldnode.find_or_declare('ardupilot')
18
19
bld(
20
# build slpi stub library
21
source=[STUB_C],
22
rule="%s -fPIC -o %s -shared -Wl,-soname,libslpi_link.so %s" % (AARCH64_CC, STUB_SO.abspath(), STUB_C.abspath()),
23
target=[STUB_SO],
24
group='dynamic_sources'
25
)
26
27
bld(
28
# build ap_host
29
source=[STUB_SO, MAIN_CPP],
30
rule="%s -I%s %s %s %s -lpthread -o %s" % (AARCH64_CXX, STUB_INC.abspath(),
31
MAIN_CPP.abspath(), IFADDR_CPP.abspath(), STUB_SO.abspath(), AP_HOST.abspath()),
32
target=[AP_HOST],
33
group='dynamic_sources'
34
)
35
36
37