This repository contains sources for the slcan CANable firmware, based off of the CANtact firwmare. This firmware should still compile and run on the CANtact.
O
- Open channelC
- Close channelS0
- Set bitrate to 10kS1
- Set bitrate to 20kS2
- Set bitrate to 50kS3
- Set bitrate to 100kS4
- Set bitrate to 125kS5
- Set bitrate to 250kS6
- Set bitrate to 500kS7
- Set bitrate to 750kS8
- Set bitrate to 1MM0
- Set mode to normal mode (default)M1
- Set mode to silent modeA0
- Disable automatic retransmissionA1
- Enable automatic retransmission (default)TIIIIIIIILDD...
- Transmit data frame (Extended ID) [ID, length, data]tIIILDD...
- Transmit data frame (Standard ID) [ID, length, data]RIIIIIIIIL
- Transmit remote frame (Extended ID) [ID, length]rIIIL
- Transmit remote frame (Standard ID) [ID, length]V
- Returns firmware version and remote path as a string
Note: Channel configuration commands must be sent before opening the channel. The channel must be opened before transmitting frames.
This firmware currently does not provide any ACK/NACK feedback for serial commands.
Firmware builds with GCC. Specifically, you will need gcc-arm-none-eabi, which
is packaged for Windows, OS X, and Linux on
Launchpad. Download for your
system and add the bin
folder to your PATH.
Your Linux distribution may also have a prebuilt package for arm-none-eabi-gcc
, check your distro's repositories to see if a build exists.
- If you have a CANable device, you can compile using
make
. - If you have a CANtact or other device with external oscillator, you can compile using
make INTERNAL_OSCILLATOR=1
Simply plug in your CANable with the BOOT jumper enabled (or depress the boot button on the CANable Pro while plugging in). Next, type make flash
and your CANable will be updated to the latest firwmare. Unplug/replug the device after moving the boot jumper back, and your CANable will be up and running.
Debugging and flashing can be done with any STM32 Discovery board as a programmer, or an st-link. You can also use other tools that support SWD.
To use an STM32 Discovery, run OpenOCD using
the stm32f0x.cfg file: openocd -f fw/stm32f0x.cfg
.
With OpenOCD running, arm-none-eabi-gdb can be used to load code and debug.
- Ethan Zonca - New features, HAL updates, Makefile fixes and code size optimization, updates for CANable
- onejope - Fixes to extended ID handling
- Phil Wise - Added dfu-util compatibility to Makefile
See LICENSE.md