equal
deleted
inserted
replaced
1 from target_xenomai import * |
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 """ |
|
8 return self.PuginsRootInstance.BeremizRoot.getTargetType().getcontent()["value"].getXenoConfig() |
|
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: |
|
16 self.logger.write_error("Unable to get Xenomai's LDFLAGS\n") |
|
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: |
|
27 self.logger.write_error("Unable to get Xenomai's CFLAGS\n") |
|
28 xeno_cflags = result.strip() |
|
29 |
|
30 return toolchain_gcc.getBuilderCFLAGS(self) + [xeno_cflags] |
|
31 |