mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 11:59:17 +08:00
OS X: Make param section generation compatible
This commit is contained in:
@@ -53,7 +53,9 @@ src = """
|
|||||||
// This file is autogenerated from paramaters.xml
|
// This file is autogenerated from paramaters.xml
|
||||||
|
|
||||||
static const
|
static const
|
||||||
|
#ifndef __PX4_DARWIN
|
||||||
__attribute__((used, section("__param")))
|
__attribute__((used, section("__param")))
|
||||||
|
#endif
|
||||||
struct px4_parameters_t px4_parameters_impl = {
|
struct px4_parameters_t px4_parameters_impl = {
|
||||||
"""
|
"""
|
||||||
i=0
|
i=0
|
||||||
@@ -79,7 +81,13 @@ src += """
|
|||||||
%d
|
%d
|
||||||
};
|
};
|
||||||
|
|
||||||
extern const struct px4_parameters_t px4_parameters __attribute__((alias("px4_parameters_impl")));
|
#ifdef __PX4_DARWIN
|
||||||
|
#define ___param__attributes ;
|
||||||
|
#else
|
||||||
|
#define ___param__attributes __attribute__((alias("px4_parameters_impl")));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern const struct px4_parameters_t px4_parameters ___param__attributes
|
||||||
""" % i
|
""" % i
|
||||||
|
|
||||||
fp_header.write(header)
|
fp_header.write(header)
|
||||||
|
|||||||
Reference in New Issue
Block a user