Udoo NEO M4 looses program after Ubuntu2.1 upgrade

Discussion in 'UDOO NEO' started by JackSilb, Oct 25, 2016.

  1. JackSilb

    JackSilb Active Member

    Joined:
    Nov 3, 2015
    Messages:
    100
    Likes Received:
    32
    Got it. Giving the rationale for the request would help us understand.
    Nobody else in the Udoo Team to take this one?
    I can help, but I will need instructions.
    How one with the board could do the test you are requesting?
    i.e., "add a "sync" between lines 154 and 155 in udooneo-m4uploader"

    Thanks,
    -Jack
     
  2. Francesco

    Francesco Active Member

    Joined:
    Jun 23, 2015
    Messages:
    220
    Likes Received:
    110
    First you need to find that file. For example run:
    find /usr | grep m4uploader
    in a terminal. The open the file for editing:
    sudo leafpad /path/to/the/file
    Add the sync statement , save the file and reboot using
    sudo reboot

    Then try to reproduce the bug again. Thank you !
     
  3. Cyril BOSSELUT

    Cyril BOSSELUT New Member

    Joined:
    Oct 30, 2015
    Messages:
    23
    Likes Received:
    14
    use "which udooneo-m4uploader" in place of "find /usr | grep m4uploader" (that's shorter)
    you can even find and open it in one line:
    sudo leafpad `which udooneo-m4uploader`
     
    waltervl and JackSilb like this.
  4. JackSilb

    JackSilb Active Member

    Joined:
    Nov 3, 2015
    Messages:
    100
    Likes Received:
    32
    Hey fellows,

    Good news. It seems to work.
    I placed "sync" before the line 155 "fi"

    Uploaded a new code using the Arduino 1.6.12. MacOSX Yosemite.
    Waited ~5s
    Reset NEO
    The Arduino code on the M4 still runs.

    Few more tests
    Even when I press the reset , or remove the power (USB cable), on the Neo as soon as the Arudino IDE show the Done Uploading and M4 Sketch is running, it seems to work.

    Good job!

    Now to the Udoo Team to document this and hopefully an Ubuntu 2.1.1 release...

    Thanks,
    -Jack
     
    Last edited: Oct 30, 2016
    waltervl likes this.
  5. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    @Francesco I tested it too with the added sync in /usr/bin/udooneo-m4uploader and that seems to do the trick! No more empty m4last.fw files and running last compiled file every time after a hard reset. It also worked now for internal programming.
     
  6. Francesco

    Francesco Active Member

    Joined:
    Jun 23, 2015
    Messages:
    220
    Likes Received:
    110
    Thank you guys for the all tests you did! I have fixed it in git. On Wednesday when I'll be back we will release it on the apt-get repo.
     
    Cyril BOSSELUT and waltervl like this.
  7. Francesco

    Francesco Active Member

    Joined:
    Jun 23, 2015
    Messages:
    220
    Likes Received:
    110
    `apt update && apt dist-upgrade` will apply the fix.
     
  8. Cyril BOSSELUT

    Cyril BOSSELUT New Member

    Joined:
    Oct 30, 2015
    Messages:
    23
    Likes Received:
    14
    I've found that if the script takes time to start the mqx_upload_on_m4SoloX returns an error (even if the script is working correctly):

    UDOONeo - Waiting M4 Run, m4TraceFlags: 0000027F
    UDOONeo - Waiting M4 Run, m4TraceFlags: 0000027F
    UDOONeo - Waiting M4 Run, m4TraceFlags: 0000027F
    UDOONeo - Waiting M4 Run, m4TraceFlags: 0000027F
    UDOONeo - Failed to Start M4 sketch: reboot system !

    as the copy of the binary in /var/opt/m4/m4last.fw is done after flashing this is never called. I've moved the copy part before flashing and now all work fine (as the script has passed compilation i don't care about flashing errors).
     
  9. JackSilb

    JackSilb Active Member

    Joined:
    Nov 3, 2015
    Messages:
    100
    Likes Received:
    32
    I did the udo apt-get dist-upgrade.
    The program of M4 is not being lost after a reboot. Assuming the the correct files are being replaced, this is done.
    Will a new Ubuntu release come so fresh installs work out of the box?

    Thanks,
    -Jack
     
  10. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
  11. JackSilb

    JackSilb Active Member

    Joined:
    Nov 3, 2015
    Messages:
    100
    Likes Received:
    32
    Cool.
    I should be able to give it a try during the weekend.

    Thanks,
    -Jack
     
    Andrea Rovai likes this.
  12. Gorgo

    Gorgo UDOOer

    Joined:
    Nov 9, 2016
    Messages:
    159
    Likes Received:
    17
  13. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    Updated. Thanks for pointing it out.
     

Share This Page