Custom Bord not showing up in IDE

I'm folloing this video to build a DIY spacemouse. I'm trying the set up the custom bord. I copied the avr folder from C:\Users\Username\AppData\Local\Arduino15\packages\arduino\hardware to C:\Users\Username\Documents\Arduino\spacemouse\joy4_tt_v2 and the sketch is at C:\Users\Username\Documents\Arduino\spacemouse\joy4_tt_v2\joy4_tt_v2.ino. In avr I have C:\Users\Username\Documents\Arduino\spacemouse\joy4_tt_v2\avr\boards.txt changed to be:

leonardo.name=Spacemouse
leonardo.vid.0=0x2341
leonardo.pid.0=0x0036
leonardo.vid.1=0x2341
leonardo.pid.1=0x8036
leonardo.vid.2=0x2A03
leonardo.pid.2=0x0036
leonardo.vid.3=0x2A03
leonardo.pid.3=0x8036

leonardo.upload.tool=avrdude
leonardo.upload.protocol=avr109
leonardo.upload.maximum_size=28672
leonardo.upload.maximum_data_size=2560
leonardo.upload.speed=57600
leonardo.upload.disable_flushing=true
leonardo.upload.use_1200bps_touch=true
leonardo.upload.wait_for_upload_port=true

leonardo.bootloader.tool=avrdude
leonardo.bootloader.low_fuses=0xff
leonardo.bootloader.high_fuses=0xd8
leonardo.bootloader.extended_fuses=0xcb
leonardo.bootloader.file=caterina/Caterina-Leonardo.hex
leonardo.bootloader.unlock_bits=0x3F
leonardo.bootloader.lock_bits=0x2F

leonardo.build.mcu=atmega32u4
leonardo.build.f_cpu=16000000L
leonardo.build.vid=0x256f
leonardo.build.pid=0xc631
leonardo.build.usb_product="Spacemouse"
leonardo.build.board=AVR_LEONARDO
leonardo.build.core=arduino
leonardo.build.variant=leonardo
leonardo.build.extra_flags={build.usb_flags}

Now the custom bord should show up in my IDE as Arduino AVR Boards (in Sketchbook) (spacemous). But it doesn't. The board that I use is a arduino mirco, but this video says that I have to treat it as a Leonardo. Also uploading works only sometimes. Most of the time if takes forever, like it's stuck in a endless loop. Can some one help me out.

Hi @akut.

You didn't follow the instructions from the video correctly:

  • The platform must be installed under the hardware subfolder of the sketchbook folder.
  • You should use avr as the architecture folder name

The installation must have this folder structure:

<sketchbook location>/
├── hardware/
│   ├── spacemouse/
│   │   ├── avr/
│   │   │   ├── boards.txt
│   │   │   ...
│   │   ...
│   ...
...

(where <sketchbook location> is the path of your sketchbook folder e.g., C:\Users\Username\Documents\Arduino\)

Fix the structure and then restart Arduino IDE if it is running (Arduino IDE doesn't recognize changes you make manually to the installed platforms while the IDE is running). After that, you should see the "Spacemouse" board as expected.

I'm going to ask you to provide the full verbose output from a failed upload attempt.


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Uncheck the box next to Show verbose output during: compile in the "Preferences" dialog.
  3. Check the box next to Show verbose output during: ☐ upload.
  4. Click the "OK" button.
    The "Preferences" dialog will close.
  5. Attempt an upload, as you did before.
  6. Wait for the upload to fail.
    If the upload doesn't fail this time, just try again until it does fail.
  7. You will see an "Upload error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
  8. Open a forum reply here by clicking the "Reply" button.
  9. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block icon on toolbar
  10. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the error output from the upload into the code block.
  11. Move the cursor outside of the code block markup before you add any additional text to your reply.
  12. Click the "Reply" button to post the output.

The board shows now up in the IDE, thanks.
Before I got this error message:

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\Felix\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM6
         Using Programmer              : avr109
         Overriding Baud Rate          : 57600
         AVR Part                      : ATmega32U4
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : butterfly
         Description     : Atmel AppNote AVR109 Boot Loader

Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
    Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:
    Device code: 0x44

avrdude: devcode selected: 0x44
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: reading input file "C:\Users\Felix\AppData\Local\Temp\arduino\sketches\1EF4C5193EC627DE42559DA954E8D162/joy4_tt_v2.ino.hex"
avrdude: writing flash (5812 bytes):

Writing | ################################################## | 100% 0.44s

avrdude: 5812 bytes of flash written

avrdude done.  Thank you.

Now I get:

Property 'upload.tool.serial' is undefined

The upload was successful so all is well.

  1. Open your `boards.txt file in any text editor.
  2. Add the following line to the file:
    leonardo.upload.tool.serial=avrdude
    
  3. Save the file.
  4. Restart Arduino IDE.

After that, the "Property 'upload.tool.serial' is undefined" error should no longer occur.

That solved it. Thanks.

You are welcome. I'm glad it is working now.

Regards,
Per

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.