SOLVED - How to add an additional board variant in 1.6.3

Hello guys

Im new and have spent the last hour trying to figure this out without any luck.

I have just downloaded 1.6.3 after having 1.6.0. (I could never get my firmware file to compile on 1.6.0 so I was hoping updating to 1.6.3. would fix it)

I am using an Arduino Due with a RADDS 1.4 shield for controlling a delta 3d printer. I am running Repetier 0.92 firmware. This came pre installed from the kickstarter project I got the printer from. I am wanting to make some firmware changes to aid the calibration of the printer however I could not get the firmware to compile during the upload phase.

Now with installing 1.6.3 my problem is that I have to add a board variant to the installation directory called ‘Ardunio_Due_Repetier’ this is to allow me to compile the firmware and enable a feature within it called ‘Watchdog’. This allows the printer to reset incase of a failure to prevent overheating and fire, therefore its pretty important that its installed.

The read me file in the firmware is as follows:

The Due implementation of the default arduino disables the watchdog feature at
startup. Due to ARM limitation, it is not possible to enable a watchdog once it
is disabled. For that reason, the watchdog feature does not work with the default
Arduino installation. To solve the problem copy the modified version as follows:
boards.txt needs to go to /hardware/arduino/sam
It contains the 2 original entries plus a new one called Arduino Due for Repetier.
If you have modifed the boards.txt before, add only the last entry in boards.txt.
Copy the folder arduino_due_repetier to
/hardware/arduino/sam/variants
After a restart you have a new board in your list. Use it only if you
compile with watchdog feature enabled (which is the preferred way for increased safety)

However within 1.6.3 I cannot find the ‘sam’ folder within Contents/java/hardware/arduino/
There is only a …/avr folder which has the non ARM boards in it.

Where do I put the boards.txt file and the ‘arduino_due_repetier’ folder as mentioned in the Read_me description above?

Please help.

Ps. Im using Mac OSX however I have access to Vista as well.

As feedback comes in, we are evolving an FAQ, in particular https://github.com/arduino/Arduino/wiki/Boards-Manager-FAQ#where-are-installed-cores-located

I strongly suggest you to create a new core, based on SAM one. In boards.txt you can say your new core uses SAM core and tools for building and uploading. And you can add your own variant file. This way, you'll be able to update SAM core. Otherwise, with both old and new IDE, you'd lost your modifications at each update

Hello Federico

Thanks for this although I do not know how to set up an new core? Is there any forum thread or instruction available?

Also I have searched my Mac for the '~/Library/Arduino15' I have also done a 'Search' for the file name and nothing is coming up. That file is not on my mac.

Thanks, Mils24

If this helps this is the details from the ‘Boards.txt’ file inside the ‘Arduino_Due_Repetier’ folder I was sent.

As seen in the original post, the README.txt file say to add this entry to the current ‘Boards.txt’ file found inside the /hardwear/arduino/sam folder. However there is no ‘sam’ folder in 1.6.3

Where do I put this?

arduino_due_repetier_dbg.name=Arduino Due for Repetier (Programming port)
arduino_due_repetier_dbg.vid.0=0x2341
arduino_due_repetier_dbg.pid.1=0x003d
arduino_due_repetier_dbg.upload.tool=bossac
arduino_due_repetier_dbg.upload.protocol=sam-ba
arduino_due_repetier_dbg.upload.maximum_size=524288
arduino_due_repetier_dbg.upload.use_1200bps_touch=true
arduino_due_repetier_dbg.upload.wait_for_upload_port=false
arduino_due_repetier_dbg.upload.native_usb=false
arduino_due_repetier_dbg.build.mcu=cortex-m3
arduino_due_repetier_dbg.build.f_cpu=84000000L
arduino_due_repetier_dbg.build.usb_product=“Arduino Due”
arduino_due_repetier_dbg.build.board=SAM_DUE
arduino_due_repetier_dbg.build.core=arduino
arduino_due_repetier_dbg.build.extra_flags=-D__SAM3X8E__ -mthumb {build.usb_flags}
arduino_due_repetier_dbg.build.ldscript=linker_scripts/gcc/flash.ld
arduino_due_repetier_dbg.build.variant=arduino_due_repetier
arduino_due_repetier_dbg.build.variant_system_lib=libsam_sam3x8e_gcc_rel.a
arduino_due_repetier_dbg.build.vid=0x2341
arduino_due_repetier_dbg.build.pid=0x003e

arduino_due_repetier.name=Arduino Due for Repetier (Native USB port)
arduino_due_repetier.vid.0=0x2341
arduino_due_repetier.pid.1=0x003e
arduino_due_repetier.upload.tool=bossac
arduino_due_repetier.upload.protocol=sam-ba
arduino_due_repetier.upload.maximum_size=524288
arduino_due_repetier.upload.use_1200bps_touch=true
arduino_due_repetier.upload.wait_for_upload_port=true
arduino_due_repetier.upload.native_usb=true
arduino_due_repetier.build.mcu=cortex-m3
arduino_due_repetier.build.f_cpu=84000000L
arduino_due_repetier.build.usb_product=“Arduino Due”
arduino_due_repetier.build.board=SAM_DUE
arduino_due_repetier.build.core=arduino
arduino_due_repetier.build.extra_flags=-D__SAM3X8E__ -mthumb {build.usb_flags}
arduino_due_repetier.build.ldscript=linker_scripts/gcc/flash.ld
arduino_due_repetier.build.variant=arduino_due_repetier
arduino_due_repetier.build.variant_system_lib=libsam_sam3x8e_gcc_rel.a
arduino_due_repetier.build.vid=0x2341
arduino_due_repetier.build.pid=0x003e

Also these are the files within the ‘arduino_due_repetier’ folder that are meant to be pasted into the hardware/arduino/sam/variants but again there is no ‘sam/variants’ folder

Where do these go?

(see attached)

Screen Shot 2015-04-07 at 15.35.43.png

Arduino15 is a folder

As for boards.txt, start creating this folder structure SKETCHBOOK/hardware/repetier/sam/variants/arduino_due_repetier (where SKETCHBOOK is the folder containing your sketches)

In SKETCHBOOK/hardware/repetier/sam put your boards.txt: modify build.core keys from arduino_due_repetier.build.core=arduino to arduino_due_repetier.build.core=arduino:arduino

In SKETCHBOOK/hardware/repetier/sam/variants/arduino_due_repetier copy your variant files

Start the IDE 1.6.3, ensure you have installed SAM core, select your repetier board and hit compile

Hello Federico

Once again thank you!! I can now see the Arduino_Due_Repetier folder in the boards menu!!

However my complie error is still happening when I try and upload the firmware.

This is the error, can you help?

Arduino: 1.6.3 (Mac OS X), Board: “Arduino Due for Repetier (Programming port)”
/Users/D/Documents/Arduino/hardware/repetier/sam/variants/arduino_due_repetier/variant.cpp:303:55: error: no matching function for call to ‘UARTClass::UARTClass(Uart*, IRQn, int, RingBuffer*)’
UARTClass Serial(UART, UART_IRQn, ID_UART, &rx_buffer1);

  • ^*
    /Users/D/Documents/Arduino/hardware/repetier/sam/variants/arduino_due_repetier/variant.cpp:303:55: note: candidates are:
    In file included from /Users/D/Documents/Arduino/hardware/repetier/sam/variants/arduino_due_repetier/variant.h:38:0,
  • from /Users/D/Documents/Arduino/hardware/repetier/sam/variants/arduino_due_repetier/variant.cpp:19:*
    /Users/D/Library/Arduino15/packages/arduino/hardware/sam/1.6.3/cores/arduino/UARTClass.h:45:5: note: UARTClass::UARTClass(Uart*, IRQn_Type, uint32_t, RingBuffer*, RingBuffer*)
    UARTClass(Uart* pUart, IRQn_Type dwIrq, uint32_t dwId, RingBuffer* pRx_buffer, RingBuffer* pTx_buffer);
  • ^*
    /Users/D/Library/Arduino15/packages/arduino/hardware/sam/1.6.3/cores/arduino/UARTClass.h:45:5: note: candidate expects 5 arguments, 4 provided
    /Users/D/Library/Arduino15/packages/arduino/hardware/sam/1.6.3/cores/arduino/UARTClass.h:35:7: note: UARTClass::UARTClass(const UARTClass&)
    class UARTClass : public HardwareSerial
  • ^*
    /Users/D/Library/Arduino15/packages/arduino/hardware/sam/1.6.3/cores/arduino/UARTClass.h:35:7: note: candidate expects 1 argument, 4 provided
    /Users/D/Documents/Arduino/hardware/repetier/sam/variants/arduino_due_repetier/variant.cpp:321:63: error: no matching function for call to ‘USARTClass::USARTClass(Usart*, IRQn, int, RingBuffer*)’
    USARTClass Serial1(USART0, USART0_IRQn, ID_USART0, &rx_buffer2);
  • ^*
    /Users/D/Documents/Arduino/hardware/repetier/sam/variants/arduino_due_repetier/variant.cpp:321:63: note: candidates are:
    In file included from /Users/D/Documents/Arduino/hardware/repetier/sam/variants/arduino_due_repetier/variant.h:39:0,
  • from /Users/D/Documents/Arduino/hardware/repetier/sam/variants/arduino_due_repetier/variant.cpp:19:*
    /Users/D/Library/Arduino15/packages/arduino/hardware/sam/1.6.3/cores/arduino/USARTClass.h:108:5: note: USARTClass::USARTClass(Usart*, IRQn_Type, uint32_t, RingBuffer*, RingBuffer*)
    USARTClass(Usart* pUsart, IRQn_Type dwIrq, uint32_t dwId, RingBuffer* pRx_buffer, RingBuffer* pTx_buffer);
  • ^*
    /Users/D/Library/Arduino15/packages/arduino/hardware/sam/1.6.3/cores/arduino/USARTClass.h:108:5: note: candidate expects 5 arguments, 4 provided
    /Users/D/Library/Arduino15/packages/arduino/hardware/sam/1.6.3/cores/arduino/USARTClass.h:66:7: note: USARTClass::USARTClass(const USARTClass&)
    class USARTClass : public UARTClass
  • ^*
    /Users/D/Library/Arduino15/packages/arduino/hardware/sam/1.6.3/cores/arduino/USARTClass.h:66:7: note: candidate expects 1 argument, 4 provided
    /Users/D/Documents/Arduino/hardware/repetier/sam/variants/arduino_due_repetier/variant.cpp:324:63: error: no matching function for call to ‘USARTClass::USARTClass(Usart*, IRQn, int, RingBuffer*)’
    USARTClass Serial2(USART1, USART1_IRQn, ID_USART1, &rx_buffer3);
  • ^*
    /Users/D/Documents/Arduino/hardware/repetier/sam/variants/arduino_due_repetier/variant.cpp:324:63: note: candidates are:
    In file included from /Users/D/Documents/Arduino/hardware/repetier/sam/variants/arduino_due_repetier/variant.h:39:0,
  • from /Users/D/Documents/Arduino/hardware/repetier/sam/variants/arduino_due_repetier/variant.cpp:19:*
    /Users/D/Library/Arduino15/packages/arduino/hardware/sam/1.6.3/cores/arduino/USARTClass.h:108:5: note: USARTClass::USARTClass(Usart*, IRQn_Type, uint32_t, RingBuffer*, RingBuffer*)
    USARTClass(Usart* pUsart, IRQn_Type dwIrq, uint32_t dwId, RingBuffer* pRx_buffer, RingBuffer* pTx_buffer);
  • ^*
    /Users/D/Library/Arduino15/packages/arduino/hardware/sam/1.6.3/cores/arduino/USARTClass.h:108:5: note: candidate expects 5 arguments, 4 provided
    /Users/D/Library/Arduino15/packages/arduino/hardware/sam/1.6.3/cores/arduino/USARTClass.h:66:7: note: USARTClass::USARTClass(const USARTClass&)
    class USARTClass : public UARTClass
  • ^*
    /Users/D/Library/Arduino15/packages/arduino/hardware/sam/1.6.3/cores/arduino/USARTClass.h:66:7: note: candidate expects 1 argument, 4 provided
    /Users/D/Documents/Arduino/hardware/repetier/sam/variants/arduino_due_repetier/variant.cpp:327:63: error: no matching function for call to ‘USARTClass::USARTClass(Usart*, IRQn, int, RingBuffer*)’
    USARTClass Serial3(USART3, USART3_IRQn, ID_USART3, &rx_buffer4);
  • ^*
    /Users/D/Documents/Arduino/hardware/repetier/sam/variants/arduino_due_repetier/variant.cpp:327:63: note: candidates are:
    In file included from /Users/D/Documents/Arduino/hardware/repetier/sam/variants/arduino_due_repetier/variant.h:39:0,
  • from /Users/D/Documents/Arduino/hardware/repetier/sam/variants/arduino_due_repetier/variant.cpp:19:*
    /Users/D/Library/Arduino15/packages/arduino/hardware/sam/1.6.3/cores/arduino/USARTClass.h:108:5: note: USARTClass::USARTClass(Usart*, IRQn_Type, uint32_t, RingBuffer*, RingBuffer*)
    USARTClass(Usart* pUsart, IRQn_Type dwIrq, uint32_t dwId, RingBuffer* pRx_buffer, RingBuffer* pTx_buffer);
  • ^*
    /Users/D/Library/Arduino15/packages/arduino/hardware/sam/1.6.3/cores/arduino/USARTClass.h:108:5: note: candidate expects 5 arguments, 4 provided
    /Users/D/Library/Arduino15/packages/arduino/hardware/sam/1.6.3/cores/arduino/USARTClass.h:66:7: note: USARTClass::USARTClass(const USARTClass&)
    class USARTClass : public UARTClass
  • ^*
    /Users/D/Library/Arduino15/packages/arduino/hardware/sam/1.6.3/cores/arduino/USARTClass.h:66:7: note: candidate expects 1 argument, 4 provided
    Error compiling.
  • This report would have more information with*
  • “Show verbose output during compilation”*
  • enabled in File > Preferences.*

Many thanks,
Mils24

Sorry I have just realised that this error question is probably in the wrong section.

Can the moderators please move to a relevant section.

Apologies, Mils24

I have a problem to add breadboard and my own custom board 1.0.6 -> 1.6.3. It doesn't want to include outer boards.txt. However, I tried to edit boards.txt inside of 1.6.3 and it works. What is the problem? I did the copy of the file structure of course.

And another question: What is the purpose of .build.board? What to set?

@Federico Fissore

Regarding the error I submitted below. Anothor Forum user has informed me that it has happened because I am trying to use a Variant file from a pre 1.6.0 version and after 1.6.0 Arduino added a new buffer called pTx_buffer within the UART classes.

This means nothing to me but Im sure it means something to you.

He also told me that he had 'submitted a pull request for Due watchdog changes' to you about 9 months ago.

Again Im not too sure what this means but Im guessing this would of meant I wouldn't of had to add the variant file and the watchdog feature would work using the Arduino_Due core.

Do you have any further update on this request? is this something you are working on?

Thanks, Mils24

Mils24 I'm glad you went this far in making your board work. as for the variant, I'm not an expert either (my colleagues care the core file). I guess your variant file is using a slightly old api and need some porting.

If I was you, I would download a copy of the variant file from 1.6.0 [1], compare it with your variant file so that I'm sure about the changed code lines, then port those changes only to the latest variant file boards manager has downloaded. See the FAQ [2]

[1] https://github.com/arduino/Arduino/tree/1.6.0/hardware/arduino/sam/variants/arduino_due_x [2] https://github.com/arduino/Arduino/wiki/Boards-Manager-FAQ#where-are-installed-cores-located

@Federico Fissore

Once again thank you!! I have now got it to compile correctly!

However no I cannot get it to upload.

I am getting the following error

Arduino: 1.6.3 (Mac OS X), Board: "Arduino Due for Repetier (Programming port)" Sketch uses 128,888 bytes (24%) of program storage space. Maximum is 524,288 bytes. Error while uploading: missing 'upload.params.quiet' configuration parameter * This report would have more information with* * "Show verbose output during compilation"* * enabled in File > Preferences.*

After a bit of google searching I think it is related to the boards.txt file for the variant. The file details are below:

arduino_due_repetier_dbg.name=Arduino Due for Repetier (Programming port) arduino_due_repetier_dbg.vid.0=0x2341 arduino_due_repetier_dbg.pid.1=0x003d arduino_due_repetier_dbg.upload.tool=bossac arduino_due_repetier_dbg.upload.protocol=sam-ba arduino_due_repetier_dbg.upload.maximum_size=524288 arduino_due_repetier_dbg.upload.use_1200bps_touch=true arduino_due_repetier_dbg.upload.wait_for_upload_port=false arduino_due_repetier_dbg.upload.native_usb=false arduino_due_repetier_dbg.build.mcu=cortex-m3 arduino_due_repetier_dbg.build.f_cpu=84000000L arduino_due_repetier_dbg.build.usb_product="Arduino Due" arduino_due_repetier_dbg.build.board=SAM_DUE arduino_due_repetier_dbg.build.core=arduino:arduino arduino_due_repetier_dbg.build.extra_flags=-D_SAM3X8E_ -mthumb {build.usb_flags} arduino_due_repetier_dbg.build.ldscript=linker_scripts/gcc/flash.ld arduino_due_repetier_dbg.build.variant=arduino_due_repetier arduino_due_repetier_dbg.build.variant_system_lib=libsam_sam3x8e_gcc_rel.a arduino_due_repetier_dbg.build.vid=0x2341 arduino_due_repetier_dbg.build.pid=0x003e

arduino_due_repetier.name=Arduino Due for Repetier (Native USB port) arduino_due_repetier.vid.0=0x2341 arduino_due_repetier.pid.1=0x003e arduino_due_repetier.upload.tool=bossac arduino_due_repetier.upload.protocol=sam-ba arduino_due_repetier.upload.maximum_size=524288 arduino_due_repetier.upload.use_1200bps_touch=true arduino_due_repetier.upload.wait_for_upload_port=true arduino_due_repetier.upload.native_usb=true arduino_due_repetier.build.mcu=cortex-m3 arduino_due_repetier.build.f_cpu=84000000L arduino_due_repetier.build.usb_product="Arduino Due" arduino_due_repetier.build.board=SAM_DUE arduino_due_repetier.build.core=arduino:ardiuno arduino_due_repetier.build.extra_flags=-D_SAM3X8E_ -mthumb {build.usb_flags} arduino_due_repetier.build.ldscript=linker_scripts/gcc/flash.ld arduino_due_repetier.build.variant=arduino_due_repetier arduino_due_repetier.build.variant_system_lib=libsam_sam3x8e_gcc_rel.a arduino_due_repetier.build.vid=0x2341 arduino_due_repetier.build.pid=0x003e

Can you tell me what I need to change?

Thanks

I forgot to mention this. You need to change

arduino_due_repetier_dbg.upload.tool=bossac

to

arduino_due_repetier_dbg.upload.tool=arduino:bossac

FYI keep this as a reference https://github.com/arduino/Arduino/wiki/Arduino-Hardware-Cores-migration-guide-from-1.0-to-1.6

Awesome Federico!!

Thats me sorted!! Many thanks for the help..... GREATLY appreciated

:)