Skip to content

Commit 2144058

Browse files
committed
C5 instructions for Mac
release process/doc updates
2 parents 6dd2403 + 3a794fc commit 2144058

10 files changed

+108
-87
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ before_install:
88
- sudo apt-get update -qq
99
- if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq -y libgd2-xpm ia32-libs
1010
ia32-libs-multiarch; fi
11-
- script/bootstrap.sh
11+
- travis_wait script/bootstrap.sh
1212
- cd src
1313
after_success:
1414
- PLATFORM=TESTING make coverage

README.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ Releasing
7070
next development release (one patch release up with the ``-dev`` suffix, e.g.
7171
``v0.9.2-dev``
7272

73-
- Also change ``script/bootstrap/pip-requirements.txt`` back to using the development
74-
version from Git: ``-e git+https://github.com/openxc/openxc-python.git@next#egg=openxc``
75-
7673
- Go to https://github.com/openxc/vi-firmware/releases and promote the tag you
7774
just created to a new release - copy and paste the changelog into the
7875
description.
587 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

docs/compile/example-builds.rst

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ The Makefile will always print the configuration used so you can double check.
6767
* :ref:`Mass storage device <msd-storage>` (``MSD_ENABLE`` is ``0``) is disabled
6868
by default and is available on certain C5 devices which have a provision to connect
6969
a SD card. The time intervals at which the data is logged is
70-
(``DEFAULT_FILE_GENERATE_SECS``is ``180``) set to 180 seconds by default.
70+
(``DEFAULT_FILE_GENERATE_SECS`` is ``180``) set to 180 seconds by default.
7171

7272
.. NOTE::
7373
There's a shortcut for this default build, using the Fabric tool and an
@@ -94,6 +94,7 @@ The Makefile will always print the configuration used so you can double check.
9494
9595
Get the idea? These shortcuts will make sure the flags are set to their
9696
defaults, regardless of what you may have in your current shell environment.
97+
See the fabfile.py or run % fab -l for a complete list of options.
9798

9899
Automatic Recurring OBD-II Requests Build
99100
==========================================
@@ -228,7 +229,9 @@ in this case CrossChasm C5 BLE is used as an example:
228229
.. code-block:: sh
229230
230231
fab c5ble build test_mode_only
231-
232+
233+
.. _fabric-shortcuts:
234+
232235
Fabric Shortcuts
233236
================
234237

@@ -252,7 +255,14 @@ while this builds the default firmware, ready for OBD2 requests for the chipKIT:
252255

253256
.. code-block:: sh
254257
255-
fab chipkit build
258+
fab chipkit obd2 build
256259
257-
260+
You can specify the message format with ``json``, ``protobuf``, or ``messagepack``:
261+
262+
.. code-block:: sh
263+
264+
fab reference protobuf build
265+
266+
Other useful options are ``debug``, ``msd_enable``, ``test``, and ``clean``.
267+
See the fabfile.py or run % fab -l for a complete list of options.
258268
The ``fab`` commands can be run from any folder in the vi-firmware repository.

docs/compile/makefile-opts.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ These options are passed as shell environment variables to the Makefile, e.g.
1515

1616
.. note::
1717

18-
Don't miss the ``Fabric`` helper scripts for the :doc:`most common build
19-
configurations <example-builds>`.
18+
Don't miss the ``Fabric`` helper scripts for the common build configurations in
19+
:ref:`fabric-shortcuts`.
2020

2121
``PLATFORM``
2222
Select the target :doc:`microcontroller platform </platforms/platforms>`.

docs/platforms/crosschasm-c5.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ Flashing a Pre-compiled Firmware
3434
--------------------------------
3535

3636
Assuming your C5 has the :ref:`bootloader <bootloader>` already flashed, follow
37-
these :download:`instructions </_static/QuickStart guide to using C5 Hardware and OpenXC.pdf>`
38-
.. `instructions <http://vi-firmware.openxcplatform.com/en/master/_static/QuickStart%20guide%20to%20using%20C5%20Hardware%20and%20OpenXC.pdf>`_.
37+
these :download:`instructions </_static/QuickStart guide to using C5 Hardware and OpenXC.pdf>`.
3938

4039
.. _bootloader:
4140

fabfile.py

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@
3737
"c5ble": {"name": "CROSSCHASM_C5_BLE", "extension": "hex"}
3838
}
3939

40+
env.msd_boards = {
41+
"c5bt": {"name": "CROSSCHASM_C5_BT", "extension": "hex"},
42+
"c5cell": {"name": "CROSSCHASM_C5_CELLULAR", "extension": "hex"},
43+
}
44+
4045
def latest_git_tag():
4146
description = local('git describe master', capture=True).rstrip('\n')
4247
if '-' in description:
@@ -120,11 +125,11 @@ def build_options():
120125

121126
DEFAULT_COMPILER_OPTIONS = {
122127
'DEBUG': env.debug,
123-
'MSD_ENABLE' : 0,
124-
'DEFAULT_FILE_GENERATE_SECS' : 180,
128+
'MSD_ENABLE' : env.msd_enable,
129+
'DEFAULT_FILE_GENERATE_SECS' : env.default_file_generate_secs,
125130
'BOOTLOADER': env.bootloader,
126-
'TEST_MODE_ONLY': 0,
127-
'TRANSMITTER': False,
131+
'TEST_MODE_ONLY': env.test_mode_only,
132+
'TRANSMITTER': env.transmitter,
128133
'DEFAULT_LOGGING_OUTPUT': env.logging_output,
129134
'DEFAULT_METRICS_STATUS': False,
130135
'DEFAULT_CAN_ACK_STATUS': False,
@@ -141,14 +146,8 @@ def build_options():
141146
}
142147

143148
options = copy.copy(DEFAULT_COMPILER_OPTIONS)
144-
145-
options['DEBUG'] = env.debug
146-
options['MSD_ENABLE'] = env.msd_enable
147-
options['TEST_MODE_ONLY'] = env.test_mode_only
148-
options['DEFAULT_FILE_GENERATE_SECS'] = env.default_file_generate_secs
149-
options['BOOTLOADER'] = env.bootloader
150-
options['TRANSMITTER'] = env.transmitter
151149
options['PLATFORM'] = board_options['name']
150+
152151
if env.mode == 'emulator':
153152
options['DEFAULT_EMULATED_DATA_STATUS'] = True
154153
options['DEFAULT_POWER_MANAGEMENT'] = "ALWAYS_ON"
@@ -170,6 +169,16 @@ def compile_firmware(build_name, target_path):
170169
target_path, build_name, board['name'],
171170
env.firmware_release, board['extension']))
172171

172+
for board_name, board in env.msd_boards.iteritems():
173+
msd_enable()
174+
env.board = board_name
175+
build(capture=True, do_clean=True)
176+
local("cp build/%s/vi-firmware-%s.%s %s/vi-%s-firmware-%s-msd-ct%s.%s"
177+
% (board['name'], board['name'], board['extension'],
178+
target_path, build_name, board['name'],
179+
env.firmware_release, board['extension']))
180+
env.msd_enable = False #reset
181+
173182
def compress_release(source, archive_path):
174183
with lcd(os.path.dirname(source)):
175184
local("zip -r %s %s" % (archive_path, os.path.basename(source)))
@@ -189,7 +198,7 @@ def obd2():
189198
@task
190199
def msd_enable():
191200
if env.board == "c5" or env.board == "c5bt" or env.board == "c5cell":
192-
env.msd_enable = True
201+
env.msd_enable = True
193202
else:
194203
abort("MSD_ENABLE is only defined for C5_BT or C5_CELL platforms")
195204

release-README

Lines changed: 69 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -7,51 +7,55 @@ interface firmware in a few common configurations for each supported platform.
77
For instructions on how to update your hardware device with one of these files,
88
check out the OpenXC website:
99

10-
http://openxcplatform.com/vehicle-interface/firmware.html
11-
12-
## Emulator Build
10+
http://openxcplatform.com/vehicle-interface/hardware.html
11+
12+
---------------
13+
| Default Build |
14+
---------------
15+
16+
The files with `default` in the name are compiled for each VI platform with
17+
these default Makefile options:
18+
19+
'DEBUG': False,
20+
'MSD_ENABLE' : False,
21+
'DEFAULT_FILE_GENERATE_SECS' : 180,
22+
'BOOTLOADER': True,
23+
'TEST_MODE_ONLY': False,
24+
'TRANSMITTER': False,
25+
'DEFAULT_LOGGING_OUTPUT': "OFF",
26+
'DEFAULT_METRICS_STATUS': False,
27+
'DEFAULT_CAN_ACK_STATUS': False,
28+
'DEFAULT_ALLOW_RAW_WRITE_NETWORK': False,
29+
'DEFAULT_ALLOW_RAW_WRITE_UART': False,
30+
'DEFAULT_ALLOW_RAW_WRITE_USB': True,
31+
'DEFAULT_OUTPUT_FORMAT': "JSON",
32+
'DEFAULT_RECURRING_OBD2_REQUESTS_STATUS': False,
33+
'DEFAULT_POWER_MANAGEMENT': "SILENT_CAN",
34+
'DEFAULT_USB_PRODUCT_ID': 1,
35+
'DEFAULT_EMULATED_DATA_STATUS': False,
36+
'DEFAULT_OBD2_BUS': 1,
37+
'NETWORK': False,
38+
39+
----------------
40+
| Emulator Build |
41+
----------------
1342

1443
The files with `emulator` in the name are compiled for each VI platform with
15-
these Makefile options:
16-
17-
'DEBUG': False,
18-
'BOOTLOADER': True,
19-
'TRANSMITTER': False,
20-
'DEFAULT_LOGGING_OUTPUT': "OFF",
21-
'DEFAULT_METRICS_STATUS': False,
22-
'DEFAULT_CAN_ACK_STATUS': False,
23-
'DEFAULT_ALLOW_RAW_WRITE_NETWORK': False,
24-
'DEFAULT_ALLOW_RAW_WRITE_UART': False,
25-
'DEFAULT_ALLOW_RAW_WRITE_USB': True,
26-
'DEFAULT_OUTPUT_FORMAT': "JSON",
27-
'DEFAULT_RECURRING_OBD2_REQUESTS_STATUS': False,
28-
'DEFAULT_POWER_MANAGEMENT': "ALWAYS_ON",
29-
'DEFAULT_USB_PRODUCT_ID': 0x1,
30-
'DEFAULT_EMULATED_DATA_STATUS': True,
31-
'DEFAULT_OBD2_BUS': 1,
32-
'NETWORK': False,
33-
34-
## Translated OBD2 Build
44+
the following changes from the default Makefile options:
45+
46+
'DEFAULT_POWER_MANAGEMENT': "ALWAYS_ON",
47+
'DEFAULT_EMULATED_DATA_STATUS': True,
48+
49+
50+
-----------------------
51+
| Translated OBD2 Build |
52+
-----------------------
3553

3654
The files with `translated_obd2` in the name are compiled for each VI platform
37-
with these Makeflie options:
38-
39-
'DEBUG': False,
40-
'BOOTLOADER': True,
41-
'TRANSMITTER': False,
42-
'DEFAULT_LOGGING_OUTPUT': "OFF",
43-
'DEFAULT_METRICS_STATUS': False,
44-
'DEFAULT_CAN_ACK_STATUS': False,
45-
'DEFAULT_ALLOW_RAW_WRITE_NETWORK': False,
46-
'DEFAULT_ALLOW_RAW_WRITE_UART': False,
47-
'DEFAULT_ALLOW_RAW_WRITE_USB': True,
48-
'DEFAULT_OUTPUT_FORMAT': "JSON",
49-
'DEFAULT_RECURRING_OBD2_REQUESTS_STATUS': True,
50-
'DEFAULT_POWER_MANAGEMENT': "OBD2_IGNITION_CHECK",
51-
'DEFAULT_USB_PRODUCT_ID': 0x1,
52-
'DEFAULT_EMULATED_DATA_STATUS': False,
53-
'DEFAULT_OBD2_BUS': 1,
54-
'NETWORK': False,
55+
with the following changes from the default Makefile options:
56+
57+
'DEFAULT_RECURRING_OBD2_REQUESTS_STATUS': True,
58+
'DEFAULT_POWER_MANAGEMENT': "OBD2_IGNITION_CHECK",
5559

5660
This firmware will query the vehicle to see which of a subset of PIDs are
5761
supported (the list:
@@ -61,34 +65,36 @@ are output as simple vehicle messages, e.g.:
6165

6266
{"name": "engine_speed", "value": 540}
6367

64-
## Default OBD2 Build
65-
66-
The files with `obd2` in the name are compiled for each VI platform with these
67-
Makeflie options:
68-
69-
'DEBUG': False,
70-
'BOOTLOADER': True,
71-
'TRANSMITTER': False,
72-
'DEFAULT_LOGGING_OUTPUT': "OFF",
73-
'DEFAULT_METRICS_STATUS': False,
74-
'DEFAULT_CAN_ACK_STATUS': False,
75-
'DEFAULT_ALLOW_RAW_WRITE_NETWORK': False,
76-
'DEFAULT_ALLOW_RAW_WRITE_UART': False,
77-
'DEFAULT_ALLOW_RAW_WRITE_USB': True,
78-
'DEFAULT_OUTPUT_FORMAT': "JSON",
79-
'DEFAULT_RECURRING_OBD2_REQUESTS_STATUS': False,
80-
'DEFAULT_POWER_MANAGEMENT': "OBD2_IGNITION_CHECK",
81-
'DEFAULT_USB_PRODUCT_ID': 0x1,
82-
'DEFAULT_EMULATED_DATA_STATUS': False,
83-
'DEFAULT_OBD2_BUS': 1,
84-
'NETWORK': False,
68+
--------------------
69+
| Default OBD2 Build |
70+
--------------------
71+
72+
The files with `obd2` in the name are compiled for each VI platform
73+
with the following changes from the default Makefile options:
74+
75+
'DEFAULT_POWER_MANAGEMENT': "OBD2_IGNITION_CHECK",
8576

8677
This firmware is ready to received OBD2 requests over USB or Bluetooth (see the
8778
message format: https://github.com/openxc/openxc-message-format) but does *not*
8879
have any pre-defined recurring requests. You probably want this build if you are
8980
sending your own, custom diagnostic requests.
9081

91-
## License
82+
------------
83+
| MSD Builds |
84+
------------
85+
86+
For all of the above builds, another similar build is done that enables the SD card
87+
(Mass Storage Device) for the C5_BT and C5_CELLULAR platforms. All of the files
88+
have "msd" after the platform in the filename. These are all compiled with the
89+
additional Makefile options
90+
91+
'MSD_ENABLE' : True,
92+
'DEFAULT_FILE_GENERATE_SECS' : 180,
93+
94+
95+
---------
96+
| License |
97+
---------
9298

9399
These binaries do not contain any closed source components. They are compiled
94100
soley from the open source OpenXC vehicle interface firmware

0 commit comments

Comments
 (0)