I stuggled a lot this week with Programming my board and thought that rather then having it on the main page I'd make this page so that it was so over whelming on the main page. So here is all teh stages I went through to try and programme my board from week 8 which did not work!!

Programming

Type

  
  $ lsusb 

I got:


2021-03-22 18:38:37.548 system_profiler[8173:55962] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe00002be
2021-03-22 18:38:37.549 system_profiler[8173:55962] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe00002be
2021-03-22 18:38:37.549 system_profiler[8173:55962] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe00002be
2021-03-22 18:38:37.550 system_profiler[8173:55962] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe00002be
Bus 020 Device 001: ID 2109:2817 VIA Labs, Inc. USB2.0 Hub
Bus 020 Device 003: ID 03eb:2141 Atmel Corporation Atmel-ICE CMSIS-DAP  Serial: J42700035302
Bus 020 Device 002: ID 2109:8888 VIA Labs, Inc. USB Billboard Device  Serial: 0000000000000001
Bus 000 Device 001: ID 2109:0817 VIA Labs, Inc. USB3.0 Hub
Bus 128 Device 003: ID 05ac:027a Apple Inc. Apple Internal Keyboard / Trackpad  Serial: FM794470CMVHYMLA7+HMM
Bus 128 Device 000: ID 05ac:8103 Apple Inc. Headset  Serial: 000000000000
Bus 128 Device 000: ID 05ac:8262 Apple Inc. Ambient Light Sensor  Serial: 000000000000
Bus 128 Device 000: ID 05ac:8514 Apple Inc. FaceTime HD Camera (Built-in)  Serial: CC294060E9QK0CH0A
Bus 128 Device 000: ID 05ac:8233 Apple Inc. Apple T2 Controller  Serial: 0000000000000000
Bus 000 Device 001: ID 1d6b:PTLP Linux Foundation USB 3.0 Bus
Bus 000 Device 001: ID 1d6b:CITR Linux Foundation USB 3.1 Bus
Bus 000 Device 000: ID 05ac:027a Apple Inc. Apple T2 Bus

This is good I can see the ‘Bus 020 Device 003: ID 03eb:2141 Atmel Corporation Atmel-ICE CMSIS-DAP Serial: J42700035302’ which means it has reading my Atmel programmer in my USB port.

Now download programmer from class page: here's the link

I am using the ATSAMD21E chip

This is the boot loader form the Fab Academy website here's the link.

Type

    
    $ cd Downloads/

I got:


   
    cd: no such file or directory: Downloads/

So instead I:

Type


    $ cd /Users/communityleader/Downloads
    $ ls

I got:


    edbg-master.zip  					~$N - Risk Assessment Notification.docx
    sam_ba_MT_D21E_rev_B_SAMD21E17A.bin    		~$SO - Risk Assessment - sign off sheet.docx

I can see the 'sam_ba_MT_D21E_rev_B_SAMD21E17A.bin' which is good

This is how to program

program: edbg -b -t target_type -pv -f binary_file

Type


    $ edbg -b -t samd11 -pv -f sam_ba_MT_D21E_rev_B_SAMD21E17A.bin

I got:


   zsh: command not found: edbg

I need to find the edbg-master PATH

Type

 

   $ cd
   $ ls
   "edbg-master"
   $ cd edbg-master
   $ ls
   “edbg“
   $ pwd
   “/Users/communityleader/edbg-master“

Not 100% what this means but you should copy the last line as you will need this in the future we need to put it in our PATH so that terminal remembers it.

Type


   $ printenv PATH

I got:


   "/Users/communityleader/Desktop/KatieFA/katie-isard/edbg-master:/usr/local/bin:/usr/local/avr/bin:/usr/local/bin:/usr/
   bin:/bin:/usr/sbin:/sbin:/usr/local/CrossPack-AVR/bin"

Type


    $ open .bash_profile

I got:

bash_profile

Enter the '/Users/communityleader/edbg-master' - but with the other parts:


   "# 22.03.2021 - adding programmer atmel to terminal wk 8 FA export PATH=“/Users/communityleader/edbg-master:$PATH”"

The # does not get counted - this is just a reminder of what I did.

Save this and leave...

Type

   
    $ source ~/.bash_profile
    $ printenv PATH

I got:


    "/Users/communityleader/edbg-master:/Users/communityleader/Desktop/KatieFA/katie-isard/edbg-master:/usr/local/bin:/
    usr/local/avr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/CrossPack-AVR/bin”"

I think this is showing me that the 'edbg-master' is in the correct area (as you can see I have it twice) - the second one in the line is an old one.

Type


    $ cd
    $ cd /Users/communityleader/Downloads
    $ ls

I got:


  edbg-master.zip 				        ~$N - Risk Assessment Notification.docx
  sam_ba_MT_D21E_rev_B_SAMD21E17A.bin     		~$SO - Risk Assessment - sign off sheet.docx

Type


   $ edbg -b -t samd11 -pv -f sam_ba_MT_D21E_rev_B_SAMD21E17A.bin

I got:


    zsh: command not found: edbg

DOES NOT WORK!

Then typed


   $ edbg -b -t samd21 -pv -f sam_ba_MT_D21E_rev_B_SAMD21E17A.bin

I got:


   zsh: command not found: edbg

Does not like edbg

I'm not sure what to do?

I have compared what my code says to Neils on the Fab Academy page to see if anything is different in his 'edbg -b -t samd21 -pv -f sam_ba_MT_D21E_rev_B_SAMD21E17A.bin'

Neils video

Trying nano .bash_profile

I'm now going to try a few things:

Type


   $ open .bash_profile

Type


    $ nano .bash_profile

Which takes me to here:

nano_batch

Type in the last two lines


    # 22.03.2021 - adding the path to this to connect my atmel programmer to my arduino - wk8 FA - as seen above I have 
    tried before but doing it a different way. 
    export PATH="/Users/communityleader/edbg-master:$PATH"

Press:


     ^x (exits)
     Y (saves)
     And entre (back to terminal)

Type


    $ source ~/.bash_profile
    $ printenv PATH

I got:


  "/Users/communityleader/edbg-master:“/Users/communityleader/edbg-master:/Users/communityleader/Desktop/KatieFA/
  katie-isard/edbg-master:/usr/local/bin:/usr/local/avr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/
  CrossPack-AVR/bin"

Type


  $ cd
  $ cd /Users/communityleader/Downloads 

I got:


  edbg-master.zip					~$N - Risk Assessment Notification.docx
  sam_ba_MT_D21E_rev_B_SAMD21E17A.bin 		~$SO - Risk Assessment - sign off sheet.docx

Type


    $ edbg -b -t samd11 -pv -f sam_ba_MT_D21E_rev_B_SAMD21E17A.bin

I got:


    "zsh: command not found: edbg"

AGAIN!!

Trying nano .bash_profile

I'm now going to try a few things:

Type


    $ open .bash_profile

Type


    $ nano .bash_profile

Which takes me to here:

Type in the last two lines

nano_batch

Type in the last two lines


  # 22.03.2021 - adding the path to this to connect my atmel programmer to my arduino - wk8 FA - as seen above I have
   tried before but doing it a different way. 
   
   export PATH="/Users/communityleader/edbg-master:$PATH"

Press:

Type


  $ source ~/.bash_profile
  $ printenv PATH

I got:


  “/Users/communityleader/edbg-master:“/Users/communityleader/edbg-master:/Users/communityleader/Desktop/KatieFA/
  katie-isard/edbg-master:/usr/local/bin:/usr/local/avr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/
  CrossPack-AVR/bin”

Type


   $ cd
   $ ls

I got:


   Applications	  Documents	 Library	  Pictures	  desktop.pdf
   Autodesk  	  Downloads	 Movies		  PlusX	  	  edbg-master
   Creative        Cloud Files	 Faces.svg	  Music	          Public		iCloud Drive (Archive)
   Desktop	  Fusion 360 CAM	  OneDrive - PlusXSpeedy   300 Induction.pdf    iCloud Drive (Archive) - 1

Type


   $ cd
   $ cd /Users/communityleader/Downloads

I got:


   edbg-master.zip				  ~$N - Risk Assessment Notification.docx
   sam_ba_MT_D21E_rev_B_SAMD21E17A.bin		~$SO - Risk Assessment - sign off sheet.docx

Type


    $ edbg -b -t samd11 -pv -f sam_ba_MT_D21E_rev_B_SAMD21E17A.bin

    zsh: command not found: edbg  

AGAIN! - didn't work!

Trying sudo pico .zshrc

Type


   $ sudo pico .zshrc

nano_sudo

With no "


   export PATH=/Users/communityleader/edbg-master:$PAT

Type


   $ printenv PATH

I got:


  "/Users/communityleader/edbg-master:“/Users/communityleader/edbg-master:“/Users/communityleader/edbg-master:/Users/
  communityleader/Desktop/KatieFA/katie-isard/edbg-master:/usr/local/bin:/usr/local/avr/bin:/usr/local/bin:/usr/bin:/
  bin:/usr/sbin:/sbin:/usr/local/CrossPack-AVR/bin"

Type


    $ cd
    $ cd /Users/communityleader/Downloads
    $ ls

I got:


    edbg-master.zip					~$N - Risk Assessment Notification.docx
    sam_ba_MT_D21E_rev_B_SAMD21E17A.bin		~$SO - Risk Assessment - sign off sheet.docx

Type


   $ edbg -b -t samd11 -pv -f sam_ba_MT_D21E_rev_B_SAMD21E17A.bin

I got:


    zsh: command not found: edbg