-
Notifications
You must be signed in to change notification settings - Fork 73
/
TODO-BITLASH
339 lines (270 loc) · 8.65 KB
/
TODO-BITLASH
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
Bitlash To-Do
Personal working notes (c) 2011 Bill Roy
9/29/11 -br
=============================
RELEASE NOTES UPDATES FOR RC4
- preliminary Arduino 1.0b4 support
- nanode web server
- pin alias variables
- builtin script dictionary
- bitlash_rf doc
==========
- git work in progress at:
git clone http://bitlash.net/git/bitlash.git
BLOCKING BUGS
- BUG: The run command only works with EEPROM functions in the current release.
- not user functions, built-ins, or SD card functions
- BUG: Update sdfat to http://sdfatlib.googlecode.com/files/sdfatlib20110702.zip
- Update sdfat to http://beta-lib.googlecode.com/files/SdFatBeta20110810.zip for testing
- BUG: Web site documentation update for this release is not complete
- BUG: rm setid doesn't work if setid is first in EEPROM?
- BUG: ram, and therefore stack, is very tight.
- 330 bytes free with SDFILE enabled, vs. 1021 without
- some things fail in the SDFILE version that work otherwise
- BUG: CRASH: bitlashcode/elevator2.btl crashes on "show" with sdcard support enabled
- callat/workabove/workbelow work ok
- looks like it ran out of stack, hard
- works without SDFILE support
- BUG: SDFAT version doesn't consistently include fprintf
- BUG: need an easy way to build an SD-free version
- workaround: manually turn off SDFAT define in bitlash-instream.c
- Q: how to distribute a library with conditional compiles
- it may not be possible in the arduino build system
- backwards compatible 0022 vs. 1.0
- sd vs. non sd core
- 15192 bitlashdemo with SDFAT define off
- 27472 bitlashsd with SDFAT on
- BUG: stack dump on error has stale traceback data
- BUG: can't define a function from within a function
- BUG: cmd_function issue measuring text
- test: function definition from script file, probably fails
- BUG: "run" command doesn't work on SDFILE scripts
- workaround: use an EEPROM function as a trampoline.
- FEAT: revise task manager to support file and progmem contexts
- requires storing file name...
- BUG: eeprom and file contexts have distinct and incompatible command sets
- eeprom: ls, rm
- file: dir, del, create, append, type, cd, md
- need a unified addressing and command structure across storage types
- a: / c: ? (ugh.)
=============================
bitlash_rf example
- vw demo
- radio selection in bitlash_rf.h
=============================
- BUG: list of bugs/changes required for arduino v1 beta support
- master list here: http://code.google.com/p/arduino/wiki/Arduino1
- .ino extension on the library master and all examples
- WProgram.h -> Arduino.h requires touching library master and all examples
+ serial.print becomes serial.write if you want the byte to go!
- ethernet: can't say (client==NULL), replace with !client
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
=============================
- docnote: calling addBitlashFunction before initBitlash
=============================
open issues
- BUG: it takes >45 bytes of stack to recurse foo:="print free;foo;"
it should take less
- BUG: chkbrk lookahead bug: chkbrk gobbles keystrokes
- Serial.peek() is implemented in 0022, might help
- BUG: ^C at the command line (as opposed to chkbrk) terminates wierdly
- BUG: ^B doesn't work. background tasks keep running. sigh.
- BUG: *x++ = *y++: greedy assignment in getfactor" fix
=============================
- feat: enumerate all symbols in help
- user C functions
- pin aliases
- built-in scripts
=============================
- feat: detect card insertion and autorun startup function
- feat: CD("dir") could autorun
- obstacle: the card detect line is not supported in the library
- test: handling of card removal
=============================
- feat: virtual block device for progmem, SPI eeprom, ...
- extend the eeprom mini-file-system for other media
- PROGMEM built-ins / virtual block device
- debugging functions?
vars dump a..z
hd hex dump memory (memdump)
=============================
Feat: Local Functions for File Scripts
- make note of the locations of function statements as they go by
- build a local symbol table in the string pool, with name/offset pairs
=============================
feat: event handling
onerror macro
call with error code and subcode
it can "stop *"
could be implemented in progmem words
error-in-error case is ugly, may need boot recovery (ugh)
onkey macro
returns 0 or key to process
attachInterrupt handler?
print-to-bitlash-handler
- function to handle printed output
=============================
Platform Issues
- BUG: teensy2 bug 5/15/10: problem with toggle macro
- feat: Wiring 0027 changes
- feat: Mega168 support, after the dust settles
- STRVALSIZE
- vstacklen
- function suite
- BUG: 168 doesn't run (stack oflo) but it could (smaller e-stack)
- TEST: Sanguino
- TEST: MEGA 2560
numpins
eeprom
unix or processing shell
tiny85 code integration
tiny84 hardware interface file
=============================
feat: option for inverted software serial output
q: rename snooze() to idle()?
feat: input() function
=============================
Q: Should macro def say "saved" or silently return to prompt?
=============================
BUG: defining a function within a function fails
> ls
> function foo {function bar{print "bar"};bar};print millis
saved
102946
> ls
function foo {function bar{print "bar"};bar};
> foo
saved
> ls
function foo {function bar{print "bar"};bar};
function bar {};
*** BUG
*** a function saved from a function from eeprom doesn't work
*** the "backup to '}'" code doesn't handle EEPROM as execution context
> rm bar
> ls
function foo {function bar{print "bar"};bar};
> foo
saved
> ls
function foo {function bar{print "bar"};bar};
function bar {};
> bar
>
=============================
2.0 Doc todo
blog
bitlash web server
bloader.py
macros/
bloader.py macro loader and interactive terminal
elevator.btl and elevator2.btl elevator state machine example Bitlash code
trafficlight.btl and trafficlight2.btl traffic light state machine example
tests/
bitlash-test.py
bitlfu forum?
---
examples
counter using attachInterrupt, user function to expose count
setoutput(pin)
---
TODO: Bitlash web server
- BUG: Nanode web server crashes with stack overflow when DHCP is enabled instead of hard-coded IPs
- fix: remove ibuf, and use doCommandChar(), to save ram - retest
pages from SD card (with [script] interpretation)
configurable IP and port
log request IP
http://arduino.cc/forum/index.php/topic,54378.msg391180.html
http://arduino.cc/forum/index.php/topic,66448.msg487621.html
allow GET /foo(arg1,arg2)
- transcribe the arg list if present
- limit to integer values and commas
- GET /play(66,65,66,67,66,65,69,71,68)
- improve end-of-url detection
favicon image
PUT or POST from Bitlash function
hardwired server IP per pachube example
POST overrides print
requires: command override (or patch)
head and foot macros
content-type control
accept POST requests (ignore body?)
for pages with buttons
PACHUBE integration examples
---
TODO: examples
Teensy Morse-In to Keyboard
Teensy MIDI generator
Processing MIDI example
- requires midi input hook
midi in -> note_on, note_off macros
Processing Serial example
- requires return value parsing
Improve spi to cover the new SPI.h
bitlash logger
capture printed output to SD
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1293975555/0#0
---
---
==========
Space analysis
==========
arduino-0022
13954 bytes bitlash v1.1
14550 first compile, no arg checking
14716 with working macro args, return, set
14212 without parser trace
14900 with args and new statement handling + trace
14616 without trace
14880 rc1
14336 is the max for a '168 Due
now it's 143xx again??
==========
Floating Point Bitlash
==========
14292 long int
16134 with floating point (ugly hack)
fixes:
- ivar hack: need a way for forced-integer parameters internally
- logical ops and floating point operands ?!
- printIntegerInBase
- parseInteger, ok, but ParseFloat
floating point bitlash
how much trig?
floating point formatting
precision: print z:2,f:4
z:2x,f:4b,
floating point constant parsing
pi(), ee(),
==========
processing ide
good terminal interface window
scrollback
file capture
execute selected text
vt-100 ansi escape sequences(!)
send a command, capture the result
edit/update functions
---
==========
HOLD:
switchingyard expression parser
==========
space: 14566 -> 14540 -> 14584 (notrace)
960 vs. 928 w/ trace
stack foo
old parser 46/foo
new 30/foo
todo:get rid of isrelop
BUG: 1+2*3 errs
stack usage is down 15 bytes/iteration but still at 35
BUG: getstatement is a stack piggy
TODO: pass minitest
is ostop under control?
may need local stack
for recursive (expr) call
or put parens handling into the loop