# Compiling and loading the MuxTO code

**URL:** <https://forum.arduino.cc/t/compiling-and-loading-the-muxto-code/627145>\
**Category:** Nano Every\
**Created:** [December 21, 2019, 2:45am UTC](https://forum.arduino.cc/t/compiling-and-loading-the-muxto-code/627145 "2019-12-21T02:45:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharp5](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sharp5/32/1126810_2.png) [@sharp5](https://forum.arduino.cc/u/sharp5)\
**Post date:** [December 21, 2019, 2:45am UTC](https://forum.arduino.cc/t/compiling-and-loading-the-muxto-code/627145/1 "2019-12-21T02:45:20Z")

</div>

I'd welcome some info on how to compile and upload the MuxTO software that runs on the ATSAMD11. The notes at the top of MuxTO.ino are very brief to say the least ! It looks like an Arduino sketch ...

> Compile with  
> fqbn=arduino:samd:muxto:float=default,config=enabled,clock=internal\_usb,timer=timer\_732Hz,bootloader=4kb,serial=two\_uart,usb=cdc  
> to obtain the binary for Serial-to-USB converter + UPDI programmer on the Arduino Nano Every (MuxTO for brevity)

I want to design a thru-hole 4809-based board but have the programmer/bridge/debug board as a separate board. I am competent with multiple boards, cores, etc, can use Atmel Studio, have a J-link programmer, and have made my own ATSAMD11 designs in the past.

Maybe it would make sense to put the binary and some notes in the Github repo ?

I just need a little more info please.

Edited to add ...

I've just seen another thread on this subject. Why are we using the Mattairtech core ? Justin is a great guy and I use his cores in some other Arduino/ARM projects, but the core hasn't been updated in a quite a while ...

A little later ...

Ok, I can get this to work, but only without the bootloader. Otherwise the binary is too large by 112 bytes. That's ok for me as I can use my J-link. I need to wait for the boards to see if it actually works.

> text data bss dec hex filename  
> 12800 0 2500 15300 3bc4 /var/folders/03/s3pv8qk91w78m4\_st\_nbxl5m0000gn/T/arduino\_build\_722457/MuxTO.ino.elf

For reference, my environment is:

macOS High Sierra 10.13.6  
Arduino 1.8.10  
Core: Mattairtech 1.6.18-beta-b1 (most recent beta, latest prod build doesn't support Mac)  
Board: Generic D11D14AS  
Clock Source: INTERNAL\_USB\_CALIBRATED\_OSCILLATOR  
USB Config: CDC\_ONLY  
Serial Config: TWO\_UART\_ONE\_WIRE\_NO\_SPI  
Bootloader Size: NO\_BOOTLOADER  
Timer PWM Frequency: 732.4Hz  
Floating Point: Print & String use separate singles and doubles  
Build Options: config.h enabled

Mods - feel free to merge with the other thread on this topic.

---

<div class="post-metadata">

**Author:** ![pert](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/pert/32/217111_2.png) [@pert](https://forum.arduino.cc/u/pert)\
**Post date:** [December 21, 2019, 4:10am UTC](https://forum.arduino.cc/t/compiling-and-loading-the-muxto-code/627145/2 "2019-12-21T04:10:40Z")

</div>

> sharp5:  
> Edited to add ...

Thanks for taking the time to post an update.

> sharp5:  
> Why are we using the Mattairtech core ? Justin is a great guy and I use his cores in some other Arduino/ARM projects, but the core hasn't been updated in a quite a while ...

As far as I know, it's the only Arduino core that supports the ATSAMD11. Do you know of another one?

I like that Arduino used a 3rd party core rather than reinventing the wheel themselves. I would hope this will result in the Arduino developers contributing to the development of the mattairtech core as work is needed on it. Of course, that wouldn't work if mattairtech has abandoned the project, but hopefully that's not the case.

I do think it's a shame that Arduino didn't provide an easier method for installing the MuxTO board definition. I suppose the idea was that the sort of advanced users who will be working with it will have no problem modifying the mattairtech core, but it still seems silly that the Arduino developers didn't take advantage of the awesome features they themselves created which would allow this to be done simply by installing a package via Boards Manager.

---

<div class="post-metadata">

**Author:** ![roboticboyer](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/roboticboyer/32/215966_2.png) [@roboticboyer](https://forum.arduino.cc/u/roboticboyer)\
**Post date:** [January 4, 2020, 2:38pm UTC](https://forum.arduino.cc/t/compiling-and-loading-the-muxto-code/627145/3 "2020-01-04T14:38:46Z")

</div>

Take a look here for MuxTO source:

> **[ArduinoCore-megaavr/firmwares/MuxTO at master · arduino/ArduinoCore-megaavr](https://github.com/arduino/ArduinoCore-megaavr/tree/master/firmwares/MuxTO)**
>
> master/firmwares/MuxTO

To upload the MuxTO

> <https://github.com/arduino/ArduinoCore-megaavr/issues/51#issuecomment-517702530>
>
> On a Nano Every, if you try and transfer more than about 128 characters from the… Serial Monitor to the board via the serial interface it locks up, and the only solution is to unplug the USB cable.
> 
> The following program demonstrates the problem:
> 
> void setup() {
> Serial.begin(9600);
> while (!Serial);
> Serial.println("Ready");
> }
> 
> int count = 0;
> 
> void loop() {
> if (count % 64 == 0) {
> Serial.println();
> Serial.print(count);
> Serial.write(' ');
> }
> while (!Serial.available());
> Serial.write((int)Serial.read());
> count++;
> }
> 
> Open the \*\*Serial Monitor\*\*, copy a line of text of 128 characters, paste it into the input field, and click \*\*Send\*\*.
> 
> I'm running Arduino IDE 1.8.9 on a Mac, and the Arduino megaAVR Boards file version 1.8.3.
> 
> It works fine on a Uno WiFi Rev 2.

> <https://github.com/arduino/ArduinoCore-megaavr/issues/51#issuecomment-522905679>
>
> On a Nano Every, if you try and transfer more than about 128 characters from the… Serial Monitor to the board via the serial interface it locks up, and the only solution is to unplug the USB cable.
> 
> The following program demonstrates the problem:
> 
> void setup() {
> Serial.begin(9600);
> while (!Serial);
> Serial.println("Ready");
> }
> 
> int count = 0;
> 
> void loop() {
> if (count % 64 == 0) {
> Serial.println();
> Serial.print(count);
> Serial.write(' ');
> }
> while (!Serial.available());
> Serial.write((int)Serial.read());
> count++;
> }
> 
> Open the \*\*Serial Monitor\*\*, copy a line of text of 128 characters, paste it into the input field, and click \*\*Send\*\*.
> 
> I'm running Arduino IDE 1.8.9 on a Mac, and the Arduino megaAVR Boards file version 1.8.3.
> 
> It works fine on a Uno WiFi Rev 2.

> **[Nano Every | Arduino Documentation](https://docs.arduino.cc/hardware/nano-every)**
>
> The Nano Every is Arduino's smallest board with dimensions of only 45x18mm and a weight under 5gr. The small footprint and low price, make the Nano Every particularly suited for wearable inventions…

Gio

---

<div class="post-metadata">

**Author:** ![roboticboyer](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/roboticboyer/32/215966_2.png) [@roboticboyer](https://forum.arduino.cc/u/roboticboyer)\
**Post date:** [January 6, 2020, 5:25pm UTC](https://forum.arduino.cc/t/compiling-and-loading-the-muxto-code/627145/4 "2020-01-06T17:25:54Z")

</div>

In case of issue with the right version of Bossac (Linux, Win, Mac) see this link:

> <https://github.com/arduino/ArduinoCore-megaavr/issues/65>
>
> Good Morning
> I'm trying to patch the Arduino Nano Every using the fix proposed …on #51 under Linux
> 
> The Bossac file inside \[https://github.com/arduino/Arduino/files/3461449/update\_muxto.zip\](https://github.com/arduino/Arduino/files/3461449/update\_muxto.zip) is not working under Linux. I think is the Mac or Win version
> Where can I find the Linux version of it?
> 
> thank you
> Giorgio

Giorgio

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 7, 2021, 11:56am UTC](https://forum.arduino.cc/t/compiling-and-loading-the-muxto-code/627145/5 "2021-05-07T11:56:32Z")

</div>

Closed on May 7, 2021, 11:56am UTC


