MBARI OASIS3 Mooring Guide

OASIS3 Software Build

Building OASIS3 Software

OASIS3 software is now configured entirely via the configuration file oasis.cfg. You should only need to rebuild the software when adding drivers or other new features. For regular turnarounds see How to Configure an OASIS3 can for Deployment.

If you are building a new software release due to new drivers or features, you'll most likely need to change one or more of the following files: custom.h (for configuration of #define's), drvTbl.h (to add drivers), or usrCmdTbl.h (to add user commands). You may also need to add or delete files from project file, oasis.mcp, using the CodeWarrior IDE. There is also a .cfg file for each deployment, which specifies instrument calibrations, data post processing header configuration files (.hdr files).

Files needed for OASIS3 deployment ROM build

oasis.app (OASIS executable )
drvTbl.h (driver config header )
custom.h (hardware version header)
usrCmdTbl.h (table of user commands)

Files Needed

The following is a list of sources used to build the deployment software:

custom.h

The header custom.h contains the #defines related primarily to OASIS system configuration, though there are some instrument-specific settings as well. The following table describes a number of options that may be set in custom.h

Parameter
Description Notes
WATCHDOG
Use watchdog timer Not used. It created problems at startup & shutdown.
PWR_PERM
Bitmask <0:31> indicating permanently powered instruments Normally defaults to 0. Set it for a specific deployment via oasis.cfg (PwrPerm = value)
PERM_POOL_SIZE
Size of memory pool for permMalloc Normally 96K, tweak based on memory used.

LOCAL_OFFSET

Hours offset of local time vs GMT Normally defaults to -8 (PST). Set it for a specific deployment via oasis.cfg (gmtOffset = value)
MAXLOGSIZE
Max size of log record 65535. No longer a problem with memory allocation, but constrained to 16 bits by LogRecHdr.

LOG_STATUS

Log PWRUP/PWRDN events status

Bit mask:
0: Log Power On
1: Log Power Off
Defaults to 0, set for deployment vi oasis.cfg (logStatus = value)

TNC

Using TNC radio link  

TNC_NAME

TNC Name for Packet radio e.g., "2000M1". Set for a specific deployment via oasis.cfg (TNC = name)

CO2_ADJUSTCAL

Adjust cal to sample interval Disabled in OASIS3
CALCO2
Auto calibrate pCO2 Disabled in OASIS3

CAL_INTERVAL

Calibration sample interval,
hours (CO2_ADJUSTCAL defined) or samples
23, but unused in OASIS3

PCO2_CAL_DELAY

Time to wait for calibration sample  

SHUTTER

Number of installed PRR shutters Only 1 implemented so far. Should be easy to add others

SHUTTER0_ANALOG_PORT

A/D Port number  

RADIO

Do radio timeout & restart  

DFLT_RADIO_TMOUT

Hours of radio silence until reset 24. Set for a specific deployment via oasis.cfg (radio_tmout = value)

DFLT_XOFF_TMOUT

Seconds to wait for XON 120. Set for deployment via oasis.cfg (xoff_tmout = value)

DFLT_SYNC_TMOUT

Seconds to wait for drvSync 300. Set for deployment via oasis.cfg (sync_tmout = value)

ARGOS_BIT

Argos wakeup Bit Not yet implemented

NUM_ARGOS_BUFS

Number of ARGOS buffers 10

ARGOS_GASHOUND
ARGOS_CO2
ARGOS_SPECPRR
ARGOS_SHUTTER
ARGOS_ISUS
ARGOS_CTD
ARGOS_HS2
ARGOS_OSMO
ARGOS_AC9
ARGOS_NO3

Enable ARGOS processing for various instruments

for EQPAC

Not yet implemented

GPS_TYPE

GPS Manufacturer/Version constants

GARMIN12_OLD 11
GARMIN12_FULL 12
GARMIN12_SMALL 8
GARMIN12_TINY 7

Defaults to GARMIN12_FULL

GPS_LAT
GPS_LONG
GPS_ALT

Set initial GPS Lat/Long No longer used (GPS works better when it finds its own position)
INCLUDE_SHUTCAL
Include shutter calibration func (local)  
INCLUDE_SHUTOM
Include shutter calibration func (remote)  
FULL_SIGNON
Include TNC name in console signon message Always enable

 

drvTbl.h

drvTbl.h contains two tables of configuration parameters for drivers. The first, called drvDescs, lists all drivers ever built for OASIS3. It is this table that allows the system to recognize the drivers named in oasis.cfg, and lists the default parameters for those drivers (in case the oasis.cfg entry doesn't specify all drive parameters.

The second table in drvTbl.h is called drv_default, and is the list of drivers that are used in case oasis.cfg is not present or corrupt. In this case, the drivers listed in drv_default will be used for the deployment. Typically, drv_default just has the UserIF for the console, the radio driver, and perhaps one or two instruments that never change which port they use.

The elements in these arrays (drvDescs, drv_default) have the following format:

{ drv_name, drv_task, drv_serwake,
drv_parms[0],drv_parms[1],...,drv_parms[DRV_PARMS-1]}

A typical example follows:

{ "SpecPRR", specprr_drv, null_func,
600, 7,9600, MODE_N81NF, 0x0080, SPEC_PRR, DAYMASK, 5, 4, 20, 20}

The entries in the drv_parms[] array are as follows:

INTERVAL

Seconds between samples
SER_PORT

Logical Serial Port number [0 - 31]
SER_BAUD

Serial Port Baud Rate. Any value below 115200 is acceptable, but an exact baud rate is only guaranteed for standard baud rates (300, 600, 1200, 2400, 4800, 9600, 19200, 38400)
SER_SETUP

Serial Port Control Bits
[MODE_N81, MODE_N81NF, MODE_E71, MODE_N72NF], possible OR'd with ECHO, AUTOCR, NEWCR, NOLF, BIT7, BIG_TX_BUF
PWR_CTRL

Power Control Bit
Some instruments are powered by the OASIS power supply, while others have internal power supplies. Instruments powered by OASIS need to specify a (32-bit) mask indicating which power bit they use for power (1 = ON). For example, an instrument using power bit 8 would use PWR_CTL = 0x10. An instrument that does not need power from OASIS would use 0.
SAMPLE_TYPE

Data Logging Record Types (defined in log.h)
TOD_MASK

Time of Day Mask
This mask may be used to specify periods for the instrument to be turned OFF to conserve power. It is a 32 bit vector, of which only the 24 LSBs are used. The LSB corresponds to the time period of 0000-0100, the next bit to 0100-0200, etc.

This is used for two reasons: to sample spectroradiometric instruments only during daylight hours (6 AM to 6 PM), and to turn off ARGOS except during two times each day when the ARGOS satellite is overhead. For example, DAYMASK (turned off from 6 PM to 6AM) is 1111 1100 0000 0000 0011 1111 = 0xfc003fL
TIMEOUT

Normal timeout in seconds. Each driver may use this parameter slightly differently.
PARM0
Extra parameter
PARM1
Extra parameter
PARM2
Extra parameter

The extra parameters are driver-specific, defined in the Instrument Information Appendix.

Generating Files

You're now ready to recompile the OASIS3 source code. The following is from the OASIS3 Getting Started Guide.

  1. Go to your /oasis directory (or wherever you copied the source) and double-click on oasis.mcp. This will bring up the CodeWarrior compiler.
  2. You should see a window called "oasis.mcp" that lists all the source modules. Those that need recompiling have a check mark next to them. Place your mouse pointer to the left of the folder icon named "Oasis Src", and click. That should cause a check mark to be placed next to all source modules.
  3. Type the F7 key. This should cause the entire system to be rebuilt. Any errors (hopefully none!) will be shown in an additional error window. If you have errors, fix them and recompile.
  4. Exit the compiler, and navigate to /oasis/bin (if your source is /oasis). This is the output of the compiler, and consists of about 9 files. Many of these are symbol table, map, or hex files. There are two executable files produced:

Loading Code Into the OASIS3 Controller

  1. Connect the OASIS3 can to OASIS3 power and serial cables. Connect the power to +12V and the serial cable to your PC.
  2. Bring up MotoCross on your PC.
  3. Turn on OASIS3 power, and/or hit the reset button (short reset).
  4. If you see the OASIS> prompt, type reset pico. If you see the C:> prompt from PicoDOS, skip this step.
  5. Delete old OASIS3 data files with del OASISDAT.*
  6. In MotoCross, choose Transfer->Load. In the File menu, navigate to /oasis/bin, and choose OASIS.APP. This will cause the OASIS3 code to be burned into on-board Flash memory. When done, get back to PicoDOS (note, it will sometimes go into PBM; if this happens, type pico). Then type boot app. This will cause the OASIS3 code to be executed whenever the system powers up.