Skip to content

Commit 58d0861

Browse files
committed
added option to build rpc library. closes ARMmbed#1426
1 parent 77e2316 commit 58d0861

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

workspace_tools/build.py

+8
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@
5050
default=False,
5151
help="Compile the rtos")
5252

53+
parser.add_option("--rpc",
54+
action="store_true",
55+
dest="rpc",
56+
default=False,
57+
help="Compile the rpc library")
58+
5359
parser.add_option("-e", "--eth",
5460
action="store_true", dest="eth",
5561
default=False,
@@ -169,6 +175,8 @@
169175
# Additional Libraries
170176
if options.rtos:
171177
libraries.extend(["rtx", "rtos"])
178+
if options.rpc:
179+
libraries.extend(["rpc"])
172180
if options.eth:
173181
libraries.append("eth")
174182
if options.usb:

workspace_tools/libraries.py

+8
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@
3434
"dependencies": [MBED_LIBRARIES, MBED_RTX],
3535
},
3636

37+
# RPC
38+
{
39+
"id": "rpc",
40+
"source_dir": MBED_RPC,
41+
"build_dir": RPC_LIBRARY,
42+
"dependencies": [MBED_LIBRARIES],
43+
},
44+
3745
# USB Device libraries
3846
{
3947
"id": "usb",

workspace_tools/make.py

+6
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from workspace_tools.utils import args_error
3131
from workspace_tools.paths import BUILD_DIR
3232
from workspace_tools.paths import RTOS_LIBRARIES
33+
from workspace_tools.paths import RPC_LIBRARY
3334
from workspace_tools.paths import ETH_LIBRARY
3435
from workspace_tools.paths import USB_HOST_LIBRARIES, USB_LIBRARIES
3536
from workspace_tools.paths import DSP_LIBRARIES
@@ -113,6 +114,10 @@
113114
action="store_true", dest="rtos",
114115
default=False, help="Link with RTOS library")
115116

117+
parser.add_option("--rpc",
118+
action="store_true", dest="rpc",
119+
default=False, help="Link with RPC library")
120+
116121
parser.add_option("--eth",
117122
action="store_true", dest="eth",
118123
default=False,
@@ -218,6 +223,7 @@
218223

219224
# Linking with extra libraries
220225
if options.rtos: test.dependencies.append(RTOS_LIBRARIES)
226+
if options.rpc: test.dependencies.append(RPC_LIBRARY)
221227
if options.eth: test.dependencies.append(ETH_LIBRARY)
222228
if options.usb_host: test.dependencies.append(USB_HOST_LIBRARIES)
223229
if options.usb: test.dependencies.append(USB_LIBRARIES)

workspace_tools/paths.py

+2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
# mbed RPC
4848
MBED_RPC = join(LIB_DIR, "rpc")
4949

50+
RPC_LIBRARY = join(BUILD_DIR, "rpc")
51+
5052
# mbed RTOS
5153
RTOS = join(LIB_DIR, "rtos")
5254
MBED_RTX = join(RTOS, "rtx")

0 commit comments

Comments
 (0)