Skip to content

Commit

Permalink
Updated C5 platform & fab variables. Updated documenation for C5 Cell.
Browse files Browse the repository at this point in the history
  • Loading branch information
emarsman committed Oct 29, 2015
1 parent 2e4e96b commit 98688cd
Show file tree
Hide file tree
Showing 23 changed files with 122 additions and 59 deletions.
3 changes: 2 additions & 1 deletion .gitmodules
Expand Up @@ -26,7 +26,8 @@
[submodule "src/libs/openxc-message-format"]
path = src/libs/openxc-message-format
url = https://github.com/openxc/openxc-message-format
ignore = untracked
branch = master
ignore = untracked
[submodule "src/libs/bitfield-c"]
path = src/libs/bitfield-c
url = https://github.com/openxc/bitfield-c
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.mkd
@@ -1,6 +1,13 @@
# OpenXC Vehicle Interface Firmware Changelog

## v7.0.2-dev
## v7.1.0

* Feature: Add support for new CrossChasm C5 Cellular platform.
Includes new http-parser submodule.
Requires new v0.5+ of openxc-message-format
* BREAKING: Update platform variable names from CROSSCHASM_C5 to
CROSSCHASM_C5_BT or CROSSCHASM_C5_CELLULAR (fab c5bt or c5cell)
* Improvement: Improved automatic release process.

## v7.0.1

Expand Down
8 changes: 6 additions & 2 deletions README.rst
Expand Up @@ -4,7 +4,7 @@ OpenXC Vehicle Interface Firmware

.. image:: /docs/_static/logo.png

:Version: 7.0.2-dev
:Version: 7.1.0
:Web: http://openxcplatform.com
:Documentation: http://vi-firmware.openxcplatform.com
:Source: http://github.com/openxc/vi-firmware
Expand Down Expand Up @@ -47,9 +47,13 @@ Releasing
- Update ``script/bootstrap/ci-requirements.txt`` to use released version at PyPI
(i.e. the requirement should be ``openxc==<latestversion>``)

- Make sure you release the openxc-message-format library first if there are any updates

- Update the src/libs/openxc-message-format with ``git submodule update --remote``

- Bump the version using `semantic versioning`_ in
- ``CHANGELOG.mkd``
- ``README.mkd``
- ``README.rst``
- ``src/config.cpp``
- ``docs/index.rst``
- ``docs/conf.py``
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced/advanced.rst
Expand Up @@ -10,4 +10,4 @@ Advanced Firmware Features
binary
benchtesting
devguide
cellular_c5_config
c5_cell_config
8 changes: 4 additions & 4 deletions docs/advanced/c5_cell_config.rst
@@ -1,7 +1,7 @@
Configuration options specific to the CELLULAR_C5
-------------------------------------------------
C5 CELLULAR Config
------------------

When building for the cellular C5, there are some modem-specific build
When building for the C5 Cellular, there are some modem-specific build
options that you can choose. These options are set directly in the
firmware, in the configuration struct from config.cpp. Some common
scenarios are described here.
Expand Down Expand Up @@ -76,7 +76,7 @@ compile the firmware for use with a particular SIM.
Setting up GPS signals:
~~~~~~~~~~~~~~~~~~~~~~~

The GPS receiver in the cellular C5 publishes a GPS message that
The GPS receiver in the C5 Cellular publishes a GPS message that
contains a variety of signals. You can select which signals in this
message will be published through the VI, and how often. Note that all
of the selected GPS signals share a single publish interval.
Expand Down
7 changes: 4 additions & 3 deletions docs/compile/example-builds.rst
Expand Up @@ -71,11 +71,12 @@ The Makefile will always print the configuration used so you can double check.
fab reference build
and for the CrossChasm C5:
and for the CrossChasm C5 Devices, choose one of:

.. code-block:: sh
fab c5 build
fab c5bt build
fab c5cell build
and finally, for the chipKIT Max32:

Expand Down Expand Up @@ -204,7 +205,7 @@ commmand line utility to simplify some of these build configurations. The
``fab`` commands are composable, following this simple formula:

* Start your command with ``fab``
* Specify the target platform with ``chipkit``, ``c5``, ``cellc5``, or ``reference``.
* Specify the target platform with ``chipkit``, ``c5bt``, ``c5cell``, or ``reference``.
* Optionally include ``emulator`` or ``translated_obd2`` to enable one of the
example builds described above.
* End with ``build`` to start the compilation.
Expand Down
6 changes: 5 additions & 1 deletion docs/compile/makefile-opts.rst
Expand Up @@ -21,10 +21,14 @@ These options are passed as shell environment variables to the Makefile, e.g.
``PLATFORM``
Select the target :doc:`microcontroller platform </platforms/platforms>`.

Values: ``FORDBOARD, CHIPKIT, CROSSCHASM_C5, CROSSCHASM_CELLULAR_C5, BLUEBOARD``
Values: ``FORDBOARD, CHIPKIT, CROSSCHASM_C5_BT, CROSSCHASM_C5_CELLULAR, BLUEBOARD``

Default: ``CHIPKIT``

.. note::

The old Platform variable ``CROSSCHASM_C5`` has been renamed to ``CROSSCHASM_C5_BT``

``DEBUG``
Set to ``1`` to compile with debugging symbols and to enable debug logging. By
default the logging will be available via the logging USB endpoint - for UART
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Expand Up @@ -49,9 +49,9 @@
# built documents.
#
# The short X.Y version.
version = '7.0.2'
version = '7.1.0'
# The full version, including alpha/beta/rc tags.
release = '7.0.2-dev'
release = '7.1.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
3 changes: 2 additions & 1 deletion docs/index.rst
Expand Up @@ -4,7 +4,7 @@ OpenXC Vehicle Interface Firmware

.. image:: /_static/logo.png

:Version: 7.0.2-dev
:Version: 7.1.0
:Web: http://openxcplatform.com
:Documentation: http://vi-firmware.openxcplatform.com
:Source: http://github.com/openxc/vi-firmware
Expand Down Expand Up @@ -45,6 +45,7 @@ version to a USB, Bluetooth or network interface.

testing
contributing
license-disclosure

License
-------
Expand Down
6 changes: 3 additions & 3 deletions docs/license-disclosure.rst
@@ -1,6 +1,6 @@
==============================
Open Source License Disclosure
==============================
==================
License Disclosure
==================

The OpenXC vehicle interface firmware is an open source project, and in turn
depends on a few other open source projects. If you are building from source, or
Expand Down
22 changes: 22 additions & 0 deletions docs/platforms/c5-cellular.rst
@@ -1,2 +1,24 @@
C5 Cellular
===========

The C5 Cellular device requires an OBD-II to DB9 Serial cable (which is included) in the
shipment. This requires the device to be attached elsewhere in the vehicle since it does
not plug directly into the port.

Users are required to supply their own SIM card. The SIM card is the Mini-SIM (2FF) size
that supports 3G GSM.

The C5 Cellular device also has it's own GPS signal which can be configured to be
inserted into the OpenXC JSON data.


Sample Web Server
-----------------

https://github.com/openxc/openxc-azure-webserver


Configuration Options
---------------------

/advanced/c5_cell_config.html
40 changes: 26 additions & 14 deletions docs/platforms/crosschasm-c5.rst
@@ -1,12 +1,24 @@
CrossChasm C5 Interface
=======================
CrossChasm C5 Interfaces
========================
This page describes the CrossChasm C5 family of OBD interfaces, which includes
the Bluetooth and Cellular devices. Most things are common
between the different devices and are described on this page. For options specific
to the Cellular device, see :doc:`C5 Cellular Config </advanced/c5_cell_config>`

CrossChasm's C5 OBD interface is compatible with the OpenXC VI
firmware. To build for the C5, compile with the flag ``PLATFORM=CROSSCHASM_C5``.
firmware. To build for one of the C5s, compile with one of the flags:
``PLATFORM=CROSSCHASM_C5`` or ``PLATFORM=CROSSCHASM_CELLULAR_C5``.

CrossChasm has made the C5 `available for purchase
<http://crosschasm.com/SolutionCenter/OpenXC.aspx>`_ from their website, and it
comes pre-loaded with the correct bootloader, so you don't need any additional
.. note::

The old ``CROSSCHASM_C5`` Platform has been renamed to ``CROSSCHASM_C5_BT`` and
the fabric shortcut ``c5`` has been updated to ``c5bt``. Both old variables are
aliased to the new BT forms.

CrossChasm has further information on the C5 `available here
<http://www.crosschasm.com/technology/openxc-hardware/>`_. The devices
will soon be available on the `OpenXC Shop <http://shop.openxcplatform.com/>`_
and come pre-loaded with the correct bootloader, so you don't need any additional
hardware to load the OpenXC firmware.

The C5 connects to the `CAN1 bus pins
Expand All @@ -20,9 +32,7 @@ Assuming your C5 has the :ref:`bootloader <bootloader>` already flashed, once
you have the USB cable attached to your computer and to the C5, follow the same
steps to upload as for the :doc:`chipKIT Max32 <max32>`.

The C5 units offered directly from the `CrossChasm website
<http://crosschasm.com/SolutionCenter/OpenXC.aspx>`_ are pre-programmed with the
bootloader.
The OpenXC C5 units are pre-programmed with the bootloader.

.. _bootloader:

Expand All @@ -41,14 +51,13 @@ In Linux and OS X it will show up as something like `/dev/ACM0`, and you can tre
just as if it were a serial device.

In Windows, you will need to install the `stk500v2.inf
<https://raw.github.com/openxc/PIC32-avrdude-bootloader/master/Stk500v2.inf>`
<https://raw.github.com/openxc/PIC32-avrdude-bootloader/master/Stk500v2.inf>`_
driver before the CDC/ACM modem will show up - download that file, right click
and choose Install. The C5 should now show up as a COM port for for 5 seconds on
bootup.

The C5 units offered directly from the `CrossChasm website
<http://crosschasm.com/SolutionCenter/OpenXC.aspx>`_ are pre-programmed with the
bootloader.

The OpenXC C5 units are pre-programmed with the bootloader.

If you need to reflash the bootloader yourself, a ready-to-go .hex file is
available in the `GitHub repository
Expand All @@ -61,7 +70,8 @@ Compiling
---------

The instructions for compiling from source are identical to the :doc:`chipKIT
Max32 <max32>` except that ``PLATFORM=CROSSCHASM_C5`` instead of ``CHIPKIT``.
Max32 <max32>` except that ``PLATFORM=CROSSCHASM_C5_BT`` or ``PLATFORM=CROSSCHASM_C5_CELLULAR``
instead of ``CHIPKIT``.

If you will not be using the avrdude bootloader and will be flashing directly
via ICSP, make sure to also compile with ``BOOTLOADER=0`` to enable the program
Expand Down Expand Up @@ -103,3 +113,5 @@ LED Lights
The C5 has 2 user controllable LEDs. When CAN activity is detected, the green
LED will be enabled. When USB or Bluetooth is connected, the blue LED will be
enabled.


16 changes: 11 additions & 5 deletions fabfile.py
Expand Up @@ -27,8 +27,9 @@
env.boards = {
"reference": {"name": "FORDBOARD", "extension": "bin"},
"chipkit": {"name": "CHIPKIT", "extension": "hex"},
"c5": {"name": "CROSSCHASM_C5", "extension": "hex"},
"cellc5": {"name": "CROSSCHASM_CELLULAR_C5", "extension": "hex"}
"c5": {"name": "CROSSCHASM_C5_BT", "extension": "hex"}, #for backwards compatibility
"c5bt": {"name": "CROSSCHASM_C5_BT", "extension": "hex"},
"c5cell": {"name": "CROSSCHASM_C5_CELLULAR", "extension": "hex"}
}

def latest_git_tag():
Expand Down Expand Up @@ -253,13 +254,18 @@ def chipkit():
def reference():
env.board = 'reference'

#for backwards compatibility
@task
def c5():
env.board = 'c5'
env.board = 'c5bt'

@task
def cellc5():
env.board = 'cellc5'
def c5bt():
env.board = 'c5bt'

@task
def c5cell():
env.board = 'c5cell'

@task
def json():
Expand Down
15 changes: 10 additions & 5 deletions src/Makefile
Expand Up @@ -18,7 +18,7 @@ show_vi_config_info = $(info - $(call space_pad_to,$(2),4) $(1))

# Call with the name of the variable, a prefix tag if desired (like [AUTODETECTED]),
# and an explanation if desired (like (found in $$PATH)
show_vi_config_variable = $(call show_vi_config_info,$(call space_pad_to,$($(1)),10)= $(1) $(3),$(2))
show_vi_config_variable = $(call show_vi_config_info,$(call space_pad_to,$($(1)),20)= $(1) $(3),$(2))

show_separator = $(info -------------------------)

Expand Down Expand Up @@ -102,7 +102,12 @@ ifneq ($(CJSON_EXISTS),0)
$(error cJSON dependency is missing - run "script/bootstrap.sh")
endif

VALID_PLATFORMS = CHIPKIT BLUEBOARD FORDBOARD CROSSCHASM_C5 CROSSCHASM_CELLULAR_C5
VALID_PLATFORMS = CHIPKIT BLUEBOARD FORDBOARD CROSSCHASM_C5_BT CROSSCHASM_C5_CELLULAR

#for backwards compatibility
ifeq ($(PLATFORM), CROSSCHASM_C5)
PLATFORM = CROSSCHASM_C5_BT
endif

OBJDIR = build/$(PLATFORM)
LIBS_PATH = libs
Expand Down Expand Up @@ -151,10 +156,10 @@ include tests/tests.mk
# used in the included Makefiles
ifeq ($(PLATFORM), CHIPKIT)
include platform/pic32/pic32.mk
else ifeq ($(PLATFORM), CROSSCHASM_C5)
else ifeq ($(PLATFORM), CROSSCHASM_C5_BT)
include platform/pic32/pic32.mk
else ifeq ($(PLATFORM), CROSSCHASM_CELLULAR_C5)
# force a modified set of linkers for cellular c5
else ifeq ($(PLATFORM), CROSSCHASM_C5_CELLULAR)
# force a modified set of linkers for c5 cellular
# this is necessary to support OTA upgrades
# we only want to change the FLASH erase rules for the bootloader
# all other settings remain the same, and chipKIT-application-COMMON.ld is still used
Expand Down
6 changes: 3 additions & 3 deletions src/bluetooth_platforms.h
Expand Up @@ -8,7 +8,7 @@
#define BLUETOOTH_ENABLE_PORT 0
#define BLUETOOTH_ENABLE_PIN 17

#elif defined(CROSSCHASM_C5)
#elif defined(CROSSCHASM_C5_BT)

#define BLUETOOTH_SUPPORT

Expand All @@ -21,10 +21,10 @@
#define BLUETOOTH_ENABLE_PORT 0
#define BLUETOOTH_ENABLE_PIN 32 // PORTE BIT5 (RE5)

#elif defined(CROSSCHASM_CELLULAR_C5)
#elif defined(CROSSCHASM_C5_CELLULAR)

#elif defined(CHIPKIT)

#define BLUETOOTH_SUPPORT

#endif
#endif
2 changes: 1 addition & 1 deletion src/config.cpp
Expand Up @@ -88,7 +88,7 @@ openxc::telitHE910::TelitDevice telitDevice = {
openxc::config::Configuration* openxc::config::getConfiguration() {
static openxc::config::Configuration CONFIG = {
messageSetIndex: 0,
version: "7.0.2-dev",
version: "7.1.0",
payloadFormat: PayloadFormat::DEFAULT_OUTPUT_FORMAT,
recurringObd2Requests: DEFAULT_RECURRING_OBD2_REQUESTS_STATUS,
obd2BusAddress: DEFAULT_OBD2_BUS,
Expand Down
2 changes: 1 addition & 1 deletion src/libs/openxc-message-format
4 changes: 2 additions & 2 deletions src/platform/pic32/canutil.cpp
Expand Up @@ -4,11 +4,11 @@
#include "util/log.h"
#include "gpio.h"

#if defined(CROSSCHASM_C5)
#if defined(CROSSCHASM_C5_CT)
#define CAN1_TRANSCEIVER_SWITCHED
#define CAN1_TRANSCEIVER_ENABLE_POLARITY 0
#define CAN1_TRANSCEIVER_ENABLE_PIN 38 // PORTD BIT10 (RD10)
#elif defined(CROSSCHASM_CELLULAR_C5)
#elif defined(CROSSCHASM_C5_CELLULAR)
#define CAN1_TRANSCEIVER_SWITCHED
#define CAN1_TRANSCEIVER_ENABLE_POLARITY 0
#define CAN1_TRANSCEIVER_ENABLE_PIN 38 // PORTD BIT10 (RD10)
Expand Down
4 changes: 2 additions & 2 deletions src/platform/pic32/lights.cpp
@@ -1,7 +1,7 @@
#include "lights.h"
#include "gpio.h"

#if defined(CROSSCHASM_C5)
#if defined(CROSSCHASM_C5_BT)

#define USER_LED_A_SUPPORT
#define USER_LED_A_POLARITY 0 // turn on LED = drive pin low
Expand All @@ -11,7 +11,7 @@
#define USER_LED_B_POLARITY 0 // turn on LED = drive pin low
#define USER_LED_B_PIN 4 // PORTC BIT14 (RC14) = BLUE

#elif defined(CROSSCHASM_CELLULAR_C5)
#elif defined(CROSSCHASM_C5_CELLULAR)

#define USER_LED_A_SUPPORT
#define USER_LED_A_POLARITY 0 // turn on LED = drive pin low
Expand Down

0 comments on commit 98688cd

Please sign in to comment.