Giter VIP home page Giter VIP logo

Comments (5)

gautierhattenberger avatar gautierhattenberger commented on June 3, 2024

Where is compiled this code, which MCU/CPU ?
Did you try to compile with -DPPRZLINK_UNALIGNED_ACCESS ?

from pprzlink.

podhrmic avatar podhrmic commented on June 3, 2024

I did. I will run some more tests and post a better output info.

from pprzlink.

podhrmic avatar podhrmic commented on June 3, 2024

Update:

The code is from airframes/AGGIEAIR/aggieair_conf.xml and then Minion_RP3 - compiled for Lisa MX (ap target) and for a generix linux machine (hitl/nps). I am running 64-bit Ubuntu 16.04.

With pprzlink 1.0 (and PPRZLINK_UNALIGNED_ACCESS allowed):

DL_COMMANDS_values_length(buf) = 5
DL_COMMANDS_values(buf) = 0x7fea06ec1b53

With pprzlink 2.0 (and PPRZLINK_UNALIGNED_ACCESS enabled):

DL_COMMANDS_values_length(buf) = 5
DL_COMMANDS_values(buf) = (nil)

With PPRZLINK_UNALIGNED_ACCESS=0 I get:

DL_COMMANDS_values_length(buf) = 0
DL_COMMANDS_values(buf) = (nil)

So clearly with pprzlink 2.0 and unaligned access enabled I get the correct values_length, but the array pointer is still NULL.

Also, when I just read and display DL_COMMANDS_values(buf) (and don't try to do memcopy) I get different (but most likely illegal) address every time (instead of NULL).

I am kind of out of ideas - it could be related to the compiler (gcc 5.4) and many other things, but it is also just very weird:-/

from pprzlink.

gautierhattenberger avatar gautierhattenberger commented on June 3, 2024

Just to be sure, could you try with a more recent (GCC7) compiler ?

from pprzlink.

gautierhattenberger avatar gautierhattenberger commented on June 3, 2024

Actually, I was probably doing something wrong in the end. Can you try the fix_array_access branch ?

from pprzlink.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.