Compiling your own firmware

I was going by this old post but it appears that the repo no longer contains a “libraries” folder. Are there updated directions somewhere? search didn’t find anything.

I did this:

  • downloaded the repo
  • moved “hardware” into Documents/Arduino
  • opened ytx-controller in the Arduino IDE (v2.2.1)
  • selected “Yaeltex Kilomux” as the board
  • went to sketch > export compiled
  • and get this error:

In file included from /Users/optic/Documents/Arduino/hardware/yaeltex/samd/cores/arduino/Arduino.h:81:0,
from /private/var/folders/sb/lk5cq8ws3ts2kf87nsp8cyjc0000gn/T/arduino/sketches/3E0F937277A1B85C141AA03B03744475/sketch/ytx-controller.ino.cpp:1:
/Users/optic/Documents/Arduino/hardware/yaeltex/samd/cores/arduino/delay.h:23:10: fatal error: variant.h: No such file or directory
#include “variant.h”
^~~~~~~~~~~
compilation terminated.

exit status 1

Compilation error: exit status 1

Hello @mike!

The libraries folder from v0.22 has moved inside the hardware folder, so when you copy this folder to the Arduino path, you are already copying the libraries needed.
This seems to be out of sync with the post, thanks for noticing it.

Did you install the Arduino SAMD Boards package?
What commit did you download?

I need more info since I haven’t seen that error before and I haven’t been able to reproduce it yet.

Okay running through everything from the top

  1. do “git clone https://gitlab.com/yaeltex/ytx-controller.git ytx” in my Arduino folder
  2. “mv ytx/hardware .”
  3. open IDE & verify I have 1.8.13 of Arduino SAMD boards
  4. open ytx/ytx-controller/ytx-controller.ino
  5. select Yaeltex Kilomux as the board
  6. sketch > export compiled binary
  7. –> same error message

so I just tried using the old Arduino (just Arduino.app on my Mac, not the Arduino IDE.app) and it compiled. so, I guess I’ll just use that. should it work with the v2.2.1 IDE?

I’m guessing it’s what’s called the legacy IDE here.

1 Like

Next problem: I made minor changes and then compiled, but the ytx firmware loader says “invalid file signature”. what do I need to do?

This happens even if I check out from git and build unchanged.

Oh!

Because we made a new loader which includes both firmwares unified MAIN and AUX.

This is a bit annoying when developing though, so I’d suggest using the good-old split loader.

If you’d like to join both firmware files and use the new loader, using this firmware for AUX
ytx-v2-firmware-aux-0-16.bin (11.1 KB)

you can choose the “Advanced” menu and the option “Build firmware file”,
It will ask for your desired unified output filename, the MAIN file (your export from Arduino IDE) and the AUX file.

Yes! We have been working with this IDE for a while now with no trouble.
Nice to hear it worked with the previous IDE :slight_smile:

okay, I grabbed the ytxFirmwareUploader for mac and that is working. I can build the checked-out version, send it to the yaeltex, and have it work properly as expected. thank you!

when I try with my modified version, the firmware loads but then it doesn’t do anything. I’d like to add some serial print lines to help debug, but I don’t get how to use those. I tried uncommenting this line in setup.ino of the unmodified files, but nothing ever prints out:

SERIALPRINT("CONFIG STATUS: "); SERIALPRINTLN(configStatus);

I got an error about a missing /dev/cu.usbmodemNNN, and I found that there’s a
/dev/cu.usbmodem141203 is only present in boot loader mode. I can open it with the serial monitor but nothing ever appears there. Is there a trick to getting the serial monitor to work?

Also, is comments here the best way to ask questions as I progress?

Okay, slight update. I haven’t figured out the serial monitor thing, but I have gotten it to flash the status LED different colors depending on whether I hit an odd or even-numbered button. So, it’s a start.

Hey!

USB-Serial was disabled by default from version v0.22 onwards.

You can enable them sending the following SysEx message to the controller:

F0 79 74 78 00 00 00 1A F7

The controller will restart and you will be able to use the serial port.

sorry! I sent the windows .exe without asking :stuck_out_tongue:

thank you! that’s great. now when I press a button, it prints out which button I pressed. :slight_smile: