A lightweight VM which allows for easy custom programs to be made on the device without having to worry about linking and PIC code and all of that. BSD licensed. See https://bitbucket.org/earlz/lightvm/ for the upstream general purpose repository

Dependents:   MbedConsole

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers config.h Source File

config.h

00001 
00002 /**
00003 <Copyright Header>
00004 Copyright (c) 2013 Jordan "Earlz" Earls  <http://Earlz.net>
00005 All rights reserved.
00006 
00007 Redistribution and use in source and binary forms, with or without
00008 modification, are permitted provided that the following conditions
00009 are met:
00010 
00011 1. Redistributions of source code must retain the above copyright
00012   notice, this list of conditions and the following disclaimer.
00013 2. Redistributions in binary form must reproduce the above copyright
00014   notice, this list of conditions and the following disclaimer in the
00015   documentation and/or other materials provided with the distribution.
00016 3. The name of the author may not be used to endorse or promote products
00017   derived from this software without specific prior written permission.
00018 
00019 THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
00020 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
00021 AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
00022 THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00023 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00024 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00025 OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00027 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
00028 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00029 </Copyright Header>
00030 */
00031 
00032 #ifndef LIGHTVM_CONFIG_H
00033 #define LIGHTVM_CONFIG_H
00034 
00035 //configuration directives
00036 
00037 /*
00038   The optimal opcache size in bytes. 
00039   This is the maximum amount of bytes that can possibly be read in a single operation
00040   
00041 */
00042 //#define OPTIMAL_OPCACHE_SIZE 4 
00043 
00044 
00045 
00046 //options
00047 
00048 /*
00049   Use this to ensure that exactly 16-bit registers are used
00050 */
00051 //#define EXACT_REGISTERS
00052 /*
00053   Use this to give the greater world the middle finger and use
00054   optimizations that will make the VM environment non-portable.
00055   Includes making registers take up exactly 32 bits, rather than 64
00056 */
00057 //#define SCREW_PORTABILITY
00058 
00059 //#define ALIGN_OPCACHE
00060 
00061 //#define USE_OPCACHE
00062 
00063 //Use this to specify that string "plain text" error messages are populated as well as an error code when something goes wrong
00064 #define INCLUDE_ERROR_MESSAGES
00065 
00066 //Specifies IP should be validated to be within our memory block.
00067 //This makes the VM "safer", but also slower
00068 //#define VALIDATE_IP_WITHIN_MEMORY
00069 
00070 #endif
00071