Fixed oled bug, made build more flexible + fix build errors.
This commit is contained in:
@ -42,7 +42,6 @@ CFLAGS_MINIMIZE = [
|
|||||||
'-s',
|
'-s',
|
||||||
'-DUEFORTH_MINIMAL',
|
'-DUEFORTH_MINIMAL',
|
||||||
'-fno-exceptions',
|
'-fno-exceptions',
|
||||||
'-ffreestanding',
|
|
||||||
'-fno-stack-protector',
|
'-fno-stack-protector',
|
||||||
'-fomit-frame-pointer',
|
'-fomit-frame-pointer',
|
||||||
'-fno-ident',
|
'-fno-ident',
|
||||||
@ -136,7 +135,7 @@ def DetectWindowsTools(args):
|
|||||||
sys.stderr.write('Windows %LOCALAPPDATA% not available, Windows support disabled.\n')
|
sys.stderr.write('Windows %LOCALAPPDATA% not available, Windows support disabled.\n')
|
||||||
return
|
return
|
||||||
LOCALAPPDATA = LOCALAPPDATAR.replace('C:/', '/mnt/c/')
|
LOCALAPPDATA = LOCALAPPDATAR.replace('C:/', '/mnt/c/')
|
||||||
ARDUINO_CLI = LOCALAPPDATA + '/Programs/arduino-ide/resources/app/lib/backend/resources/arduino-cli.exe'
|
ARDUINO_CLI = LSQ(LOCALAPPDATA + '/Programs/*rduino*/resources/app/lib/backend/resources/arduino-cli.exe')
|
||||||
WINTMP = LOCALAPPDATA + '/Temp'
|
WINTMP = LOCALAPPDATA + '/Temp'
|
||||||
WINTMPR = LOCALAPPDATAR + '/Temp'
|
WINTMPR = LOCALAPPDATAR + '/Temp'
|
||||||
PROGFILES = '/mnt/c/Program Files'
|
PROGFILES = '/mnt/c/Program Files'
|
||||||
|
|||||||
@ -35,7 +35,7 @@ static Adafruit_SSD1306 *oled_display = 0;
|
|||||||
YV(oled, OledNew, oled_display = new Adafruit_SSD1306(n2, n1, &Wire, n0); DROPn(3)) \
|
YV(oled, OledNew, oled_display = new Adafruit_SSD1306(n2, n1, &Wire, n0); DROPn(3)) \
|
||||||
YV(oled, OledDelete, delete oled_display) \
|
YV(oled, OledDelete, delete oled_display) \
|
||||||
YV(oled, OledBegin, n0 = oled_display->begin(n1, n0); NIP) \
|
YV(oled, OledBegin, n0 = oled_display->begin(n1, n0); NIP) \
|
||||||
YV(oled, OledHOME, oled_display->setCursor(0,0); DROP) \
|
YV(oled, OledHOME, oled_display->setCursor(0, 0)) \
|
||||||
YV(oled, OledCLS, oled_display->clearDisplay()) \
|
YV(oled, OledCLS, oled_display->clearDisplay()) \
|
||||||
YV(oled, OledTextc, oled_display->setTextColor(n0); DROP) \
|
YV(oled, OledTextc, oled_display->setTextColor(n0); DROP) \
|
||||||
YV(oled, OledPrintln, oled_display->println(c0); DROP) \
|
YV(oled, OledPrintln, oled_display->println(c0); DROP) \
|
||||||
@ -46,13 +46,13 @@ static Adafruit_SSD1306 *oled_display = 0;
|
|||||||
YV(oled, OledInvert, oled_display->invertDisplay(n0); DROP) \
|
YV(oled, OledInvert, oled_display->invertDisplay(n0); DROP) \
|
||||||
YV(oled, OledTextsize, oled_display->setTextSize(n0); DROP) \
|
YV(oled, OledTextsize, oled_display->setTextSize(n0); DROP) \
|
||||||
YV(oled, OledSetCursor, oled_display->setCursor(n1, n0); DROPn(2)) \
|
YV(oled, OledSetCursor, oled_display->setCursor(n1, n0); DROPn(2)) \
|
||||||
YV(oled, OledPixel, oled_display->drawPixel(n2, n1, n0); DROPn(2)) \
|
YV(oled, OledPixel, oled_display->drawPixel(n2, n1, n0); DROPn(3)) \
|
||||||
YV(oled, OledDrawL, oled_display->drawLine(n4, n3, n2, n1, n0); DROPn(4)) \
|
YV(oled, OledDrawL, oled_display->drawLine(n4, n3, n2, n1, n0); DROPn(5)) \
|
||||||
YV(oled, OledCirc, oled_display->drawCircle(n3,n2, n1, n0); DROPn(3)) \
|
YV(oled, OledCirc, oled_display->drawCircle(n3, n2, n1, n0); DROPn(4)) \
|
||||||
YV(oled, OledCircF, oled_display->fillCircle(n3, n2, n1, n0); DROPn(3)) \
|
YV(oled, OledCircF, oled_display->fillCircle(n3, n2, n1, n0); DROPn(4)) \
|
||||||
YV(oled, OledRect, oled_display->drawRect(n4, n3, n2, n1, n0); DROPn(4)) \
|
YV(oled, OledRect, oled_display->drawRect(n4, n3, n2, n1, n0); DROPn(5)) \
|
||||||
YV(oled, OledRectF, oled_display->fillRect(n4, n3, n2, n1, n0); DROPn(3)) \
|
YV(oled, OledRectF, oled_display->fillRect(n4, n3, n2, n1, n0); DROPn(5)) \
|
||||||
YV(oled, OledRectR, oled_display->drawRoundRect(n5, n4, n3, n2, n1, n0); DROPn(5)) \
|
YV(oled, OledRectR, oled_display->drawRoundRect(n5, n4, n3, n2, n1, n0); DROPn(6)) \
|
||||||
YV(oled, OledRectRF, oled_display->fillRoundRect(n5, n4, n3, n2, n1, n0 ); DROPn(5))
|
YV(oled, OledRectRF, oled_display->fillRoundRect(n5, n4, n3, n2, n1, n0); DROPn(6))
|
||||||
|
|
||||||
#include "gen/esp32_oled.h"
|
#include "gen/esp32_oled.h"
|
||||||
|
|||||||
@ -65,7 +65,7 @@ int main(int argc, char *argv[]) {
|
|||||||
#undef Z
|
#undef Z
|
||||||
} else if (argc == 2 && strcmp(argv[1], "dict") == 0) {
|
} else if (argc == 2 && strcmp(argv[1], "dict") == 0) {
|
||||||
#define V(name) \
|
#define V(name) \
|
||||||
printf(" Create(\"" #name "-builtins\", %d);\n", BUILTIN_FORK, OP_DOCREATE); \
|
printf(" Create(\"" #name "-builtins\", %d);\n", BUILTIN_FORK); \
|
||||||
printf(" COMMA(%d);\n", VOC_ ## name);
|
printf(" COMMA(%d);\n", VOC_ ## name);
|
||||||
VOCABULARY_LIST
|
VOCABULARY_LIST
|
||||||
#undef V
|
#undef V
|
||||||
@ -84,7 +84,7 @@ int main(int argc, char *argv[]) {
|
|||||||
#define G_SYS 256
|
#define G_SYS 256
|
||||||
printf(" const g_sys = %d;\n", G_SYS);
|
printf(" const g_sys = %d;\n", G_SYS);
|
||||||
#define EMITSYS(name) \
|
#define EMITSYS(name) \
|
||||||
printf(" const g_sys_%s = %d;\n", #name, 256 + 4 * (((cell_t *) &g_sys->name) - (cell_t*) g_sys));
|
printf(" const g_sys_%s = %d;\n", #name, 256 + 4 * (int) (((cell_t *) &g_sys->name) - (cell_t*) g_sys));
|
||||||
EMITSYS(heap);
|
EMITSYS(heap);
|
||||||
EMITSYS(current);
|
EMITSYS(current);
|
||||||
EMITSYS(context);
|
EMITSYS(context);
|
||||||
|
|||||||
Reference in New Issue
Block a user