Mercurial > public > mk2
view code_part1/OSTC_code_asm_part1/docu/README.txt @ 212:275befc5f39d
Debug GF model (bug #11 & #12).
+ ASSERT stops should be computed in order (bug#11).
+ BUGFIX: Mark GF_low reference at actual first stop, not predicted one.
+ BUGFIX: sim_to_first_stop() stops BEFORE first stop, not after (bug#11).
+ BUGFIX: check that calc_nextdecodepth() don't ascent faster than 10m/mn (bug#11).
+ BUGFIX: calc_nextdecodepth() should check gas switch, too (bug#11).
+ let gas switch detection in depth/meter (not ambientPresure/mbar).
+ BUGFIX OCR mode: bad diluent value in sim_alveolar_pressure() (bug#11).
+ BUGFIX: add deco distance (offset) only to compartiment integration, not to B?hlmann or GF criterion.
+ BUGFIX: add margin one meter above gas switch depth (bug#12)
+ BUGFIX: When ascenting too fast, cancel gas switch delay and history (bug#11).
author | JeanDo |
---|---|
date | Mon, 21 Feb 2011 22:36:48 +0100 |
parents | 652e17b6267a |
children | ba5309c01dd7 |
line wrap: on
line source
To recompile the OSTC code you will need to install the following: ------------------------------------------------------------------ - A Mercurial client, to download the source code and updates easily. TortoiseHg is free, and works well. - The Microchip MPLab IDE. This is free, and enable to recompile all the assembly code, link, and produce a .hex file. - If you want to modify the decompression algorithm, you will also need the MPLab C18 compiler. There is a demo free for the first 30 days. If you don't modify p2_deco.c, you don't need the C18 compiler, see below. - The Tiny bootloader for windows, see the HW site. Creating a working project: --------------------------- - Launch the MPLab IDE. - Create a new project (Project > Project Wizard...) - Choose device PIC18F4685 - Select Microchip C18 Toolsuite (if you installed the C18 compiler) or Microchip MPASM Toolsuite (if not) --> Make sure the paths are corect. - Choose a name and a directoty. - Add the following files: <my_source_path>/code_part1/OSTC_code_asm_part1/18f4685_ostc_mkII.lkr <my_source_path>/code_part1/OSTC_code_asm_part1/MAIN.ASM <my_source_path>/code_part1/OSTC_code_c_part2/p2_deco.o (or use the .c instead of the .o if you have the C18 compiler) - If you want to compile C code, configure it: Menu: Project > Build Options... > Project > MPLab C18 General: Default storage = Overlay (-sco) Optimization: Enable all - Make sure the IDE is configured to find the clib.lib file (needed even with pé_deco.o) Menu : Project > Build Options ... > Project > Directories Set «Search Directories» for : «Library Seach Path» to the path of the “clib.lib” file (in c:\Program Files\Microship\MCC18\lib in my case) Set «Build Directory Policy» to «Assemble/Compile in source-file directory, link in output directory» - Hit F10 to recompile everything. --> You should get a .hex file where you saved your project. Installing the new firmware --------------------------- - Get the .hew file you want to flash onto the OSTC. - Connect the OSTC, wake it up. - Launch the Tiny bootloader. It should work for some time, trying to open the communication port. - Once it is ready, Click Browse to select the .hex file ==> DO NOT HIT Write Flash YET ! - On the OSTC, go to the reset menu, select Reboot OSTC ==> DO NOT CONFIRM YET ! - Click "Write Flash" button. Now you have 10sec to confirm on OSTC too. - The bootloader should say it found a 18F6485 device, and start uploading. The OSTC should have the blue and red led blinking rapidly. The upload time is ~ 20 secondes. - Once done, the OSTC finishes its reboot. - If you OSTC is stuck in some bad code, you can do the magic magnet reset instead of choosing the reboot menu, during the 10sec timeslot after starting bootloader write flash.