SDMUBDB - An Interactive Development Environment for SDM uBasic Scripts


SDMUBDB is a PC-based IDE for SDM ubasic scripts that runs under Windows, Mac OSX (10.3 "Panther" or later) and Ubuntu Linux. It lets you create and edit scripts, then step through them line by line while inspecting and setting variables. You can also set the values to be returned by some SDM functions (such as get_usb_power) and any property. Here's what it looks like when it's running (under OSX 10.5):

The following files can be downloaded:

The zip file contains the following:
SDMUBDB.jar this contains the five java classes which make up the debugger
sdmubdbg.dll the native methods and ubasic interpreter (Windows version)
libsdmubdbg.jnilib the native methods and ubasic interpreter (Mac OSX version - supports both PowerPC and Intel Macs)
sdmubdbg.so the native methods and ubasic interpreter (Ubuntu version)
test.bas a simple test script

Unzip the files into any convenient directory. To run the debugger simply double-click the .jar file.

Usage Notes

Last update - June 2014 - fix print bug - also supports latest SDM 1.86 features (e.g. turn_lcd_power_off)

CHDK Version Available

A version supporting CHDK is available here


Comments, suggestions and bug reports welcome. Dave@zenoshrdlu.com

See here for other KAP and CHDK stuff of mine.

Note

The uBasic interpreter that forms part of SDM and CHDK, and is wrapped up in the DLL, was written by Adam Dunkels, to whom many thanks.

 * Copyright (c) 2006, Adam Dunkels
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of the author nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.