-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes to build on latest uavcan master with FW upload and Node ID #2270
Conversation
GCC 4.8 and higher implement 16 byte static data alignment on 64-bit. This means that the 24-byte param_info_s variables are 16 byte aligned by GCC and that messes up the assumption that the address of the second parameter is at ¶m[0]+sizeof(param[0]). When compiled with clang it is true, with gcc is is not true. See https://llvm.org/bugs/show_bug.cgi?format=multiple&id=18006 The fix is needed for GCC >=4.8 only. Clang works fine without this. Added __attribute__((aligned(16))) to first member of param_info_s. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
FYI @pavel-kirienko , @LorenzMeier Memory use on master with this PR
|
@@ -42,9 +42,11 @@ const char *const UavcanBarometerBridge::NAME = "baro"; | |||
|
|||
UavcanBarometerBridge::UavcanBarometerBridge(uavcan::INode& node) : | |||
UavcanCDevSensorBridgeBase("uavcan_baro", "/dev/uavcan/baro", BARO_BASE_DEVICE_PATH, ORB_ID(sensor_baro)), | |||
_sub_air_data(node), | |||
_sub_air_pressure_data(node), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LorenzMeier - this is the result of StaticAirData being broken up into StaticTemperature and StaticPressure.
I am using last_temperature (below) to merge the call back data into the report. Is this acceptable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is acceptable.
@LorenzMeier Since @mcharleb submitted a pr for the params fix - I have removed 8f032a6 I have tested the the ability to bootload the px4cannode-v1 and it it works fine. So this it ready to go from my perspective. |
@davids5 It looks a bit suspicious like whitespace changes - did you do these on purpose? At any rate please run Tools/fix_code_style.sh and if this was not intended, please make sure to cross-check your editor settings. Unless of course the whitespace changes are all due to running astyle, in which case they would be welcome. |
@LorenzMeier I just re-ran the Astyle fix, unfortunately editor is configured for nuttx coding style. Do you know of a tool or plugin that will switch code styles in eclipse per directory? |
@davids5 @pavel-kirienko I tried to pull this onto the release branch, but ran into a ton of conflicts. I'm not sure how to proceed to get it there - merging this into master now. |
Changes to build on latest uavcan master with FW upload and Node ID
allocation
UPDATE: It is OK to merge including the 8f032a6
See ec1b77c
The recent changes ec1b77c to parms.h affecting alignment