321
|
1 |
from .. import toolchain_gcc
|
|
2 |
from wxPopen import ProcessLogger
|
|
3 |
|
|
4 |
class Xenomai_target(toolchain_gcc):
|
|
5 |
extension = ".so"
|
|
6 |
def getXenoConfig(self):
|
|
7 |
""" Get xeno-config from target parameters """
|
329
|
8 |
return self.PluginsRootInstance.BeremizRoot.getTargetType().getcontent()["value"].getXenoConfig()
|
321
|
9 |
|
|
10 |
def getBuilderLDFLAGS(self):
|
|
11 |
# get xeno-config from target parameters
|
|
12 |
xeno_config = self.getXenoConfig()
|
|
13 |
|
|
14 |
status, result, err_result = ProcessLogger(self.logger, xeno_config + " --xeno-ldflags", no_stdout=True).spin()
|
|
15 |
if status:
|
361
|
16 |
self.logger.write_error(_("Unable to get Xenomai's LDFLAGS\n"))
|
321
|
17 |
xeno_ldlags = result.strip()
|
|
18 |
|
|
19 |
return toolchain_gcc.getBuilderLDFLAGS(self) + [xeno_ldlags, "-shared", "-lnative"]
|
|
20 |
|
|
21 |
def getBuilderCFLAGS(self):
|
|
22 |
# get xeno-config from target parameters
|
|
23 |
xeno_config = self.getXenoConfig()
|
|
24 |
|
|
25 |
status, result, err_result = ProcessLogger(self.logger, xeno_config + " --xeno-cflags", no_stdout=True).spin()
|
|
26 |
if status:
|
361
|
27 |
self.logger.write_error(_("Unable to get Xenomai's CFLAGS\n"))
|
321
|
28 |
xeno_cflags = result.strip()
|
|
29 |
|
|
30 |
return toolchain_gcc.getBuilderCFLAGS(self) + [xeno_cflags]
|
|
31 |
|