yNos (Customer) asked a question.

Has anyone been able to get a arduino-cli working on a raspberry pi?

We have a few remote sites with a raspi running node-red pulling data off a P1AM for data acquisition . I'd really like to be able to push new code to the sites w/o going out to them. Bonus points for not having to run a USB cable. So far I've tried a few things from here

Here is the output from the core install:

  1. $ arduino-cli core install P1AM-100:samd
  2. Tool arduino:CMSIS@4.5.0 already installed
  3. Downloading packages...
  4. Error during install: Error downloading tool arduino:arm-none-eabi-gcc@4.8.3-2014q1: no versions available for the current OS, try contacting packages@arduino.cc
  5. me@site1:~/ $

I was able to install the build utils outside of it:

  1. me@site1:~ $ arm-none-eabi-gcc --version
  2. arm-none-eabi-gcc (15:8-2019-q3-1+b1) 8.3.1 20190703 (release) [gcc-8-branch revision 273027]
  3. Copyright (C) 2018 Free Software Foundation, Inc.
  4. This is free software; see the source for copying conditions. There is NO
  5. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  6.  
  7. me@site1:~ $ arm-none-eabi-g++ --version
  8. arm-none-eabi-g++ (15:8-2019-q3-1+b1) 8.3.1 20190703 (release) [gcc-8-branch revision 273027]
  9. Copyright (C) 2018 Free Software Foundation, Inc.
  10. This is free software; see the source for copying conditions. There is NO
  11. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12.  

I've even got bossac working:

  1. me@site1:~ $ bossac -h
  2. Usage: bossac [OPTION...] [FILE]
  3. Basic Open Source SAM-BA Application (BOSSA) Version 1.7.0
  4. Flash programmer for Atmel SAM devices.
  5. .....

Any suggestions would be great.

 

 


  • FACTS_AdamC (AutomationDirect)

    Looking at that error I believe it's still trying to install the normal P1AM-100 platform using the cached json. You'll want to go into your .arduino15 folder and delete the "package_productivity-P1AM-boardmanagermodule_index.json" and try again.

     

     

    Selected as Best
  • yNos (Customer)

    1. me@site2:~ $ arduino-cli core update-index --additional-urls https://gist.githubusercontent.com/AdamCummick/93604debae8bac40c2af58470ad01dd6/raw/4ad7c0eaaf03372f08633a4a89cde9d99a816da2/p1am_pi.json
    2. Downloading index: package_index.tar.bz2 downloaded
    3. Downloading index: p1am_pi.json downloaded me@site2:~ $ arduino-cli core install P1AM-100:samd
    4. Tool arduino:CMSIS@4.5.0 already installed
    5. Downloading packages...
    6. Error during install: Error downloading tool arduino:arm-none-eabi-gcc@4.8.3-2014q1: no versions available for the current OS, try contacting packages@arduino.cc
    7. br@site2:~ $

     

    No such luck. I was however able to build it on my machine here, then use arduinoOTA to push it up.

     

    1. me@site2:~ $ ~/.arduino15/packages/arduino/tools/arduinoOTA/1.2.1/bin/arduinoOTA -address 192.168.24.47 -port 65280 -username arduino -password trollololol -sketch P1AM.ino.P1AM-100.bin -upload /sketch -b
    2. Connecting to board ... done
    3. Uploading sketch ... done
    4. Flashing sketch ... done
    5. OK
    6. Sketch uploaded successfully
    7. me@site2:~

     

    It gets the job done, but feels hamfisted.

     

    Expand Post
    • FACTS_AdamC (AutomationDirect)

      Looking at that error I believe it's still trying to install the normal P1AM-100 platform using the cached json. You'll want to go into your .arduino15 folder and delete the "package_productivity-P1AM-boardmanagermodule_index.json" and try again.

       

       

      Selected as Best
      • yNos (Customer)

        That seems to have worked!

        1. me@site2:~ $ arduino-cli core update-index --additional-urls https://gist.githubusercontent.com/AdamCummick/93604debae8bac40c2af58470ad01dd6/raw/4ad7c0eaaf03372f08633a4a89cde9d99a816da2/p1am_pi.json
        2. Downloading index: package_index.tar.bz2 downloaded
        3. Downloading index: p1am_pi.json downloaded
        4. me@site2:~ $ arduino-cli core install P1AM-100:samd --additional-urls https://gist.githubusercontent.com/AdamCummick/93604debae8bac40c2af58470ad01dd6/raw/4ad7c0eaaf03372f08633a4a89cde9d99a816da2/p1am_pi.json
        5. Downloading packages...
        6. arduino:arm-none-eabi-gcc@7-2017q4 downloaded
        7. arduino:bossac@1.7.0-arduino3 downloaded
        8. arduino:openocd@0.10.0-arduino7 downloaded
        9. arduino:CMSIS@4.5.0 downloaded
        10. arduino:CMSIS-Atmel@1.2.0 downloaded
        11. arduino:arduinoOTA@1.2.1 downloaded
        12. P1AM-100:samd@1.6.21 downloaded
        13. Installing arduino:arm-none-eabi-gcc@7-2017q4...
        14. Configuring tool....
        15. arduino:arm-none-eabi-gcc@7-2017q4 installed
        16. Installing arduino:bossac@1.7.0-arduino3...
        17. Configuring tool....
        18. arduino:bossac@1.7.0-arduino3 installed
        19. Installing arduino:openocd@0.10.0-arduino7...
        20. Configuring tool....
        21. arduino:openocd@0.10.0-arduino7 installed
        22. Installing arduino:CMSIS@4.5.0...
        23. Configuring tool....
        24. arduino:CMSIS@4.5.0 installed
        25. Installing arduino:CMSIS-Atmel@1.2.0...
        26. Configuring tool....
        27. arduino:CMSIS-Atmel@1.2.0 installed
        28. Installing arduino:arduinoOTA@1.2.1...
        29. Configuring tool....
        30. arduino:arduinoOTA@1.2.1 installed
        31. Installing platform P1AM-100:samd@1.6.21...
        32. Configuring platform....
        33. Platform P1AM-100:samd@1.6.21 installed
        34. me@site2:~ $

        Thanks for your help!

        Expand Post
      • yNos (Customer)

        I may have spoke too soon..

        1. me@site2:~/src/controllers/P1AM $ arduino-cli compile -bP1AM-100:samd:P1AM-100_native
        2. In file included from /tmp/arduino/sketches/7EE7D9CBFF7F08F12EF8B8069666DBA1/sketch/P1AM.ino.cpp:1:
        3. /home/me/.arduino15/packages/P1AM-100/hardware/samd/1.6.21/cores/arduino/Arduino.h:48:10: fatal error: sam.h: No such file or directory
        4. #include "sam.h"
        5. ^~~~~~~
        6. compilation terminated.
        7.  
        8.  
        9. Used platform Version Path
        10. P1AM-100:samd 1.6.21 /home/br/.arduino15/packages/P1AM-100/hardware/samd/1.6.21
        11. Error during build: exit status 1
        12. br@site2:~/src/controllers/P1AM $ uname -a
        13. Linux site2 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
        14. me@site2:~/src/controllers/P1AM $

        The same repo builds on an ubuntu desktop.

        1. plantoperator@s2-desktop:~/src/controllers/P1AM$ arduino-cli compile -bP1AM-100:samd:P1AM-100_native
        2. Sketch uses 98560 bytes (37%) of program storage space. Maximum is 262144 bytes.
        3.  
        4. Used library Version Path
        5. SPI 1.0 /home/plantoperator/.arduino15/packages/P1AM-100/hardware/samd/1.6.21/libraries/SPI
        6. Ethernet 2.0.2 /home/plantoperator/Arduino/libraries/Ethernet
        7. ArduinoOTA 1.0.12 /home/plantoperator/Arduino/libraries/ArduinoOTA
        8. P1AM 1.0.6 /home/plantoperator/Arduino/libraries/P1AM
        9. ArduinoJson 6.21.3 /home/plantoperator/Arduino/libraries/ArduinoJson
        10. SD 1.2.4 /home/plantoperator/Arduino/libraries/SD
        11. ArcPID 0.0.3 /home/plantoperator/Arduino/libraries/ArcPID
        12. SimpleFTPServer 2.1.7 /home/plantoperator/Arduino/libraries/SimpleFTPServer
        13. ArduinoRS485 1.0.5 /home/plantoperator/Arduino/libraries/ArduinoRS485
        14. ArduinoModbus 1.0.9 /home/plantoperator/Arduino/libraries/ArduinoModbus
        15.  
        16. Used platform Version Path
        17. P1AM-100:samd 1.6.21 /home/plantoperator/.arduino15/packages/P1AM-100/hardware/samd/1.6.21
        18. plantoperator@s2-desktop:~/src/controllers/P1AM$ uname -a
        19. Linux s2-desktop 6.2.0-36-generic #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
        20. plantoperator@s2-desktop:~/src/controllers/P1AM$

         

        Expand Post