You can find the file boards.txt at the following location on your system:
C:\Users\domen\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\boards.txt
You can open the file with a normal text editor (e.g. notepad) and search for leonardo; you should find in the entries that start with leonardo the below lines
Yes I make always confusion with mini and micro sorry XD. I don't know why but this file is missing, I've disintalled and reinstalled now IDE2.3.4 but this file is however missing
I tried to reinstall several times, I also deleted all the Arduino folders before reinstalling it and now I only have builtins folder in the folder C:\Users\domen\AppData\Local\Arduino15\packages\
The file should not be missing else you would not be able to select Leonardo as the board; instead of re-installing the IDE, use the board manager in the IDE to downgrade the AVR board package (should be 1.8.6) to a version lower, test and next upgrade again.
I've reinsalled AVR 1.8.6 now seem to work I don't know why but ok XD.
Edit Something work now I think, I can upload blink sketch, I uploaded the sketch I need too but without the documents folder with the board.txt modified, if I use the document folders I have the "Property 'upload.tool.serial' is undefined" error.
I've checked the board file and it had all the mentionated line
FQBN: spacemouse:avr:leonardo
Utilizzo della scheda 'leonardo' dalla piattaforma nella cartella: C:\Users\domen\Documents\Arduino\hardware\spacemouse\avr
Utilizzo del core 'arduino' dalla piattaforma nella cartella: C:\Users\domen\Documents\Arduino\hardware\spacemouse\avr
Rilevamento delle librerie utilizzate in corso...
C:\Users\domen\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR -DUSB_VID=0x256f -DUSB_PID=0xc631 -DUSB_MANUFACTURER="Unknown" -DUSB_PRODUCT="SpaceMouse Pro Wireless (cabled)" -IC:\Users\domen\Documents\Arduino\hardware\spacemouse\avr\cores\arduino -IC:\Users\domen\Documents\Arduino\hardware\spacemouse\avr\variants\leonardo C:\Users\domen\AppData\Local\arduino\sketches\BCBCD5912FF851E975BCFB61ADAD43DF\sketch\HE_Spacemouse.ino.cpp -o nul
Alternative per HID.h: [HID@1.0]
ResolveLibrary(HID.h)
-> candidati: [HID@1.0]
C:\Users\domen\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR -DUSB_VID=0x256f -DUSB_PID=0xc631 -DUSB_MANUFACTURER="Unknown" -DUSB_PRODUCT="SpaceMouse Pro Wireless (cabled)" -IC:\Users\domen\Documents\Arduino\hardware\spacemouse\avr\cores\arduino -IC:\Users\domen\Documents\Arduino\hardware\spacemouse\avr\variants\leonardo -IC:\Users\domen\Documents\Arduino\hardware\spacemouse\avr\libraries\HID\src C:\Users\domen\AppData\Local\arduino\sketches\BCBCD5912FF851E975BCFB61ADAD43DF\sketch\HE_Spacemouse.ino.cpp -o nul
Utilizzo delle dipendenze delle librerie nella cache per i file: C:\Users\domen\Documents\Arduino\hardware\spacemouse\avr\libraries\HID\src\HID.cpp
Sto generando i prototipi di funzione...
C:\Users\domen\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR -DUSB_VID=0x256f -DUSB_PID=0xc631 -DUSB_MANUFACTURER="Unknown" -DUSB_PRODUCT="SpaceMouse Pro Wireless (cabled)" -IC:\Users\domen\Documents\Arduino\hardware\spacemouse\avr\cores\arduino -IC:\Users\domen\Documents\Arduino\hardware\spacemouse\avr\variants\leonardo -IC:\Users\domen\Documents\Arduino\hardware\spacemouse\avr\libraries\HID\src C:\Users\domen\AppData\Local\arduino\sketches\BCBCD5912FF851E975BCFB61ADAD43DF\sketch\HE_Spacemouse.ino.cpp -o C:\Users\domen\AppData\Local\Temp\641274869\sketch_merged.cpp
C:\Users\domen\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\domen\AppData\Local\Temp\641274869\sketch_merged.cpp
Compilazione dello sketch in corso...
"C:\\Users\\domen\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR -DUSB_VID=0x256f -DUSB_PID=0xc631 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"SpaceMouse Pro Wireless (cabled)\"" "-IC:\\Users\\domen\\Documents\\Arduino\\hardware\\spacemouse\\avr\\cores\\arduino" "-IC:\\Users\\domen\\Documents\\Arduino\\hardware\\spacemouse\\avr\\variants\\leonardo" "-IC:\\Users\\domen\\Documents\\Arduino\\hardware\\spacemouse\\avr\\libraries\\HID\\src" "C:\\Users\\domen\\AppData\\Local\\arduino\\sketches\\BCBCD5912FF851E975BCFB61ADAD43DF\\sketch\\HE_Spacemouse.ino.cpp" -o "C:\\Users\\domen\\AppData\\Local\\arduino\\sketches\\BCBCD5912FF851E975BCFB61ADAD43DF\\sketch\\HE_Spacemouse.ino.cpp.o"
Compilazione delle librerie in corso...
Compilazione della libreria "HID"
Uso il file precedentemente compilato: C:\Users\domen\AppData\Local\arduino\sketches\BCBCD5912FF851E975BCFB61ADAD43DF\libraries\HID\HID.cpp.o
Compilazione del core in corso...
Utilizzo del core precompilato: C:\Users\domen\AppData\Local\arduino\cores\spacemouse_avr_leonardo_736d6360a774a2b53169c4c42d92aaa3\core.a
Collegare tutto insieme...
"C:\\Users\\domen\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega32u4 -o "C:\\Users\\domen\\AppData\\Local\\arduino\\sketches\\BCBCD5912FF851E975BCFB61ADAD43DF/HE_Spacemouse.ino.elf" "C:\\Users\\domen\\AppData\\Local\\arduino\\sketches\\BCBCD5912FF851E975BCFB61ADAD43DF\\sketch\\HE_Spacemouse.ino.cpp.o" "C:\\Users\\domen\\AppData\\Local\\arduino\\sketches\\BCBCD5912FF851E975BCFB61ADAD43DF\\libraries\\HID\\HID.cpp.o" "C:\\Users\\domen\\AppData\\Local\\arduino\\sketches\\BCBCD5912FF851E975BCFB61ADAD43DF/..\\..\\cores\\spacemouse_avr_leonardo_736d6360a774a2b53169c4c42d92aaa3\\core.a" "-LC:\\Users\\domen\\AppData\\Local\\arduino\\sketches\\BCBCD5912FF851E975BCFB61ADAD43DF" -lm
"C:\\Users\\domen\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\domen\\AppData\\Local\\arduino\\sketches\\BCBCD5912FF851E975BCFB61ADAD43DF/HE_Spacemouse.ino.elf" "C:\\Users\\domen\\AppData\\Local\\arduino\\sketches\\BCBCD5912FF851E975BCFB61ADAD43DF/HE_Spacemouse.ino.eep"
"C:\\Users\\domen\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\domen\\AppData\\Local\\arduino\\sketches\\BCBCD5912FF851E975BCFB61ADAD43DF/HE_Spacemouse.ino.elf" "C:\\Users\\domen\\AppData\\Local\\arduino\\sketches\\BCBCD5912FF851E975BCFB61ADAD43DF/HE_Spacemouse.ino.hex"
Uso la libreria HID alla versione 1.0 nella cartella: C:\Users\domen\Documents\Arduino\hardware\spacemouse\avr\libraries\HID
"C:\\Users\\domen\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\domen\\AppData\\Local\\arduino\\sketches\\BCBCD5912FF851E975BCFB61ADAD43DF/HE_Spacemouse.ino.elf"
Lo sketch usa 7110 byte (24%) dello spazio disponibile per i programmi. Il massimo è 28672 byte.
Le variabili globali usano 303 byte (11%) di memoria dinamica, lasciando altri 2257 byte liberi per le variabili locali. Il massimo è 2560 byte.
La proprietà 'upload.tool.serial' non è definita
for this project we need to create a folder in documents folder, the folder in every PC called documents, with a modified board.txt for recognised the micro as a Spacemouse, so I think than we don't use the board.txt you mentioned but the other in document folders, all the specs of this project are in the link in my second message here, the printables link.
or you can see in this video at 9:52
I don't know why this don't work for me I needed to add your 2 line in the modified board.txt