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 debugger zip file (universal version)
- a short PDF document describing how to use the debugger (written for the CHDK version, but the features are identical)
|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.
- only uBasic scripts are supported (not Lua)
- scripts can be edited only when not running (i.e. before Start is pressed or after Stop is pressed)
- a breakpoint (only one) can be set by double-clicking on a line. If Run is then pressed, the script executes until the breakpoint is reached (or the script ends)
Last update - December 2012 - supports new SDM 1.86 features.
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.
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.