1 Change Log for the firmware code. Newest version at top, newest changes at the bottom of each.
3 Please add your name, and a time/date WITH time zone info before every line.
5 0.0.18 (JackTheRipper) : 10:40pm 22/12/08 - UK Time
6 Fred 12/11 7:04am: Added flash and ram receive functions
7 Added wrappers for debug and error
8 Modified flash error handling to be compatible with overall scheme
9 Renamed all counters more sensibly
10 Major tidy up of init.c - more to do in the future
11 Fred 12/11 7:51pm: Created generic flash burning wrapper
12 Moved flash error handling into wrapper
13 Moved page ram init to functions per block of data
14 Moved tables to 3 pages from 2 and put functions in place to init them
15 Created multi sector flash burn function
16 Previously added table size guide
17 Previously added testing matrix for comms
18 Previously added hardware interface doc
19 Fred 13/11 8:52am: Fixed bug where config was coming from flash, not ram.
20 Completed paging memory exercise for now
21 Removed all linker warnings by shuffling code and data
22 Fred 14/11 7:45am: Split regions into regions.x out of the main linker script
23 Split page for small tables into chunks to cause link issues if oversize and still work if undersize
24 Fred 16/11 5:05pm: Fixed hard reset functionality
25 Refactored the table lookup to be faster and use less space
26 Updated serial core docs
27 Added doc describing the datalog format
28 More comms test packets
30 Fred 18/11 6:04pm: Fixed missing text1 copy options
31 Changed makefile to be faster and more versatile
32 Migrated rodata back to its own section(s)
33 Moved ADC tables and core var gen to a paged flash region together
34 Fred 19/11 8:30am: Migrated data init to static from dynamic
35 Fixed comms dictionary lookup addresses with lookup addr init function
36 Fred 19/11 5:55pm: Moved all ISR code to text1 so we know how big it is and how big the rest is
37 Fred 20/11 7:55am: Added check for packet from own address
38 Changed error codes to be more meaningful
39 Fred 20/11 6:37pm: Added interface data map
40 Fred 21/11 8:27pm: Added windows Makefile
41 Added size utility call
42 Added example datalog json
43 Merged lambda and ve into fuel files
44 Fred 22/11 2:27pm: Split fixed config in two different pieces
46 Split fixed configs into two different files
47 Added extra user text field and filled out to section boundary
48 Moved some functions back into the text areas
49 Added interface packet descriptions
51 Split headers out a bit
52 Fixed and added some comments etc
53 Added win make file generator
54 Tweaked makefile to work with windows
55 Fred 25/11 11:37pm: Added test packets to dump registers with SM
56 Added memory management documentation
57 Added example settings file
58 Added tuner interface overview doc
59 Further updated pin out doc
60 Fred 26/11 11:12pm: Added Sean's flash fixes in and looped flash erase/burn to test it
61 More changes to the json stuff
62 Fixed bug with makefile that caused it to regen files without need
63 Fred 27/11 6:31pm: Added custom packet definition file for tuner
64 Added windows makefile generation to the makefile
65 Optimised flash writing by moving page swapping up one level
66 Removed cruft from comms core
67 Relocated dictionary to paged flash
68 Fred 29/11 7:20pm: Added axis and cell value adjustment routines for the main tables
69 Added axis adjustment error checking function
70 Rearranged error codes a bit
71 Added test data block for testing serial comms
72 Fred 30/11 10:19am: Removed redundant code from serial comms
73 Added basic datalog function and serial option
75 Rearranged and renamed some doc files and interface descriptors
76 Fred 30/11 8:04pm: Added async datalog sender
77 Added configurator for async logging
78 Added all minor parts of the dynamic config to the dictionary
79 Divided page f9 into data and functions
80 Added two d us table adjuster functions and serial routines
81 Fred 1/12 10:22pm: Fixed serial bug with small hack (needs better fix)
82 Moved many functions to paged flash
83 Fixed copy paste error in address init code
84 Fixed - instead of + in cell setting function
85 Fred 7/12 10:41pm: Added data map overview doc
86 Fred 11/12 12:31am: Added JSONSchema for one JSON file
87 Fred 18/12 6:29pm: Refactored array based banking to pointer based - Awesome change
88 Fixed pointer to a pointer bug in datalog introduced above
89 Removed extra copies of core and derived vars from header
90 Documented new pointer scheme in header
91 Fred 21/12 2:37am: Fixed bug, flash and ram pages/addresses were swapped in a flash burn function call
92 Added check for dest address in ram region
93 Fred 21/12 10:46pm: Hacked in datalog delay of 1 second
94 Hacked orange button to turn basic datalog off and on
95 Added comments for future changes to serial stuff
96 Added ifdef wrappers around unrequired init stuff
97 Fred 22/12 8:46pm: Split address lookup function out of comms file
98 Added more comments etc
99 Moved old bugs to mantis and removed bugs.txt
100 Cleaned out HEAPS of old cruft, tidied up and commented stuff
102 0.0.17 (SpudEchoes) 12:17 am 10/11/08 - UK time
103 Fred 8/10 7:40am: Moved flash routine from old text1 to text
104 Added descriptive comment to the main table definition
105 Added sizeof defines to the structs file
106 Shrunk and renamed text1 to lookup with 3 2k tables in it
107 Fred 15/10 10:50am: Removed all old busy wait ascii serial code
108 Added packetising escaping checksumming receive ISR code
109 Added packetising escaping checksumming send ISR code
110 Added code to send back whatever it receives for testing purposes
111 Temporarily changed make file to avoid a couple of options an old version of gcc didn't have
112 Added document describing serial implementation
113 Fred 20/10 10:56am: Added serial specification docs to the project docs dir and renamed them
114 Added test packet directory
115 Made some fixes to the ISR handling code for serial
116 Added some more serial counters and masks
117 Fred 20/10 8:11pm: Added core comms source and header files
118 Removed commented out legacy code in places
119 Updated tasks, bugs, tests, mindmap
120 Fred 21/10 8:00am: Refactored escape code in rx section
121 Added test packet for escape code generation EMS side
122 Fred 21/10 9:50pm: Updated serial impl document
123 Reordered receive statements for better speed and accuracy
124 Generated individual bytes for sending
125 Fred 22/10 6:55pm: Made the serial packet handler compile
126 Commented out the copy-only sections in makefile
127 Moved things out of commsISRs.h and added more things to commsCore.h
128 Fred 22/10 9:30pm: Updated release procedure to include internal version changes to prevent incorrect ones recurring
129 Removed burnbuf as unrequired now
130 Bumped the versions in the constants file.
131 Fred 23/10 1:54am: Completed and tested serial checksum and escape functionality.
132 Fred 23/10 11:54pm: Added substantial packet handling logic.
133 Fred 25/10 3:00pm: Fixed array length mismatch
134 Added header decoding logic
135 Refactored serial headers to be more sensible and share vars
136 Removed instances of using "&= ~0x" from the code
137 Renamed various serial variables
138 Fred 25/10 9:49pm: Added line count of s19 to makefile
139 Fred 26/10 00:19am: Added interface version request/response code
140 Fred 26/10 6:47pm: Added firmware version request/response code
141 Added max packet size request/response code
142 Added echo wrapper packet request/response code
143 Added hard reset request and action code (using real vector location)
144 Added async error code packets
145 Added async debug packets
146 Added stringCopy utility to avoid using another library
147 Added call to writeAlignedBlock function
148 Sean 29/10 11:30pm: Fixed flashWrite.c mistakes
149 Fred 31/10 6:00pm: Fixed issue number 4 by changing linker script with AT() clause
150 Moved output dirs to lowercase and shorter names
151 Moved some functions to fixedconf flash blocks temporarily
152 Reclaimed 16 bytes of space with a mem.x fix
153 Fred 03/11 00:48am: Made a number of fixes to the serial comms code to be detailed in later change log
154 Fred 04/11 7:25pm: Migrated memory management to paged style upto 128k of space in one flash block.
155 Fred 07/11 1:23pm: Added flash block return by ID function
156 Fred 08/11 1:38pm: Added soft reset function
157 Fred 09/11 2:37am: Added ram block return by ID function
158 Added ram to flash burn by ID function
159 Added comm to ram write by ID function
160 Added comm to flash write by ID function (and update ram)
161 Fred 09/11 12:30pm: Added memory location lookup and struct
162 Fred 09/11 5:29pm: Removed bigtables linear page stuff
163 Fred 10/11 8:16am: Added validation function for main tables
164 Added limits to table return functions
165 Fixed bug when address not ours dropping packet
166 Fred 10/11 11:26pm: Added debug and error packets back in
167 Merged Seans fixes for flash in
169 0.0.16 (FlashGordon) 11:12am 6/10/08 - NZ time
170 Fred: Removed reference to TX0 pin S1 from portHISR()
171 Fred: Used fuel pump pin for portHISR() indicator
172 Fred: Removed flow control pin function from pin out definition
173 Fred: Added tachometer function to pin out definition
174 Fred: Moved User LED flash to RTC to free MDC ISR for Tacho use
175 Fred: Fixed Makefile dumps section
176 Fred: Added configurable tacho output
177 Fred: Fixed RPM calc to use correct variable scale
178 Fred: Fixed scheduler to always sample ADCs
179 Fred: Made baud configurable (default 115200)
180 Fred: Added more runtimes to struct and code to populate them
181 Fred: Added latencies struct and code to populate them
182 Fred: Changed broken sync code to be more simple
183 Fred: Refactored sleep function to allow more range
184 Fred: Added micro second sleep function
185 Fred: Moved reset variables to a function
186 Fred: Added flash globals temporary file
187 Fred: Added dwell spread sheet
188 Fred: Added injector dead time spread sheet
189 Fred: Added tables for IDT and dwell vs voltage
190 Fred: Added table lookup for unsigned short 2d 16 long
191 Fred: Added overflow check for reference PW
192 Fred: Changed table functions to return values directly
193 Fred: Removed duplicate MAT storage call
194 Fred: Moved flag clear for RTI to front
195 Fred: Reduced Ram to 6k to allow 2k of minor data and 4k window of big tables
196 Fred: Reduced Ram to 5k to allow 1k of flash burn buffer 2k of minor data and 4k window of big tables
197 Fred: Added more MAP sensor and other definitions to the globalDefines file
198 Fred: Modified Makefile to compile hand written assembly with C cleanly
199 Fred: Renamed stoichOct to stoichAFROct
200 Fred: Updated IAT and CHT tables to use correct bias resistor value of 2.7k
201 Fred: Reformatted pinout doc and added two columns for bootload and reset states
202 Fred: Moved ADC pins to final locations on bank 0
203 Fred: Merged in Seans Flash changes :
204 Sean: Added flash related header and source files
205 Sean: Added assembly to load code to stack for burning own flash
206 Sean: Added flash erase function
207 Sean: Added flash word write function
208 Sean: Added flash write aligned block function
209 Sean: Documented flash functionality in the code
210 Fred: Added output to makefile to see each operation type
211 Fred: Removed #define from all constants C files
212 Fred: Added main table unions
213 Fred: Added ram regions for the purpose of aligning large blocks of data
214 Fred: Added include and memcpy references to bring data up into ram
215 Fred: Added RPAGE to header to allow paging of tables in and out of visible space
216 Fred: Added paged tuning blocks such that table switching almost changes a full tune
217 Fred: Migrated small tables into struct for paging
218 Fred: Split flash into 5 blocks to ensure no overflow occurs in smalltables
219 Fred: Created mechanism to ensure paged data is retrieved correctly by implementing basis of table switching
220 Fred: Moved all references to tables to ram copies
221 Fred: Split flash again for fixed config block.
222 Fred: General formatting and file name and content changes
223 Fred: Shifted tunable configs to structs for paging
224 Fred: Moved copy from flash to ram to start of init
225 Fred: Future comms pseudo code added
226 Fred: Various spelling fixes
228 0.0.15 (Avogadro) 10/7/08
229 Moved injector.c inc file into inc
230 Added main running variables struct
231 Added input handling code for all main vars
232 Renamed all clock counters clock instead of counter
233 Added counter for calcs routine
234 Added struct for counters
235 Added struct for clocks
236 Added struct for runtimes
237 Added flash .c and .h files
238 Added derived vars struct
239 Added lookup .c and .h files
240 Added VE tables and Advance tables
241 Reformated structs to use typedef statement
242 Added error codes define file
243 Added config defaults file
244 Split remaining settings out into structs.h file
245 Moved documentation about structs to structs file
246 Removed contents of initConfiguration()
247 Moved tuning tables and lookup tables and configuration to the other primary flash block.
248 Added table lookup routine for X by Y unsigned short main tables
249 Changed main table structure to be more suitable for variable sizing
250 Added config checker that outputs a count of misconfigurations
251 Added send function for string without length relying on null byte to terminate
252 Added send function for block of data from memory with address and length
253 Fixed the ignition out pins in the pin out doc
254 Added the hardware flow control pin to PE7 in the pin out doc
255 Added full length equation with divisors and scaling
256 Sorted out the memory management up to 48k
257 Setup the paged macros for data and functions
258 Moved some vars to globals calculated at boot time to save loop time
259 Moved user string to config block
260 Added 16x2xunsigned short table struct
261 Added MAF input to the pin out doc
262 Added MAF transfer lookup table
263 Added correct and physics based mathematics code and calcs
264 Relocated rodata into text for loading convenience
265 Added text2 region temporarily (page window)
266 Added dependency on makefile and linker stuff to make file
267 Added relocation of flash block lma addresses to make file
268 Added realistic data to the MAF lookup table
269 Added a couple of basic hard coded scripts for memory analysis
270 Added dumps of each object file
271 Refactored IO banking system and documented it
272 Changed timer extension use code to use union for performance
273 Split core vars generation out into own function
274 Split derived vars generation out into own function
275 Added some structure for corrections to PW
276 Swapped order of CRLF pair to be correct in HR log function
277 Rearranged main.c code for better effect
278 Slowed logging down to 10x per second
279 Increased verbosity of log
280 Added reset rpm to zero if non synchronously sampling ADCs
281 Split Lambda table out from VETables.c so it can be arranged in memory more conveniently
282 Split config into tunable and fixed
283 Moved many literals to #defines
284 Fixed "out by 100" error on load indices in tables
285 Moved rough RPM calc to per event rather than per rev and inited cycleTime to longmax
286 Reincluded the broken ignition code
287 General tidy up of all files
289 0.0.14 (entropy) 24/6/08
290 Added FreeTherm generated transfer table for IAT
291 Added FreeTherm generated transfer table for CHT
292 Added code to obtain MAP from a min range pair
293 Added code to obtain EGO from a min range pair
294 Added code to obtain TPS from an ADC min/max/range and max set of data
295 Changed logging code to be more readable and compact
296 Changed SCI block to use a base address
297 Added configuration and header for the second block of ADC inputs
298 Added code to sample the second block
299 Changed ADC blocks to use base address
300 Added AAP variable and calculation
301 Added BRV variable and calculation
302 Changed 3 ints to 3 unsigned chars in utils.c
303 Factored out ADC sampling to two methods in different ways
304 Fixed poor header structure (again) (might have it right this time)
305 Removed unrequired void from init() definition.
306 Added ADC reading counters
307 Renamed ADC reading timeout counter
308 CamelCased all files except linker scripts
309 Factored out hr serial logging
310 Moved pwm demo to utils.c
311 Measured time of ADC reading functions at less than 1us each, and removed non loop implementation
312 Used #define to ensure extern keyword applied appropriately
313 Fixed makefile dependencies to only recompile sources that are changed
314 Fix makefile paths for execution from explicit to user based
315 Changed makefile to chain execution such that each stage is done only once
316 Added output dir to keep clutter down
317 Added backup of .s19 to makefile
318 Added extern #define structure to all headers
319 Split oversized freeems.h down to managable chunks
320 Moved s19 storage to own directory
321 Introduced dependency on all headers for all source files (previously rebuilding ALL files EVERY time)
323 0.0.13 (googoogaga) 12/6/08
325 Added basic logging of interesting vars using serial
326 Added serial send unsigned char,short,long
327 Added itoa() functions for char,short,long
328 Added serial send string
329 Added header section for SCI0
330 Started adding serial setup stuff
331 Fixed baud config const
332 Added comments about structure to scheduler
333 Fixed issue with loops in ign sched
334 Remove unused bit bang demo function
335 Add trial send call to main loop
336 Added duplicate SCI0 section to header with base to use later
337 Added interface, version, and user strings and definitions
339 0.0.12 (bastard) 4/5/08
340 Fixed bug 5 : forgot to add code run time to test for injector hard on behaviour!
341 Added tooth counters for displaying tooth timing patterns in conjunction with last tooth time stamps at low RPM
342 Added configurable tooth polarity to rpm/engine position inputs
343 Fixed a mistake in the code that allowed a ~0x10 to occur (wasn't causing a problem in this instance)
344 Added PIT based queued ignition functionality which kinda sorta works
346 0.0.11 (cookin') - 27/3/08
347 Added freemind mind map of FreeEMS code layout/structure
348 Removed legacy code snippets.c
349 Found and fixed bug where the period time was being used before it was valid
350 Found and fixed a bug where injector timing was not functioning correctly
351 Found and fixed a bug whereby overlapping injection working correctly relied on an accurate period of a future cycle
352 Added more realistic sync loss in several places
353 Changed some variable names etc
355 0.0.10 (squashed) - 23/3/08
356 Fixed bug 1 : array index out of bounds corruption in scheduler.
357 Added code to limit retard/advance of fueling, untested, may not be working correctly.
358 Added modulus down counter interrupt to flash "user led" to indicate board is functioning.
359 Fixed banked in and out calcs system
361 0.0.9 (exponent) - 22/3/08
362 Refined injector control further
363 Implemented RTC in RTI for 1/8 milli, milli, tenths of, seconds, minutes each with 65535 max
364 Removed 6x duplication in injection_isrs.c by splitting to injector_isr.c and using defines and imports.
365 Added support for individual fuel pulse widths
366 Added latency adjustments and recording to minimum pulse width
367 Added code run time recording for each channel
368 Updated docs for injection algorithm
369 Added LVI interrupt logging to record low voltage conditions.
370 Added ADC sampling and flagging code
371 Heavily revised all fuel code to use arrays instead of defines.
372 Removed 6x duplication in the scheduler code
373 Tidied up MANY comments and code blocks a LOT
375 0.0.8 (glen) - 9/3/08
376 Added code and constants to watch pulsewidth vs. min and max and act appropriately
377 Split constants out to separate files
378 Managed to make overlapping injection work with "Plan B"
379 Recording time between odd second triggers in 32 bits using timer overflow technique
382 Moved pins for ignition around
383 Changed obsolete code in main.c with idea inspired by Alex
384 Tidied and removed some TODOs
385 Added port A and B access together for ignition output (registers are conveniently next to each other for word access)
386 Moved PWM experimentation to a function and init.c
387 Shifted all macros for main injectors to freeems.h for use in (at least) two source files
388 Rearranged and changed all global variables
389 Added new status and settings bitwise variables
390 Implemented very basic NipponDenso decoder that I would not trust to do much at all.
393 Setup Timer interrupts and mimicked the JimStim input signal on port J 6,7
394 Fixed init bug (hadn't done it at all yet) that only sampled ADC 0 - 3
395 Added reset of port B so it can be used for numerical display of debug info
396 Added wheel analysis document
397 Made MakeFile dump pre-processed C
398 Fixed up all header structure
399 Split interrupt vector table out of main
400 Added timer overflow handler and extension variable
401 Moved all injector code to Timer ISR's
402 Attempted some basic math in the main RPM input ISR and failed
405 Added RTI code to cycle the "user led" at 1Hz (Many thanks to Karsten for pointing out my mistake)
406 Added port H input interrupt code with basic debounce and variables to control what is switched and when
407 Fixed a small bug in the logic for cylinder count etc
408 Rearranged significant portions of the code
409 Added these release notes
412 Added dual ADC input to speed controller
413 Added variables for configuration of cylinder count etc etc
414 Added one pulse per event tacho style pulse
415 Added PWM code that cycles its period and duty semi randomly
418 (0.0.2plus) Added strobing port P channels as well as Port T channels
419 (0.0.2++) Added strobing of pairs of port A and B channels
420 Added broken logic to strobe more LED's in 5 different ways based on some variables
423 Added ADC input for controlling sleep period
426 Initial version feature list :
428 User LED toggled once per main loop iteration
429 6 primary fuel outputs strobed through in a sequential fashion