Skip to content
Snippets Groups Projects
nrs1g15's avatar
nrs1g15 authored
ebc867cc
History

SUFST Firmware

This repository holds all the firmware used within SUSFT on the various microcontrollers throughout the SUFST car. SUFST Website

Repository Contents

  • /Arduino Libraries - Arduino libraries used for each of the Arduino boards such as Mini Pro and Mega 2560.
  • /CAN SD Card Logger - Firmware for monitoring a CAN network and save all data that is sent over that network to an SD card.
  • /CAN Wireless Transceiver - Firmware for monitoring a CAN network and transmit all data that is sent over that network over an Xbee S2C 802.15.4.
  • /Common - Various programming utilities that are common to the firmwares.
  • /LICENSE - GNU 3.0 license notice.
  • /README.md - This file.

Documentation

Atmel Studio and Arduino

Most firmwares are built, compiled and uploaded through within Atmel Studio, as it provides features that make this process easy, such as built in support for importing downloaded Arduino libraries easily and native support for the avr toolchain.

Atmel Studio can be downloaded here. Arduino IDE can be downloaded here.

In order to upload and ensure compiliation to work, you MUST have the Arduino IDE installed in the default location of C:\Program Files (x86)\Arduino, since Atmel Studio requires files from the Arduino IDE install, and will look for them in the default Arduino install location.

The uploader used is avrdude which is provided by the Arduino IDE installer. Atmel Studio can upload compiled programs through the provided avrdude by adding it as an external tool, this is done by tools->External Tools...->Add. This allows you to add a new external tool which Atmel Studio can invoke to upload compiled Debug or Release .hex files. Debug and Release .hex HAVE to be added seperately, below is an example for adding the Arduino Pro Mini for both Debug and Release versions:

Title: 328p Release USBasp
Command: C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude.exe
Arguments: -C"C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -patmega328p -carduino -P\\.\COM16 -b57600 -D -Uflash:w:"$(ProjectDir)Release\$(TargetName).hex":i

Title: 328p Debug USBasp
Command: C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude.exe
Arguments: -C"C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -patmega328p -carduino -P\\.\COM16 -b57600 -D -Uflash:w:"$(ProjectDir)Debug\$(TargetName).hex":i

Things to note:

  • USBasp refers to the fact USBasp is the driver used for programming the avr based devices here.
  • -P//./COM16 The comm port the device is attached to.
  • -patmega328p The device programming to, the Arduino Pro Mini has an Atmega 328p.
  • -carduino The bootloader on the microcontroller, the default for the Arduino Pro Mini is -carduino. The Mega 2560 uses -cwiring.
  • -b57600 The buad rate the BOOTLOADER runs at, the default for Arduino Pro Mini is 57600. The Mega 2560 uses 115200.
  • ..(ProjectDir)Release.. The "Release" here refers to the Release folder of the project, where the release .hex gets compiled to. Hence, Debug would be in ..(ProjectDir)Debug...

Adding these will then give you the option to invoke them under, for example, tools->328p Release USBasp, if you wanted to upload a release build.

If you have any issues with drivers Zadig can be useful as it allows swapping the driver windows is using to interface with the comm port with.

Any other issues please contact the maintainers or contributors listed in Maintainers and Contributors.

Further Documentation

Each sub-folder should have a corresponding README.md that further details specific documentation. These can be found at:

License Information

SUFST Firmware is open source with LICENSE detailing further licensing information.

Contributing to SUFST Firmware

If you wish to contribute to SUFST firmware please make it known to one of the maintainers detailed below. If you are a contributor please DO NOT actively work on the master branch and DO NOT push/merge your code to master, instead, you're happy with your branch create a merge request through here. This allows maintainers to re-view your changes and manually accept them into master. This process allows the maintainers to know exactly whats on the master branch.

Maintainers

Contributors

Version History

Each sub-folder should have a corresponding further detailed change log. These can be found at:

Below details versions of SUFST Firmware:

  • v1.0 - Initial release with CAN Wireless Transceiver and CAN SD Card Logger.