Fixed typos in relation to issue #211 (#212)

pull/213/head
Brenden Schumacher 3 years ago committed by GitHub
parent d896602b5e
commit dd5df82e91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -73,7 +73,7 @@ In many situations, speed is not the main concern. Runtime executable size, code
**Why would you want to run WASM on microcontrollers?**
Wasm3 started as a research project and remains so by many means. Evaluating the engine in different environments is part of the research. Given that we have `Lua`, `JS`, `Python`, `Lisp`, `...` running on MCUs, `WebAssembly` is actually a promising alternative. It provides toolchain decoupling as well as a completely sandboxed, well-defined, predictible environment. Among practical use cases we can list `edge computing`, `scripting`, running `IoT rules`, `smart contracts`, etc.
Wasm3 started as a research project and remains so by many means. Evaluating the engine in different environments is part of the research. Given that we have `Lua`, `JS`, `Python`, `Lisp`, `...` running on MCUs, `WebAssembly` is actually a promising alternative. It provides toolchain decoupling as well as a completely sandboxed, well-defined, predictable environment. Among practical use cases we can list `edge computing`, `scripting`, running `IoT rules`, `smart contracts`, etc.
## Further Resources

@ -41,7 +41,7 @@ Fomu (soft CPU) | Lattice ICE40UP5K | RV32I | 12MHz | 2 MB | 12
## Limited support
The following devices can run Wasm3, however they cannot afford to allocate even a single Linear Memory page (64KB).
This means `memoryLimit` should be set to the actual amount of RAM available, and that in turn usually breaks the allocator of the hosted Wasm application (which still asumes the page is 64KB and performs OOB access).
This means `memoryLimit` should be set to the actual amount of RAM available, and that in turn usually breaks the allocator of the hosted Wasm application (which still assumes the page is 64KB and performs OOB access).
Device | Chipset | Architecture | Clock | Flash | RAM
--- |:---: | --- | -----:| --- | ---

@ -4,7 +4,7 @@ CONFIG_ESP_MAIN_TASK_STACK_SIZE=65536
# Disable task watchdog
CONFIG_ESP_TASK_WDT=n
# Increse CPU frequency
# Increase CPU frequency
CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y
# PSRAM support

@ -32,12 +32,12 @@ OF SUCH DAMAGE.
----------------------------------------------------------------------
This library is realy just two files: 'printf.h' and 'printf.c'.
This library is really just two files: 'printf.h' and 'printf.c'.
They provide a simple and small (+200 loc) printf functionality to
be used in embedded systems.
I've found them so usefull in debugging that I do not bother with a
I've found them so useful in debugging that I do not bother with a
debugger at all.
They are distributed in source form, so to use them, just compile them
@ -52,13 +52,13 @@ Zero padding and field width are also supported.
If the library is compiled with 'PRINTF_SUPPORT_LONG' defined then the
long specifier is also
supported. Note that this will pull in some long math routines (pun intended!)
and thus make your executable noticably longer.
and thus make your executable noticeably longer.
The memory foot print of course depends on the target cpu, compiler and
The memory footprint of course depends on the target cpu, compiler and
compiler options, but a rough guestimate (based on a H8S target) is about
1.4 kB for code and some twenty 'int's and 'char's, say 60 bytes of stack space.
Not too bad. Your milage may vary. By hacking the source code you can
get rid of some hunred bytes, I'm sure, but personally I feel the balance of
Not too bad. Your mileage may vary. By hacking the source code you can
get rid of some hundred bytes, I'm sure, but personally I feel the balance of
functionality and flexibility versus code size is close to optimal for
many embedded systems.
@ -79,12 +79,12 @@ init_printf(NULL,putc);
Notice the 'NULL' in 'init_printf' and the parameter 'void* p' in 'putc',
the NULL (or any pointer) you pass into the 'init_printf' will eventually be
passed to your 'putc' routine. This allows you to pass some storage space (or
anything realy) to the character output function, if necessary.
anything really) to the character output function, if necessary.
This is not often needed but it was implemented like that because it made
implementing the sprintf function so neat (look at the source code).
The code is re-entrant, except for the 'init_printf' function, so it
is safe to call it from interupts too, although this may result in mixed output.
is safe to call it from interrupts too, although this may result in mixed output.
If you rely on re-entrancy, take care that your 'putc' function is re-entrant!
The printf and sprintf functions are actually macros that translate to
@ -94,7 +94,7 @@ You just need to undef the names before you include the 'stdio.h'.
Note that these are not function like macros, so if you have variables
or struct members with these names, things will explode in your face.
Without variadic macros this is the best we can do to wrap these
fucnction. If it is a problem just give up the macros and use the
fucnctions. If it is a problem just give up the macros and use the
functions directly or rename them.
For further details see source code.

@ -125,7 +125,7 @@ static const uint8_t config_descriptor[CONFIG_DESC_SIZE] = {
0x10, // bcdCDC: spec release number
0x01,
// Call Managment Functional Descriptor
// Call Management Functional Descriptor
0x05, // bFunctionLength
CS_INTERFACE, // bDescriptorType: CS_INTERFACE
USB_CDC_TYPE_CALL_MANAGEMENT, // bDescriptorSubtype: Call Management Func Desc

@ -16,7 +16,7 @@
#define d_indent " | %s"
// just want less letter and numbers to stare at down the way in the compiler table
// just want less letters and numbers to stare at down the way in the compiler table
#define i_32 c_m3Type_i32
#define i_64 c_m3Type_i64
#define f_32 c_m3Type_f32
@ -382,7 +382,7 @@ _ (EmitOp (o, c_setSetOps [type]));
}
// all values must be in slots befor entering loop, if, and else blocks
// all values must be in slots before entering loop, if, and else blocks
// otherwise they'd end up preserve-copied in the block to probably different locations (if/else)
M3Result PreserveRegisters (IM3Compilation o)
{
@ -1743,7 +1743,7 @@ _ (EmitOp (o, op_Unreachable));
}
// TODO OPTZ: currently all stack slot indicies take up a full word, but
// TODO OPTZ: currently all stack slot indices take up a full word, but
// dual stack source operands could be packed together
M3Result Compile_Operator (IM3Compilation o, m3opcode_t i_opcode)
{
@ -2316,7 +2316,7 @@ M3Result Compile_ReserveConstants (IM3Compilation o)
// if constants overflow their reserved stack space, the compiler simply emits op_Const
// operations as needed. Compiled expressions (global inits) don't pass through this
// ReserveConstants function and thus always produce inline contants.
// ReserveConstants function and thus always produce inline constants.
numConstantSlots = M3_MIN (numConstantSlots, d_m3MaxConstantTableSize);
o->firstDynamicSlotIndex = o->firstConstSlotIndex + numConstantSlots;

@ -8,7 +8,7 @@
#ifndef m3_exec_h
#define m3_exec_h
// TODO: all these functions could move over to the .c at some point. normally, i'd say screw it,
// TODO: all these functions could move over to the .c at some point. normally, I'd say screw it,
// but it might prove useful to be able to compile m3_exec alone w/ optimizations while the remaining
// code is at debug O0
@ -687,7 +687,7 @@ d_m3Op (MemGrow)
// it's a debate: should the compilation be trigger be the caller or callee page.
// it's a much easier to put it in the caller pager. if it's in the callee, either the entire page
// has be left dangling or it's just a stub that jumps to a newly acquire page. In Gestalt, I opted
// has be left dangling or it's just a stub that jumps to a newly acquired page. In Gestalt, I opted
// for the stub approach. Stubbing makes it easier to dynamically free the compilation. You can also
// do both.
d_m3Op (Compile)
@ -703,7 +703,7 @@ d_m3Op (Compile)
if (not result)
{
// patch up compiled pc and call rewriten op_Call
// patch up compiled pc and call rewritten op_Call
* ((void**) --_pc) = (void*) (function->compiled);
--_pc;
nextOpDirect ();

@ -233,7 +233,7 @@ _ (ReadLEB_u32 (& index, & i_bytes, i_end));
{
io_module->functions [index].numNames++;
io_module->functions [index].names[numNames] = utf8;
utf8 = NULL; // ownership transfered to M3Function
utf8 = NULL; // ownership transferred to M3Function
}
}

@ -8,7 +8,7 @@
# ./run-spec-test.py ./proposals/tail-call/*.json
# ./run-spec-test.py --exec "../build-custom/wasm3 --repl"
#
# Running WASI verison with different engines:
# Running WASI version with different engines:
# cp ../build-wasi/wasm3.wasm ./
# ./run-spec-test.py --exec "../build/wasm3 wasm3.wasm --repl"
# ./run-spec-test.py --exec "wasmtime --dir=. wasm3.wasm -- --repl"

@ -87,14 +87,14 @@ unsigned long get_msec(void);
#define HALF_FOV (FOV * 0.5)
#define ERR_MARGIN 1e-6 /* an arbitrary error margin to avoid surface acne */
/* bit-shift ammount for packing each color into a 32bit uint */
/* bit-shift amount for packing each color into a 32bit uint */
#ifdef LITTLE_ENDIAN
#define RSHIFT 16
#define BSHIFT 0
#else /* big endian */
#define RSHIFT 0
#define BSHIFT 16
#endif /* endianess */
#endif /* endianness */
#define GSHIFT 8 /* this is the same in both byte orders */
/* some helpful macros... */
@ -258,7 +258,7 @@ void render(int xsz, int ysz, uint32_t *fb, int samples) {
}
}
/* trace a ray throught the scene recursively (the recursion happens through
/* trace a ray through the scene recursively (the recursion happens through
* shade() to calculate reflection rays if necessary).
*/
struct vec3 trace(struct ray ray, int depth) {

@ -227,7 +227,7 @@ main()
#ifdef N
printf("***** WARNING: ******\n");
printf(" It appears that you set the preprocessor variable N when compiling this code.\n");
printf(" This version of the code uses the preprocesor variable STREAM_ARRAY_SIZE to control the array size\n");
printf(" This version of the code uses the preprocessor variable STREAM_ARRAY_SIZE to control the array size\n");
printf(" Reverting to default value of STREAM_ARRAY_SIZE=%llu\n",(unsigned long long) STREAM_ARRAY_SIZE);
printf("***** WARNING: ******\n");
#endif

Loading…
Cancel
Save