aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-02-11arm-xo-1.75: fix OLPC buildHEADmasterLubomir Rintel1-1/+1
Oops, a brain fart. Sorry. Fixes: d642a0994dea ("arm-xo-1.75: conditionalize protect-fw on sec-trg-gpio#")
2020-02-09arm-stm32f103 - fixed build problemsMitch Bradley4-6/+16
2020-02-09arm-ariel: add support for Dell Wyse 3020 machineLubomir Rintel11-0/+1101
This adds support for using CForth on the MMP3-based Ariel board, as used in Dell Wyse 3020. It starts up on the small core and loads OFW in a manner equivalent to what is done on OLPC CL4. Among the differencies from CL4 are: diffrent DRAM, generally less hardware hooked to GPIOs (no special keys, etc.), different EC, and different display controller. The only UART that's routed to actual connector on board is UART3 on pins 51 and 52. The machine originally comes with proprietary "WLoader" firmware. Running Open Firmware on it would make it suck considerably less.
2020-02-09arm-mmp2: s/create cl4/create mmp3/Lubomir Rintel4-5/+5
This is a trivial rename. The cl4 word conditionalizes things that are specific to MMP3, not the just OLPC CL4 machine. Using the cl4 name outside OLPC would be misleading.
2020-02-09arm-mmp2: move "third" word to lcd.fthLubomir Rintel3-2/+2
It is the only user and having to define it before loading lcd.fth sort of sucks.
2020-02-09arm-xo-1.75: conditionalize protect-fw on sec-trg-gpio#Lubomir Rintel1-0/+2
This will allow us to support SPI on board without the OLPC security mechanism.
2020-02-09arm-xo-cl4: fix buildLubomir Rintel2-2/+8
This essentially syncs up the bits that were left behind to rot from arm-xo-1.75.
2020-01-26arm-xo-1.75: default to using the cross-compilerLubomir Rintel1-7/+2
The native toolchain of Debian/armhf, and perhaps some other operating systems, ships with libgcc that's no good for running on the "security processor" PJ1/Mohawk core, because it uses Thumb-2 instructions. Let's switch to the arm-none-eabi toolchain. It is available on both Debian and Fedora regardless of what the native architecture is, so it might be a pretty good default.
2020-01-26arm-xo-1.75: check that we don't use Thumb instructionsLubomir Rintel1-0/+1
However, some distributions, such as Debian/armhf, ship with libgcc that uses Thumb-2 instructions in their toolchains. The PJ1/Mohawk "security processor" core has no support for that. Let's add a sanity check, because CForth not working is a big deal (the machine can't be unbricked without disassembling it). Sadly, there doesn't seem to be a way to tell the linker to avoid thumb-compiled binaries. Grepping for 16-bit instrucitons in our disasembly does the trick for now.
2019-11-08OLPC XO-1.75 - DCON drive strength change, #12852James Cameron1-2/+0
2019-11-08OLPC - remove matrix on messageJames Cameron1-3/+1
No longer required.
2019-11-08OLPC XO-4 - lower display brightnessJames Cameron1-1/+1
Lower the initial brightness from 15 to 10. This applies to the period between CForth start and Open Firmware opening the display device. Rationale: New display backlight LEDs are to enter production for XO-4. These make display brighter; 169 cd/m², with DCON brightness register at maximum, at the Sugar home view. We keep the perceived brightness the same as before (125 cd/m² same test conditions), but allow the user to raise the brightness above the previous maximum. We also lose some level of control in the range downwards. A manufacturing tag BL will identify units with new display backlight, but access to tags in CForth is (by design) very simple and not yet worth complicating. Intent - new firmware with new display will show constant brightness from turn on until Linux booted, consistent with the full brightness of the original design. Side effect - new firmware with old display will show brief (2s) low brightness followed by normal brightness once Open Firmware sees no BL tag. See #12854.
2019-11-08OLPC XO-4 - DCON drive strength changeJames Cameron1-1/+3
2019-11-08arm-xo-1.75: tell shim about actual CForth sizeLubomir Rintel2-1/+13
This way we can check whether it fits between the SRAM base and shim itself and abort the build if it's too large for us to be able to copy.
2019-11-08arm-xo-1.75: relocate shim 4K furtherLubomir Rintel1-1/+1
CForth image has grown and needs more space. Hopefully we still have enough stack space.
2019-11-08arm-xo-1.75: set the CPU variantLubomir Rintel1-0/+3
This makes sure we do build things consistently regardless of compiler defaults or whether we're doing a native or cross build.
2019-11-08arm-xo-1.75: drop initio.cLubomir Rintel1-22/+0
It is not used.
2019-11-08arm-xo-1.75: turn off PIE by defaultLubomir Rintel1-0/+2
It makes no sense, our code executes from the same address. It also adds a .git section we are not able to handle. However, some compilers turn it on by default (e.g. Debian) and it needs to be turned off explicitly.
2019-11-08arm-xo-1.75: rename file-size variable in dropin.fthLubomir Rintel1-4/+4
It clashes with the word that calls pfsize().
2019-11-08arm-xo-1.75: drop wljoin from olpcbasics.fthLubomir Rintel1-1/+0
split.fth provides it now.
2019-11-08arm-xo-1.75: drop alloc-mem and free-mem from olpcbasics.fthLubomir Rintel1-1/+0
util.fth provides those now.
2019-11-08arm-xo-1.75: set platform VPATH earlier than including generic targets.mkLubomir Rintel1-4/+4
This is so that app or platforms specific sources are perferred to generic ones.
2019-11-08arm-xo-1.75: fix some compiler warningsLubomir Rintel2-3/+3
2019-11-08arm-xo-1.75: implement strlen()Lubomir Rintel1-0/+8
Fixes build: Linking cforth.elf ... arm-none-eabi-ld: tembed.o: in function `complete_word': /home/lkundrak/src/cforth/build/arm-xo-1.75/../../src/cforth/lineedit.c:307: undefined reference to `strlen' arm-none-eabi-ld: tembed.o: in function `propose_word': /home/lkundrak/src/cforth/build/arm-xo-1.75/../../src/cforth/lineedit.c:349: undefined reference to `strlen' make: *** [../../src/platform/arm-xo-1.75/targets.mk:60: cforth.elf] Error 1
2019-11-08arm-xo-1.75: fix init_io() prototypeLubomir Rintel2-8/+7
Fixes a build failure: ../../src/platform/arm-xo-1.75/consoleio.c: In function 'init_io': ../../src/platform/arm-xo-1.75/consoleio.c:138:1: error: number of arguments doesn't match prototype 138 | { | ^ In file included from ../../src/platform/arm-xo-1.75/consoleio.c:1: ../../src/cforth/forth.h:65:6: error: prototype declaration 65 | void init_io(int argc, char **argv, cell *up); | ^~~~~~~ make: *** [../../src/common.mk:30: tconsoleio.o] Error 1
2019-11-08arm-xo-1.75: rename platform textend.c to extend.cLubomir Rintel1-0/+0
This is so that the tccalls.fth rule matches the correct source.
2019-11-08arm-mmp2: drop redundant purpose: definitionLubomir Rintel1-2/+0
It's provided by util.fth now.
2019-11-08embed: build host forth 32-bitLubomir Rintel1-0/+6
On x86_64 it builds, but doesn't seem to work: $ make -C build/arm-xo-1.75 ... cc -o meta meta.o compiler.o io.o dictfile.o mallocl.o ./meta ../../src/cforth/interp.fth kernel.dic (cd ../../src/cforth/embed; ../../../build/arm-xo-1.75/forth ../../../build/arm-xo-1.75/kernel.dic load.fth; mv forth.dic ../../../build/arm-xo-1.75) Tried to execute a null token
2019-11-08embed: make sure userarea.h is not larger than MAXUSERLubomir Rintel1-4/+12
The compiler would happily just chop the end off. We have to check the actual size with sizeof() and cause the compiler to fail (hoping that it minds arrays of negative size, like GCC does).
2019-11-08makebi: add some sanity checksLubomir Rintel1-0/+9
Make sure the input file was exactly the size we'd expect it to be.
2019-11-08config: make sure BITSxx is definedLubomir Rintel1-0/+3
This allows us to fail nicely in the event word size is unknown instead of this: In file included from ../../src/cforth/embed/mallocembed.c:3: ../../src/cforth/forth.h:21:5: error: unknown type name 'u_cell' 21 | u_cell magic, serial, dstart, dsize, ustart, usize, entry, res1; | ^~~~~~ ../../src/cforth/forth.h:62:24: error: unknown type name 'u_cell'; did you mean 'cell'?
2019-11-05mqtt-car: cleanupMitch Bradley1-6/+0
2019-10-31Working versions of MQTT demo for conferenceMitch Bradley10-188/+528
2019-10-30Omnibus checkin of changes for conference demoMitch Bradley16-29/+830
2019-10-05Fixed bitrot in dot.fthMitch Bradley3-11/+11
dot.fth is used only for debugging early build problems and is not used for production builds.
2019-10-04Make the MQTT code more genericMitch Bradley9-13/+457
and implement on ESP32 in addition to the existing ESP8266.
2019-09-25simplified <= and >=Bushmills1-2/+2
2019-09-24Handle larger numbers in output conversion (Issue #43)Mitch Bradley1-1/+1
The distance from here to pad was only 100 bytes, so double number conversion in binary on 64-bit systems could overflow. Changed to 140 bytes, giving room for 128 digits plus a few extras.
2019-09-23Fixes to Sonoff appMitch Bradley5-13/+72
Also added new-file: for manually entering short files on ESPs.
2019-09-22Scale: factored wifi, added faceplate CAD, documented sheet setupMitch Bradley4-9/+18
2019-09-22New app: Sonoff ESP8266 Wifi Switch using MQTT protocolMitch Bradley10-0/+632
2019-09-22WiFi Scale - Update schematic and add PDF versionMitch Bradley6-32713/+19431
2019-09-21Added ESP8266 WiFi bathroom scale appMitch Bradley13-0/+92078
2019-09-21Remote control app - deployed versionMitch Bradley2-160/+263
2019-09-21ESP8266 - Various improvementsMitch Bradley6-6/+31
TCP error message decoding GPIO open drain support Data type fix (string argument) to dns-gethostbyname New "load-startup-file" factor Support different flash sizes and I/O modes in download target
2019-09-21MacOS - fix make problem with command line XCodeMitch Bradley1-0/+1
Thanks to David Phillip Oster for finding the fix.
2019-08-27Initial revisionMitch Bradley3-0/+1020
2019-08-14Added ESP8266 client socket exampleMitch Bradley1-0/+49
Edit the IP address and Wifi credentials In app.fth, "fload test-socket". Then run "probe-ssh"
2019-08-14double_t -> double_cell_tMitch Bradley2-14/+14
Some libc6's already have a double_t
2019-08-13Oops broke 32-bit builds with a recent commitMitch Bradley1-2/+2
2019-08-13Squashed a compiler warning from extend-posix.cMitch Bradley1-0/+2
2019-08-13Let the compiler do double precision workMitch Bradley2-255/+58
There was a lot of code to do double number arithmetic that earlier C compilers could not handle, but modern compilers have an impressive array of longer types so that old arithmetic code can now be replaced by the compiler's arithmetic on double-width types.
2019-08-13Fixed bug in um/mod on 64-bit systemsMitch Bradley2-52/+39
In the process, eliminated variant code for double arithmetic in favor of parameterized code.
2019-05-18esp32 fixed typo in previous commitMitch Bradley1-1/+1
2019-05-18esp32 - automate ESP-IDF and toolchain installationMitch Bradley3-144/+75
I hope it will work going forward. I tried to anticipate some upcoming changes in the esp-idf makefiles that will land in 3.2, but one never knows.
2019-05-15esp32 - Update compiler versionMitch Bradley1-1/+1
2019-05-15esp32 toolchain setup fixesMitch Bradley4-13/+49
2019-04-20Some example/experimental codeMitch Bradley6-0/+492
- Switch ESP8266 ADC between VCC sensing and external A0 pin - Use the ESP8266 RTC to wakeup from deep sleep - Stepper motor driver for Wemos motor shield - Various fast ways to compute temperature from a PT100 thermistor
2019-04-19esp8266 - fixed bit-rotten TCP and server codeMitch Bradley3-94/+32
2019-04-19HTTP server - new URL syntax to set numeric valuesMitch Bradley2-7/+64
/setval?foo=3&bar=4
2019-04-19esp8266 wifi - display SSID in station mode tooMitch Bradley1-10/+27
2019-04-19esp8266 - reentrancy for callbacksMitch Bradley4-15/+107
Callbacks from the network stack and alarm handlers can damage the stacks of foreground applications, because while the inner interpreter is running, the stack pointers are in local variables that are not visible to the callback. The solution is to switch to private stacks during callbacks.
2019-03-21Merge branch 'master' of https://github.com/MitchBradley/cforthMitch Bradley1-0/+100
2019-03-21Working version + flow meterMitch Bradley6-8/+452
2019-03-20Added GPIO notes for ESP32MitchBradley1-0/+100
2019-03-01Another tweak to the esp8266 MakefilesMitch Bradley1-1/+1
Correctly installs the nodemcu SDK when you start the build from an app other than the default esp8266 one.
2019-03-01Fixed typo in esp8266 makefilesMitch Bradley1-1/+1
2019-02-28Better dependencies for esp8266 buildMitch Bradley2-8/+6
2019-02-19esp8266 compiler auto-installationMitch Bradley1-5/+6
2019-02-19New keg washer appMitch Bradley2-0/+90
2019-02-19Moved some i2c drivers from bluez to libMitch Bradley5-15/+51
2019-02-09Remove redundancies in glfw-*/MakefileMitch Bradley2-39/+13
Some lines were moved into the common file src/app/glfw/targets.mk so they did not need to be in the top Makefiles
2018-11-24MAX31865 temperature sensor driverMitch Bradley1-0/+112
2018-10-27esp8266 - added driver for serial RGB LEDMitch Bradley3-0/+68
2018-10-26esp8266 - new GRBL sender appMitch Bradley5-0/+418
2018-10-26esp8266 - Build refactoringMitch Bradley7-160/+157
Moved stuff around to simplify app load files and to make it easy to have per-app source and build directories.
2018-10-26xmodem - support receiving large filesMitch Bradley2-12/+38
Both files that are too large for the available RAM, and ones larger than 32K.
2018-10-21esp8266 - auto-build Xtensa C compilerMitchBradley2-3/+13
2018-10-20esp32: automate toolchain installationMitchBradley3-11/+110
2018-10-20esp8266 build improvementsMitchBradley4-5/+5
2018-10-19Posix serial - Allow strings as port namesMitch Bradley1-3/+10
2018-10-08ESP32 - added errno and socket test programMitchBradley2-0/+79
2018-08-23ESP32 - propagate COMPORT to flash toolMitchBradley1-3/+10
2018-08-22ESP32 - fixed textend problemMitchBradley3-3/+4
2018-08-21ESP32 - update to work with current SDKMitch Bradley6-138/+598
2018-08-20Include -lm in LIBSTom Bereknyei1-0/+1
2018-04-30Added acall: defining word similar to ccall:Mitch Bradley1-1/+8
It would be useful for interfaces to dynamic libraries.
2018-04-30Added -DBITS32 to bluez MakefileMitch Bradley1-0/+1
2018-04-03Some printfs dislike %tMitch Bradley1-1/+2
2018-04-03Add floating point support to STM32F103 targetMitch Bradley2-17/+25
2018-03-31Fixed bug in response handled; led to stallsMitch Bradley1-2/+4
2018-03-30Added touchscreen supportMitch Bradley3-4/+74
2018-03-30Added UI for small LCD screen with GPIO buttonsMitch Bradley5-24/+177
2018-03-30Better response parsing, commentsMitch Bradley1-32/+65
2018-03-30CleanupMitch Bradley1-24/+48
2018-03-30Initial revision, mostly worksMitch Bradley1-0/+95
2017-09-11Fix be-l!Mitch Bradley1-1/+1
2017-09-11Merge pull request #29 from ivand58/bit-bandMitch Bradley4-1/+81
Bit band calculation for cortex M3/4
2017-09-11The code is changed as it was suggested.Ivan Dimitrov1-22/+7
2017-09-06this file is movedIvan1-58/+0
2017-09-06An example for blue pill board.Ivan Dimitrov1-0/+58
2017-09-06Usage notes are addedIvan Dimitrov1-2/+7
2017-09-06bitband.fth is moved to its proper location.Ivan Dimitrov2-1/+1
2017-09-05code for bit-bandivand582-8/+14
2017-09-05bit bandivand581-0/+25
2017-09-04 the example files is addedivand581-0/+58
2017-09-04example for stm32f103ivand581-0/+1
2017-09-03STM32F103 - added GPIO and ADC functionsMitch Bradley8-76/+226
2017-09-02Added STM32F103 build targetMitch Bradley11-0/+783
It supports, for example, the "Blue Pill" board that costs about $2. At present, the only supported peripheral is USART1 connected via PA9 (TX) and PA10 (RX).
2017-09-02Removed null init_io() from rudimentary consio.cMitch Bradley1-4/+0
The null implementation of init_io() in embed/consio.c prevented the other generic routines thereif from being used with platforms that need a non-null init_io(). Platforms than need a null init_io() can easily add it, or can simply not call it from their main()
2017-09-02Removed redundant actions from embed/targets.mkMitch Bradley1-19/+5
The rules in question need only the dependencies; the corresponding actions are inferred from common.mk . This keeps the actions in one place, so changes do not need to be propagated to several places.
2017-09-02LIBGCC finder now supports paths containing spacesMitch Bradley1-1/+18
2017-08-10Added esp32/pH.fth and sensors/vl53l0x.fthMitch Bradley2-0/+755
2017-07-12Merge pull request #27 from quozl/arm-teensy3-rtsMitch Bradley1-0/+6
arm-teensy3 - serial receive hardware flow control
2017-07-12arm-teensy3 - serial receive hardware flow controlJames Cameron1-0/+6
When enabled in build, Teensy 3.1 pin 6 is RTS and must be tied to CTS of host. Host must be configured to observe CTS. Tested with `screen /dev/ttyUSB0 115200,crtscts` no issues. Tested with `cat /dev/ttyUSB0` and `for x in $(seq 10000); do echo -e "get-msecs .d ( $x )\n" > /dev/ttyUSB0; done` no issues.
2017-07-11Merge pull request #26 from quozl/2017-07-10-arm-teensy3Mitch Bradley27-211/+565
arm-teensy3 - merge various changes
2017-07-11Merge pull request #25 from quozl/2017-07-10-cleanMitch Bradley4-4/+8
Clean EXTRA_CLEAN
2017-07-11arm-teensy3 - merge various changesJordan Hubbard27-211/+565
- rebase arm-teensy3 platform code, to f0d263c540180ef173f639224e93e7c6ce9c5d3d from https://github.com/PaulStoffregen/cores - allow any pin for analog writes, - avoid redundant usb_init and analog_init calls, - add RTC access words, thanks to Mitch's textend.c, - fix layout of ccalls, - fix paste via USB, by using half of the USB buffers for the TX path, and half for the RX path, and hand over only RX buffers when RX exhaustion is detected, tested with a million lines of paste, - separate console controls; add new words uart-on uart-off uart? for controlling UART console, and usb-on usb-off usb? for controlling USB console, - add new word restart to use watchdog method for forcing system reset, and allow bye to fall out of interpreter into restart, - add new word reflash for placing system into wait for loader, equivalent to pressing the button, - remove watchdog test file; only ever used for restarting. - use $PATH for teensy_loader_cli, - add -dirty to version if repository not pristine, - clean up build log. Co-authored-by: James Cameron <quozl@laptop.org>
2017-07-11Clean EXTRA_CLEANJames Cameron4-4/+8
- "make clean" was leaving files behind on my arm-teensy3 branch, reported by Jordan Hubbard, - remove some not-needed cleans of date.c, in embed-linux, esp32, arm-teensy3, - wrap long lines.
2017-07-05Flesh out ESP32 serve-sensorsMitch Bradley3-15/+146
2017-07-05ESP32 - timeout if WiFi AP is unreachableMitch Bradley4-9/+52
2017-06-17More ESP32 WIPMitch Bradley8-1/+415
2017-06-17ESP32 WIPMitch Bradley4-88/+36
2017-06-17esp32 - suppress SPIFFS mount messagesMitch Bradley1-0/+1
2017-06-17arm-teensy3-pump now uses correct app.fthMitch Bradley1-1/+1
2017-06-17Fixed OFW build.Mitch Bradley2-6/+4
Some changes to the factoring of vocabulary had broken the OFW build.
2017-06-17Moved common code out of ESP8266Mitch Bradley17-115/+46
Sensor drivers moved to src/sensors/ HTTP server common code moved to src/lib Platform dependencies in server better isolated.
2017-06-17New target for embedding CForth into a Linux kernelMitch Bradley7-0/+162
build/embed-linux64
2017-06-17Refactored emit/putchar/txMitch Bradley15-91/+35
CR-LF handling is now centralized
2017-06-17Fixed undefined extern in embed/rwdict.cMitch Bradley1-1/+3
2017-06-17Minor problem in embed/targets.mkMitch Bradley1-2/+2
2017-06-17Fixed word size problem in makebi.cMitch Bradley2-17/+16
It caused failures with 64-bit embedded images.
2017-05-25esp32 - add SPIFFS filesystemMitch Bradley28-8/+9390
2017-05-23esp32 - added IP address displayMitch Bradley3-1/+24
2017-05-23esp32 - incorporate wifi and networkingMitch Bradley6-2/+267
2017-05-22esp32 - added gpio functionsMitch Bradley3-1/+73
2017-05-22arm-teensy - fixed some result types in textendMitch Bradley1-6/+6
2017-05-22esp32 - Added I2C driver interfaceMitch Bradley2-4/+151
2017-05-22Updated sdkconfig for esp-idf v2.0-rc1Mitch Bradley2-16/+122
2017-01-07Fixed some clang warningsMitch Bradley3-4/+6
Thanks Rob Sciuk
2017-01-04ESP32 - no more SDK include dependenciesMitch Bradley7-48/+80
2017-01-03First try at ESP32 versionMitch Bradley13-1/+746
2016-12-29Merge pull request #22 from quozl/repumpMitch Bradley15-1/+201
Restore arm-teensy3 pump controller
2016-12-29Restore arm-teensy3 pump controllerJames Cameron15-1/+201
- was lost in yesterday's rework, - compile tested only.
2016-12-28Merge pull request #21 from quozl/pumpMitch Bradley38-169/+17076
Add arm-teensy3 isolated build
2016-12-28Rebase arm-teensy3 platform codeJames Cameron16-1008/+8164
As of 8a02ea67f577c1798b50c38da9b74296a861b45a from https://github.com/PaulStoffregen/cores Also maintained in branch cforth in a fork https://github.com/quozl/cores/tree/cforth Passes LED blink test.
2016-12-28Rebase arm-teensy3 to upstreamJames Cameron5-12/+71
- add build date and commit hash to banner, - add local strlen implementation. Tested on Teensy 3.1. arm-none-eabi-size app.elf text data bss dec hex filename 72680 168 13688 86536 15208 app.elf
2016-12-28Add arm-teensy3 README.mdJames Cameron1-0/+14
2016-12-28missing () after kbhitKrisztián Fekete1-1/+1
to me it implies that either the pc platform is not used or getchar is not used Signed-off-by: James Cameron <quozl@laptop.org>
2016-12-28Fix non-volatile inhibit and a!James Cameron1-5/+8
- on some units, pin 13 does not float high enough, so require shorting pin 13 and 14 to inhibit non-volatile buffer execution. - fix a! argument specification list, analogWriteADC0 takes only one argument.
2016-12-28Add DAC supportAndreas Wagner2-22/+25
2016-12-28Add arm-teensy3 buildJames Cameron34-172/+9844
- minimal teensy3 sources copied from https://github.com/PaulStoffregen/cores.git 064c0b52eed1f91faa768f8d173cd84268dbbbfb - hardware UART0 at 115200 baud with FIFO, - USB serial console multiplexed with UART0, - use EEPROM as a non-volatile text block to execute, ground pin 13 to inhibit, - first of the two I2C peripherals available, pins 18 and 19, - built-in LED blink test, use `lb` to trigger.
2016-12-28Shift pump controller buildJames Cameron1-0/+0
Test built on Ubuntu 14.04 using; ``` cd build/arm-teensy3-pump && \ make CROSS=arm-none-eabi- LIBS=-lm ```
2016-12-06Additional fixes for order.fthMitch Bradley1-3/+1
2016-12-06Wordlist fixesMitch Bradley2-8/+6
2016-12-04Make file-size ANS Forth compliantMitch Bradley7-11/+18
2016-12-02Merge branch 'master' of https://github.com/MitchBradley/cforthMitch Bradley2-0/+73
2016-12-02win64 - Omit FTDI and OPENGL support by defaultMitch Bradley2-1/+20
They are rarely needed and hard to compile because of dependencies.
2016-12-02Fixed bug in c", thanks ellerhMitch Bradley3-9/+7
2016-12-01Merge pull request #13 from quozl/2016-337-ds1307-tsl2561Mitch Bradley2-0/+73
Drivers for ds1307 tsl2561
2016-12-02add tsl2561 driverJames Cameron1-0/+43
2016-12-02add ds1307 rtc driverJames Cameron1-0/+30
2016-12-01Merge branch 'master' of https://github.com/MitchBradley/cforthMitch Bradley2-0/+123
2016-12-01host-serial-macos64 - omit FTDI and OPENGLMitch Bradley1-3/+18
The default build now excludes support for the FTDI low-level API and OPENGL. Those features are tricky to use and tricky to compile because of complex dependencies.
2016-12-01bluez: Removed Nod code in open_comMitch Bradley1-8/+0
That code is now irrelevant.
2016-11-17Merge pull request #11 from quozl/2016-323-af1271-mlx90614Mitch Bradley2-0/+123
I2C drivers for af1271 mlx90614
2016-11-18add mlx90614 infra red thermometer driverJames Cameron1-0/+36
2016-11-18add af1271 display driverJames Cameron1-0/+87
2016-10-29host-serial-linux* - default to no FTDI or OPENGLMitch Bradley2-8/+14
Those modes requires additional packages to be installed, which can be troublesome. Without FTDI, it is still possible to access serial ports in their normal modes, but you cannot use the fancy features of FTDI chips to do things like using them as GPIO ports.
2016-10-29Fix T16 compilationMitch Bradley1-0/+4
A recent change broke the compilation of versions that use T16 token encoding to save space. That change increased the default dictionary size to a larger value than T16 encoding can handle. This fix ensures sets the default dictionary size, when using T16, to the max value possible for T16.
2016-10-29ESP8266 - autoload a startup fileMitch Bradley1-1/+15
When the ESP8266 version starts, it looks for a SPIFFS file named "start". If that file exists, it is loaded as Forth source. You can prevent the autoload by typing a key within 2 seconds.
2016-10-29ESP8266 - Automate the nodemcu-firmware setupMitch Bradley4-7/+483
With this change it should not be necessary to explicitly download or patch the nodemcu-firmware tree, nor to explicitly run make in that tree to "prime" the process. Running make in build/esp8266 will do it all for you.
2016-10-16Fixed order.fthMitch Bradley1-0/+2
2016-10-13Oops broke the esp8266 buildMitch Bradley2-3/+11
2016-10-13esp8266: Added some wifi and tcp connection wordsMitch Bradley6-3/+87
2016-10-13esp8266: removed now-redundant date.o make ruleMitch Bradley1-13/+4
Also added some missing dependencies
2016-10-13Fixed token number space overflow problemMitch Bradley3-2/+9
2016-10-13Fixed decompilation of aliasesMitch Bradley1-1/+2
2016-10-13esp8266 - Fixed ugly bug in create/open-fileMitch Bradley2-3/+15
The symptom was that "rf foo" would sometimes make a file named "X" which was not deleteable because the real name contained a non-printing character. Also added "rm*" and "rm *" to clear out the file system.
2016-10-13Allow command line override of comport nameMitch Bradley1-1/+1
e.g. "COMPORT=COM4 make download" For complete functionality, the "loadit" script in nodemcu-firmware must be modified to get the comport name from $1 instead of hardcoding.
2016-10-12Fixed a dependency broken by the last commitMitch Bradley3-7/+9
2016-10-09Builders for OFW on Windows32 and Window64Mitch Bradley11-33/+472
Previously, OFW extensions were only built for ESP8266. This patch adds ofw-windows32 and ofw-windows64 targets that run under Windows with OFW extensions.
2016-10-04esp8266: Eliminate dependency on myspiffs_*Mitch Bradley1-59/+68
Recent versions of nodemcu_firmware do not have some of the myspiffs_* functions, instead using a vfs abstraction. With this commit, CForth will compile with either old or new nodemcu_firmware
2016-10-04OFW versions for windows 32 and 64 bitMitch Bradley8-30/+68
2016-10-02Fixed heap corruption with long [ifdef] linesMitch Bradley1-3/+5
The problem was in ip_canonical(), which double-incremented a pointer as it stepped through the word. [else] calls $canonical after parsing each word of the input to be discarded. If a single word exceeded half the size of the input buffer, the double-increment would cause a write past the end of the buffer, thus possibly smashing the heap. This only showed up when compiling md5.fth from the OFW source. That file contains an [ifdef] notdef block with an embedded C comment block with a line of 72 asterisks.
2016-09-28Use Open Firmware files directly from OFW treeMitch Bradley104-18154/+137
Most of the Open Firmware files that were copied into the CForth tree did not need any modifications, so I deleted them in favor of using the files directly from a copy of the openfirmware tree. This leaves only a few files in src/ofw: core/deblock.fth This is a reimplementation of the deblocker package that does not depend on the file code in the Forthmacs kernel fs/ext2fs/ext2fs.fth fs/ext2fs/methods2.fth fs/fatfs/loadpkg.fth fs/fatfs/methods2.fth The "method2.fth" files similarly do not depend on Forthmacs kernel file code, instead using the reimplemented deblocker package. The load files ext2fs.fth and loadpkg.fth refer to "methods2.fth" instead of the "methods.fth" files from openfirmare/ core/ofwcore.fth objects.fth These are mostly the same as the corresponding openfirmware/ files, but with a few ifdefs to handle miscellaneous differences between CForth and Forthmacs. The changes could easily be folded back into the openfirmware/ tree. disklabel/loadpkg.fth Has additional ifdefs to permit the omission of some filesystems. Would be easy to fold back into openfirmware/ filenv.fth An implementation of NVRAM using SPIFFS files. This is similar to openfirware/cpu/x86/pc/biosload/filenv.fth but it uses ANS Forth standard file words instead of the Forthmacs file words. I think that biosload/filenv.fth could be replaced by this one, since OFW supports ANS file words. nullfb.fth These are no-op implementations of the frame buffer support routines, for the benefit of systems where a color frame buffer is unlikely to be present. objsup.fth CForth versions of the object support words. In OFW, these support words are typically implemented in machine code. This file implements them in high level Forth. This high-level implementation might be useful in the OFW tree as a porting aid to new CPU architectures - but one wonders if any new architectures will ever be added to the OFW tree, or indeed if there will ever be any new CPU architectures. ofw-support.fth Implementations of a bunch of miscellaneous, mostly trivial, words that Forthmacs has but CForth did not otherwise have.
2016-09-28Reinstated editenvMitch Bradley3-290/+295
In the process, renamed ofw-dt.fth back to its openfirmware tree name ofwcore.fth, moving the pile of compatibility definitions out to ofw-support.fth.
2016-09-28Merge pull request #8 from quozl/2016-268Mitch Bradley2-2/+2
Couple of trivial fixes
2016-09-28Added OFW line editorMitch Bradley9-10/+260
This supports the nvedit and nvalias commands. It required a kernel change for better support of defer words early in the compilation process, so that accept could be deferred properly.
2016-09-28Added OFW configuration variablesMitch Bradley31-11/+6722
2016-09-28Fixed rstrace failMitch Bradley1-9/+20
.. by making reasonable-ip? cognizant of RAM/ROM dictionaries.
2016-09-28Added {i,j}limit, file-position, reposition-fileMitch Bradley5-3/+64
2016-09-28Don't crash on stack underflowMitch Bradley2-1/+4
A change from awhile ago threw an error code from interact when the stack underflowed, instead of printing an error message. Since there was no enclosing top-level catch, that caused the system to crash. This reinstates the error message without using throw at that point.
2016-09-24ESP8266 ds18x20 - fix stack imbalanceJames Cameron1-1/+1
init-ds18x20 leaves a "1" on stack.
2016-09-24ESP8266 TCP - fix stack effect commentJames Cameron1-1/+1
2016-09-22Merge pull request #7 from quozl/add-dns-gethostbynameMitch Bradley2-0/+25
ESP8266 TCP - add dns-gethostbyname
2016-09-22ESP8266 TCP - add dns-gethostbynameJames Cameron2-0/+25
For queries by name, returns `ERR_INPROGRESS`, and the callback is given address of IP address, or 0 if name was not found. For queries where the name is a numeric IP address, returns `ERR_OK`, with IP filled in, and no callback. An extern was used because the build was unhappy with `dns.h` and didn't have the patience to resolve it. Test case, in station mode associated with an access point: ``` : ?.ipaddr ( a.ip -- ) ?dup if .ipaddr else ." NULL" then ; : dns-cb ( a.arg a.ip a.name -- ) rot ." dns-cb arg " . cr swap ." dns-cb ip " ?.ipaddr cr ." dns-cb name " cscount type cr ; create ip 4 allot \ not used unless query is numeric 42 ' dns-cb ip c" google.com" dns-gethostbyname . cr d# 1000 ms 43 ' dns-cb ip c" tooraweenah.com" dns-gethostbyname . cr d# 1000 ms 44 ' dns-cb ip c" bogus.tooraweenah.com" dns-gethostbyname . cr d# 1000 ms 45 ' dns-cb ip c" 127.0.0.1" dns-gethostbyname . cr ip ?.ipaddr cr ```
2016-09-20Added more OFW file system supportMitch Bradley33-81/+4465
.. in particular, readers for FAT and EXT2 files.
2016-09-20Added stack comments for file opsMitch Bradley1-5/+5
2016-09-20Removed undefined "init-state" from XMODEMMitch Bradley1-1/+0
I'm not sure how it got there.