Skip to content
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

Merged
merged 4 commits into from
Jun 4, 2015

Conversation

davids5
Copy link
Member

@davids5 davids5 commented Jun 4, 2015

allocation

UPDATE: It is OK to merge including the 8f032a6

See ec1b77c

The recent changes ec1b77c to parms.h affecting alignment

davids5 referenced this pull request Jun 4, 2015
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 &param[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>
@davids5 davids5 changed the title DO NOT MERGE YET - Changes to build on latest uavcan master with FW upload and Node ID Changes to build on latest uavcan master with FW upload and Node ID Jun 4, 2015
@davids5
Copy link
Member Author

davids5 commented Jun 4, 2015

FYI @pavel-kirienko , @LorenzMeier

Memory use on master with this PR

nsh> free
             total       used       free    largest
Mem:        223200     136624      86576      84544
nsh> uavcan start
uavcan: Node ID 1, bitrate 1000000
uavcan: SW version vcs_commit: 0xd720a42a
uavcan: sensor bridge 'gnss' init ok
uavcan: sensor bridge 'mag' init ok
uavcan: sensor bridge 'baro' init ok
nsh> free
             total       used       free    largest
Mem:        223200     175136      48064      43712

@@ -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),
Copy link
Member Author

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is acceptable.

@davids5
Copy link
Member Author

davids5 commented Jun 4, 2015

@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.

@LorenzMeier
Copy link
Member

@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.

@davids5
Copy link
Member Author

davids5 commented Jun 4, 2015

@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?

@LorenzMeier
Copy link
Member

@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.

LorenzMeier added a commit that referenced this pull request Jun 4, 2015
Changes to build on latest uavcan master with FW upload and Node ID
@LorenzMeier LorenzMeier merged commit b1e4623 into master Jun 4, 2015
@LorenzMeier LorenzMeier deleted the uavcan_next branch June 4, 2015 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants