 |
| |
| META TOPICPARENT | name="Squawk" |
Building Squawk
This pages describes the steps to install and build Squawk on desktops and devices. | | |
Building Squawk for Devices | |
< < | | > > | | | |
Squawk Build Options | |
< < | Squawk Builder Properties
There are a variety of properties defined in build.properties that control conditional compilation of the Squawk system. If the file build.override exists then the properties defined there will override the default values in build.properties. In addition, build properties can be overriden by passing the name of a properties file to the builder using the -override option, or by directly setting properties for the builder using the usual -Dkey=value option. Some commonly used properties are: | | | | |
< < |
- ASSERTIONS_ENABLED Enables use of com.sun.squawk.util.Assert (and defines Klass.ASSERTIONS_ENABLED)
- DEBUG_CODE_ENABLED Set true to enable miscellaneous debug code (and define Klass.DEBUG_CODE_ENABLED)
- FLOATS Floating point support. NOTE: FLOATS=false is currently broken due to phoneme code that we are inheriting
- FLASH_MEMORY This is a heavily overloaded flag that means "has flash memory", "runs on bare metal (no OS)", "run on SPOT"
- ENABLE_DYNAMIC_CLASSLOADING When false, can only load classes from suite. This should be false when FLASH_MEMORY is true
- ENABLE_SDA_DEBUGGER Enable JPDA debugger agent support. Most debugger code is in debugger module, but some support routines are in base Squawk.
| Option |
Remarks |
| SQUAWK |
always true |
| EXCLUDE | Always false |
| KERNEL_SQUAWK | Set true for the split version of Squawk with support for asychronous handling of interrupts. |
| SQUAWK_64 | Set true on 64 bit systems (same as the romizer -64 option) |
| REVERSE_PARAMETERS | Parameter pushing convention |
| TRACING_ENABLED | Enables use of com.sun.squawk.util.Tracer (and defines Klass.TRACING_ENABLED) |
| ASSERTIONS_ENABLED | Enables use of com.sun.squawk.util.Assert (and defines Klass.ASSERTIONS_ENABLED) |
| DEBUG_CODE_ENABLED | Set true to enable miscellaneous debug code (and define Klass.DEBUG_CODE_ENABLED) |
| SUITE_VERIFIER | Set true to enable verification of bytecodes once they have translated into the suite format |
| J2ME.STATS | Set true for various stats in the translator to be available |
| MACROIZE | Makes the macroized version of the Squawk executable. This can also be enabled with the '-mac' switch to the builder |
| GC | Specifies the class implementing com.sun.squawk.GarbageCollector that is to be used. com.sun.squawk.Lisp2Collector | com.sun.squawk.Lisp2GenerationalCollector | com.sun.squawk.CheneyCollector |
| NATIVE_GC_ONLY | Disable support for interpreted GC. Disables the -interpgc flags as well |
| SMARTMONITORS | Smart monitor releasing |
| INCLUDE_EXECUTECIO_PARMS | TEMP hack for problem in compiler |
| FLOATS | Floating point support |
| VERIFY_SIGNATURES | If true, verify signatures of suites |
| NATIVE_VERIFICATION | Use native C sha1 for signature verification. This triggers compiling of everything in vm/util |
| NATIVE_VERIFICATION_ONLY | Exclusivly Verification using native C sha1 only. Don't include suite signature verification java code |
| CLDC1.1 | Include classes and members added in CLDC 1.1 (apart from floating point stuff which is controlled by the FLOATS property) |
| JDK1.0 | Include classes and members that are part of JDK1.0 but not CLDC 1.0a or CLDC 1.1 |
| FULL_SLOT_CLEARING_ANALYSIS | Include full activation slot clearing analysis |
| TRUST_SLOT_CLEARING | Trust the slot clearing analysis in the slow VM |
| CHECK_SLOT_CLEARING | Checking code to see if the slot clearing analysis is correct |
| BUFFERCHANNELINPUT | Enable in cases where channel I/O read operations can be improved (This speeds up class loading by about 30% when -Xioport is used.) |
| J2ME.HEAP_TRACE | Enables tracing of the heap's layout at each collection to squawk.heap. This will also be enabled if J2ME.DEBUG is true |
| REUSEABLE_MESSAGES | Disable message reuse |
| TYPEMAP | Enables memory access type checking in the VM |
| FLASH_MEMORY | Enable support for flash memory |
| ENABLE_DYNAMIC_CLASSLOADING | Enable support for dynamically loading classes into squawk (enables translator support) When false, can only load classes from suites. This should be false whan FLASH_MEMORY is true. |
| TRUSTED | Enable SKVM |
| VM2C | Enables the generated C version of the collector |
| FINALIZATION | Enables support for Object.finalize() |
| OLD_IIC_MESSAGES | Enable old inter-isolate message scheme |
| FAST_INVOKEINTERFACE | Use C version of findslot (for interface method invocation) in the interpreter |
| RESOURCE.CONNECTION | Enable the "resource:" protocol |
| VERBOSE_EXCEPTIONS | flag from CLDC sources. CLDC uses #ifdef VERBOSE_EXCEPTIONS, squawk uses /*if[VERBOSE_EXCEPTIONS]*/ |
| ENABLE_SDA_DEBUGGER | Enable JPDA debugger agent support Most debugger code is in sda module, but some support routines are in base Squawk |
| REAL_TIME | Enable real-time subset |
| REAL_TIME_MINI | if true, exclude items that we could easily support, but that aren't that useful, such as methods that accept clocks, schedulers, or monitor control policies (we only support one of each anyway) the point of this is determine the size of this clutter. |
| REAL_TIME_PROTO | if true, excludes items that we won't support initially becuase they are somewhat difficult. This includes Interruptable, Timed, and AIE. May include some scheduling parameters and feasability analysis support. |
| RTSJ1.0 | Enable full RTSJ 1.0 support. Update this so that: RTSJ1.0 = REAL_TIME & !(REAL_TIME_MINI | REAL_TIME_PROTO) |
Squawk Executable Build Options
The squawk executable is built as part of the rom command. The format of the rom command is:
-
d build-options rom rom-options module more modules
The build-options primarily affect the C compilation of the system, except for the first two listed. Here is a list of commonly used build-options:
-verbose verbose builder output
-Dname=value sets a builder property
-Xplat:name the platform to cross-compile to. Platform drives default C compiler. See Note below
(default is host platform))
-comp:name the C compiler used to build native executables
Supported: 'msc', 'gcc' or 'cc' or 'gcc-macosx' (any
other value disables C compilaton)
-nocomp disables C compilation (but not C file preprocessing)
-cflags:opts extra C compiler options (e.g. '-cflags:-g')
-o1 optimize C compilation/linking for minimal size
-o2 optimize C compilation/linking for speed
-o3 optimize C compilation/linking for max speed
-prod build the production version of the VM
-mac build the interpreter loop using fast macros
-tracing enable tracing in the VM
-profiling enable profiling in the VM
-assume enable assertions in the VM
By default a non-optimized debug version of the executable is built, with assertions and runtime tracing enabled. The build-options that we use day-to-day are:
-prod -mac -o2
Note that -mac has nothing to do with Macintosh(TM) computers, but results in a much faster interpreter.
The rom-options affect the generation of the suite. The commonly used rom-options are:
-metadata create matching metadata suite
-exclude:file excludes classes that match the class names or packages
in file ('.exclude' is used implicitly)
-strip:t strip symbolic information according to :
'd' - debug: retain all symbolic info
'a' - application: discard all symbolic info
'l' - library (default): discard symbolic info
for private/package-private fields and methods
'e' - extendable library: discard symbolic info
for private fields and methods
-lnt retain line number tables
-lvt retain local variable tables
-v verbose romizer output
A module is a directory that has a 'j2meclasses' subdirectory or a jar/zip
file. More than one suite can be created by separating the modules for each
suite with '--'.
Note
-Xplat does not appear to work in the main squawk branch. Browse the cvs for a SunSPOT orientated release which appears to support (amongst other things)
these build.properties :
# PLATFORM TYPE may be one of:
# BARE_METAL - Squawk runs on the bare metal, implenting inetrrupts, timers, etc.
# DELEGATING - Squawk delagates all IO to another JVM, via JNI
# NATIVE - Squawk runs on an OS, and calls native OS routines for IO, etc.
# SOCKET - Squawk delagates all IO to another JVM, via a socket
#
# The builder will synthesize definitions of four additional properties: PLATFORM_TYPE_BARE_METAL,
# PLATFORM_TYPE_DELEGATING, PLATFORM_TYPE_NATIVE, and PLATFORM_TYPE_SOCKET, which can be used
# by the Java and C preprocessors to conditionally compile code.
# Uncomment one of the following definitions:
#PLATFORM_TYPE=BARE_METAL
#PLATFORM_TYPE=DELEGATING
PLATFORM_TYPE=NATIVE
#PLATFORM_TYPE=SOCKET
| | | -- Main.khumalo - 06 Oct 2008
-- Main.derek_white - 10 Jul 2008
\ No newline at end of file |
| |
| META TOPICPARENT | name="Squawk" |
Building Squawk
This pages describes the steps to install and build Squawk on desktops and devices. | | | Building Squawk for Devices
| |
> > | | | | Squawk Build Options |
| |
| META TOPICPARENT | name="Squawk" |
Building Squawk
This pages describes the steps to install and build Squawk on desktops and devices. | | | Building Squawk for Devices
| |
< < | | > > | | | | Squawk Build Options |
| |
| META TOPICPARENT | name="Squawk" |
Building Squawk
This pages describes the steps to install and build Squawk on desktops and devices. | | | Building Squawk for Devices
| |
> > | | | | Squawk Build Options |
| |
| META TOPICPARENT | name="Squawk" |
Building Squawk
This pages describes the steps to install and build Squawk on desktops and devices. | | |
-verbose verbose builder output
-Dname=value sets a builder property
| |
< < | -Xplat:name the platform to cross-compile to. Platform drives default C compiler. | > > | -Xplat:name the platform to cross-compile to. Platform drives default C compiler. See Note below | | | (default is host platform))
-comp:name the C compiler used to build native executables
-
-
-
-
-
-
-
- Supported
- 'msc', 'gcc' or 'cc' or 'gcc-macosx' (any
| | | file. More than one suite can be created by separating the modules for each
suite with '--'. | |
> > | Note
-Xplat does not appear to work in the main squawk branch. Browse the cvs for a SunSPOT orientated release which appears to support (amongst other things)
these build.properties :
# PLATFORM TYPE may be one of:
# BARE_METAL - Squawk runs on the bare metal, implenting inetrrupts, timers, etc.
# DELEGATING - Squawk delagates all IO to another JVM, via JNI
# NATIVE - Squawk runs on an OS, and calls native OS routines for IO, etc.
# SOCKET - Squawk delagates all IO to another JVM, via a socket
#
# The builder will synthesize definitions of four additional properties: PLATFORM_TYPE_BARE_METAL,
# PLATFORM_TYPE_DELEGATING, PLATFORM_TYPE_NATIVE, and PLATFORM_TYPE_SOCKET, which can be used
# by the Java and C preprocessors to conditionally compile code.
# Uncomment one of the following definitions:
#PLATFORM_TYPE=BARE_METAL
#PLATFORM_TYPE=DELEGATING
PLATFORM_TYPE=NATIVE
#PLATFORM_TYPE=SOCKET
-- Main.khumalo - 06 Oct 2008 | | | -- Main.derek_white - 10 Jul 2008 |
| |
| META TOPICPARENT | name="Squawk" |
Building Squawk
This pages describes the steps to install and build Squawk on desktops and devices. | | |
- ENABLE_DYNAMIC_CLASSLOADING When false, can only load classes from suite. This should be false when FLASH_MEMORY is true
- ENABLE_SDA_DEBUGGER Enable JPDA debugger agent support. Most debugger code is in debugger module, but some support routines are in base Squawk.
| |
> > |
| Option |
Remarks |
| SQUAWK |
always true |
| EXCLUDE | Always false |
| KERNEL_SQUAWK | Set true for the split version of Squawk with support for asychronous handling of interrupts. |
| SQUAWK_64 | Set true on 64 bit systems (same as the romizer -64 option) |
| REVERSE_PARAMETERS | Parameter pushing convention |
| TRACING_ENABLED | Enables use of com.sun.squawk.util.Tracer (and defines Klass.TRACING_ENABLED) |
| ASSERTIONS_ENABLED | Enables use of com.sun.squawk.util.Assert (and defines Klass.ASSERTIONS_ENABLED) |
| DEBUG_CODE_ENABLED | Set true to enable miscellaneous debug code (and define Klass.DEBUG_CODE_ENABLED) |
| SUITE_VERIFIER | Set true to enable verification of bytecodes once they have translated into the suite format |
| J2ME.STATS | Set true for various stats in the translator to be available |
| MACROIZE | Makes the macroized version of the Squawk executable. This can also be enabled with the '-mac' switch to the builder |
| GC | Specifies the class implementing com.sun.squawk.GarbageCollector that is to be used. com.sun.squawk.Lisp2Collector | com.sun.squawk.Lisp2GenerationalCollector | com.sun.squawk.CheneyCollector |
| NATIVE_GC_ONLY | Disable support for interpreted GC. Disables the -interpgc flags as well |
| SMARTMONITORS | Smart monitor releasing |
| INCLUDE_EXECUTECIO_PARMS | TEMP hack for problem in compiler |
| FLOATS | Floating point support |
| VERIFY_SIGNATURES | If true, verify signatures of suites |
| NATIVE_VERIFICATION | Use native C sha1 for signature verification. This triggers compiling of everything in vm/util |
| NATIVE_VERIFICATION_ONLY | Exclusivly Verification using native C sha1 only. Don't include suite signature verification java code |
| CLDC1.1 | Include classes and members added in CLDC 1.1 (apart from floating point stuff which is controlled by the FLOATS property) |
| JDK1.0 | Include classes and members that are part of JDK1.0 but not CLDC 1.0a or CLDC 1.1 |
| FULL_SLOT_CLEARING_ANALYSIS | Include full activation slot clearing analysis |
| TRUST_SLOT_CLEARING | Trust the slot clearing analysis in the slow VM |
| CHECK_SLOT_CLEARING | Checking code to see if the slot clearing analysis is correct |
| BUFFERCHANNELINPUT | Enable in cases where channel I/O read operations can be improved (This speeds up class loading by about 30% when -Xioport is used.) |
| J2ME.HEAP_TRACE | Enables tracing of the heap's layout at each collection to squawk.heap. This will also be enabled if J2ME.DEBUG is true |
| REUSEABLE_MESSAGES | Disable message reuse |
| TYPEMAP | Enables memory access type checking in the VM |
| FLASH_MEMORY | Enable support for flash memory |
| ENABLE_DYNAMIC_CLASSLOADING | Enable support for dynamically loading classes into squawk (enables translator support) When false, can only load classes from suites. This should be false whan FLASH_MEMORY is true. |
| TRUSTED | Enable SKVM |
| VM2C | Enables the generated C version of the collector |
| FINALIZATION | Enables support for Object.finalize() |
| OLD_IIC_MESSAGES | Enable old inter-isolate message scheme |
| FAST_INVOKEINTERFACE | Use C version of findslot (for interface method invocation) in the interpreter |
| RESOURCE.CONNECTION | Enable the "resource:" protocol |
| VERBOSE_EXCEPTIONS | flag from CLDC sources. CLDC uses #ifdef VERBOSE_EXCEPTIONS, squawk uses /*if[VERBOSE_EXCEPTIONS]*/ |
| ENABLE_SDA_DEBUGGER | Enable JPDA debugger agent support Most debugger code is in sda module, but some support routines are in base Squawk |
| REAL_TIME | Enable real-time subset |
| REAL_TIME_MINI | if true, exclude items that we could easily support, but that aren't that useful, such as methods that accept clocks, schedulers, or monitor control policies (we only support one of each anyway) the point of this is determine the size of this clutter. |
| REAL_TIME_PROTO | if true, excludes items that we won't support initially becuase they are somewhat difficult. This includes Interruptable, Timed, and AIE. May include some scheduling parameters and feasability analysis support. |
| RTSJ1.0 | Enable full RTSJ 1.0 support. Update this so that: RTSJ1.0 = REAL_TIME & !(REAL_TIME_MINI | REAL_TIME_PROTO) |
| | | Squawk Executable Build Options
The squawk executable is built as part of the rom command. The format of the rom command is:
-
d build-options rom rom-options module more modules
|
|
> > |
| META TOPICPARENT | name="Squawk" |
Building Squawk
This pages describes the steps to install and build Squawk on desktops and devices.
General
Squawk is built using a custom Java-based build system, cleverly called "builder". This build system is more cross-platform than "make", and may predate "ant". The build system can be started on the command line by entering java -jar build.jar, but is more commonly starting using a script (or batch file) named "d". We will use "d" in this documentation. For a full list of builder commands enter d -help.
Building Squawk for Desktop
Building Squawk for Devices
Squawk Build Options
Squawk Builder Properties
There are a variety of properties defined in build.properties that control conditional compilation of the Squawk system. If the file build.override exists then the properties defined there will override the default values in build.properties. In addition, build properties can be overriden by passing the name of a properties file to the builder using the -override option, or by directly setting properties for the builder using the usual -Dkey=value option. Some commonly used properties are:
- ASSERTIONS_ENABLED Enables use of com.sun.squawk.util.Assert (and defines Klass.ASSERTIONS_ENABLED)
- DEBUG_CODE_ENABLED Set true to enable miscellaneous debug code (and define Klass.DEBUG_CODE_ENABLED)
- FLOATS Floating point support. NOTE: FLOATS=false is currently broken due to phoneme code that we are inheriting
- FLASH_MEMORY This is a heavily overloaded flag that means "has flash memory", "runs on bare metal (no OS)", "run on SPOT"
- ENABLE_DYNAMIC_CLASSLOADING When false, can only load classes from suite. This should be false when FLASH_MEMORY is true
- ENABLE_SDA_DEBUGGER Enable JPDA debugger agent support. Most debugger code is in debugger module, but some support routines are in base Squawk.
Squawk Executable Build Options
The squawk executable is built as part of the rom command. The format of the rom command is:
-
d build-options rom rom-options module more modules
The build-options primarily affect the C compilation of the system, except for the first two listed. Here is a list of commonly used build-options:
-verbose verbose builder output
-Dname=value sets a builder property
-Xplat:name the platform to cross-compile to. Platform drives default C compiler.
(default is host platform))
-comp:name the C compiler used to build native executables
Supported: 'msc', 'gcc' or 'cc' or 'gcc-macosx' (any
other value disables C compilaton)
-nocomp disables C compilation (but not C file preprocessing)
-cflags:opts extra C compiler options (e.g. '-cflags:-g')
-o1 optimize C compilation/linking for minimal size
-o2 optimize C compilation/linking for speed
-o3 optimize C compilation/linking for max speed
-prod build the production version of the VM
-mac build the interpreter loop using fast macros
-tracing enable tracing in the VM
-profiling enable profiling in the VM
-assume enable assertions in the VM
By default a non-optimized debug version of the executable is built, with assertions and runtime tracing enabled. The build-options that we use day-to-day are:
-prod -mac -o2
Note that -mac has nothing to do with Macintosh(TM) computers, but results in a much faster interpreter.
The rom-options affect the generation of the suite. The commonly used rom-options are:
-metadata create matching metadata suite
-exclude:file excludes classes that match the class names or packages
in file ('.exclude' is used implicitly)
-strip:t strip symbolic information according to :
'd' - debug: retain all symbolic info
'a' - application: discard all symbolic info
'l' - library (default): discard symbolic info
for private/package-private fields and methods
'e' - extendable library: discard symbolic info
for private fields and methods
-lnt retain line number tables
-lvt retain local variable tables
-v verbose romizer output
A module is a directory that has a 'j2meclasses' subdirectory or a jar/zip
file. More than one suite can be created by separating the modules for each
suite with '--'.
-- Main.derek_white - 10 Jul 2008 |
|