To compile the firmware from git, you need the following source code:
You need the MPLAB X environment and C compiler:
You can compile using two methods, one using CMake (only compiling) or used the Microchip MPLAB X tool
Follow compilation instructions
First, you need to start MPLAB X and create a new project:
Use the linker script provided in the aseba-target-thymio2 git tree.
Use the following sources:
from aseba-target-thymio2 git tree, almost everything except skel-usb-user.c/h:
abo.c, analog.c, behavior.c, button.c, crc.c, entry.s, ground_ir.c, ir_prox.c, leds.c, leds_low.s, log.c, main.c, mma7660.c, mode.c, motor.c, ntc.c, pid_motor.c, playback.c, pmp.c, pwm_motor.c, rc5.c, regulator.c, rf.c, sd/ff.c, sd/mmc.c, sd.c, sensors.c, skel-usb.c, sound.c, test_mode.c, thymio-buffer.c, thymio_natives.c, tone.c, usb_uart.c, wav.c
from usb_pic24 folder:
usb_descriptors.c, usb_device.c, usb_function_cdc.c
from aseba git tree:
vm/natives.c, vm/vm.c, transport/buffer/vm-buffer.c
from molole git tree:
clock/clock.c, error/error.c, flash/flash.c, i2c/i2c.c, i2c/master.c, i2c/master_protocol.c, timer/timer.c
Note that if you want to edit the firmware, you should add the following two files from the aseba-target-thymio2 git tree as "Important files": skel-usb-user.c, skel-usb-user.h. You should not compile them directly, as they are included from skel-usb.c/h. The reason is that skel-usb.c/h is target-independent code, while skel-usb-user.c/h is target-dependent code.
Project setup:
Here are screenshots of the detailed options you should set in the project properties:
Then you should be able to compile the firmware. To upload it to the robot, use the Thymio firmware upgrader and not a program such as icd3 or pickit3.