Hi
Here are some infos.
What you need:
A) -- Source code --
1) Main firmware code
- https://github.com/aseba-community/aseba-target-thymio2 branch "rf"
2) Virtual machine code:
- https://github.com/aseba-community/aseba branch master
3) Some drivers (I2C, timers, flash)
- http://gna.org/projects/molole/ trunk
4) The USB stack
- The usb_pic24 folder of this zip file:
https://aseba.wdfiles.com/local--files/thymiosourcecode/thymio-II-source-fw3.zip
B) -- Tools --
1) MPLAB X: https://www.microchip.com/pagehandler/en-us/family/mplabx/
2) XC16 : https://www.microchip.com/pagehandler/en_us/devtools/mplabxc/
C) -- Create project --
Do NOT use the MPLAB v8 project provided in the git tree, it is too
old and should not be used.
First, you need to start mplab X and create a new project:
Microcontroller: PIC24FJ128GB106
Compiler: XC16
Hardware tool: None (simulator, or whatever).
Use the linker script provided in the aseba-target-thymio2 git tree.
Use the following sources from aseba-target-thymio2 git tree:
(ie, 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.
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
Use the following sources from usb_pic24 folder:
usb_descriptors.c
usb_device.c
usb_function_cdc.c
usb_hal_pic24.c
Use the following sources from aseba git tree:
natives.c
vm-buffer.c
vm.c
Use the following sources from molole svn tree:
clock/clock.c
error/error.c
flash/flash.c
i2c/i2c.c
i2c/master.c
i2c/master_protocol.c
i2c/slave.c
timer/timer.c
You can add thoses two files from the aseba-target-thymio2 git tree as
"Important files", You should not compile them directly, they are
included from skel-usb.c/h:
skel-usb-user.c
skel-usb-user.h
This is because skel-usb.c/h is target-independant, and skel-usb-user.c/h
is the target-dependant code.
Project setup:
- Compiler options: -Os -mlarge-code -fomit-frame-pointer
-fno-strict-aliasing
On, linux add: -fno-peephole2, because of a compiler bug (official
workaround from microchip).
- Add molole, usb_pic24, aseba git tree, and aseba-target-thymio2 as
include
search path.
Then you should be able to compile the firmware. To upload it to the robot
use the "Thymio firmware updater" and not a programmer such as icd3 or
pickit3.
Regards,
Philippe
_______________________________________________
Aseba-thymio mailing list
[email protected]
https://mail.gna.org/listinfo/aseba-thymio