Giter Club home page Giter Club logo

Comments (5)

Jos-Ven avatar Jos-Ven commented on May 27, 2024

Hi,

The last time I used flash.py I used it in combination with picocom:
For picocom I use:
$ picocom /dev/ttyUSB0 -b 115200 --omap crlf --echo --imap delbs

In the past I also got some problems.
That was solved after erasing the flash memory see:
#45
( try adding --main blinker.forth )
Not sure if it helps.

Jos

from punyforth.

MayamaTakeshi avatar MayamaTakeshi commented on May 27, 2024

Thanks.
The erase_flash command helped.

I experimented changing the flashmode: both qio and qout fail.
Only dio terminates without errors but without Serial communication.
But with dout, although there are errors:

takeshi@takeshi-brastel:bin$ python esptool.py erase_flash
Connecting...
Erasing flash (this may take a while)...
takeshi@takeshi-brastel:bin$ python flash.py /dev/ttyUSB0 --flashmode dout
Selected modules: ALL
Flashing binaries..
Flashing 0x0: rboot.bin, 0x1000: blank_config.bin, 0x2000: punyforth.bin
Connecting...
Erasing flash...
Took 0.15s to erase flash block
Writing at 0x00000000... (25 %)
Writing at 0x00000400... (50 %)
Writing at 0x00000800... (75 %)
Writing at 0x00000c00... (100 %)
Wrote 4096 bytes at 0x00000000 in 0.4 seconds (82.3 kbit/s)...
Erasing flash...
Took 0.16s to erase flash block
Writing at 0x00001000... (50 %)
Writing at 0x00001400... (100 %)
Wrote 2048 bytes at 0x00001000 in 0.2 seconds (83.2 kbit/s)...
Erasing flash...
Took 2.33s to erase flash block
Writing at 0x00002000... (0 %)
Writing at 0x00002400... (0 %)
Writing at 0x00002800... (0 %)
Writing at 0x00002c00... (1 %)
Writing at 0x00003000... (1 %)
Writing at 0x00003400... (1 %)
Writing at 0x00003800... (2 %)
Writing at 0x00003c00... (2 %)
Writing at 0x00004000... (2 %)
Writing at 0x00004400... (3 %)
Writing at 0x00004800... (3 %)
Writing at 0x00004c00... (3 %)
Writing at 0x00005000... (4 %)
Writing at 0x00005400... (4 %)
Writing at 0x00005800... (4 %)
Writing at 0x00005c00... (5 %)
Writing at 0x00006000... (5 %)
Writing at 0x00006400... (5 %)
Writing at 0x00006800... (6 %)
Writing at 0x00006c00... (6 %)
Writing at 0x00007000... (6 %)
Writing at 0x00007400... (7 %)
Writing at 0x00007800... (7 %)
Writing at 0x00007c00... (7 %)
Writing at 0x00008000... (8 %)
Writing at 0x00008400... (8 %)
Writing at 0x00008800... (8 %)
Writing at 0x00008c00... (9 %)
Writing at 0x00009000... (9 %)
Writing at 0x00009400... (9 %)
Writing at 0x00009800... (10 %)
Writing at 0x00009c00... (10 %)
Writing at 0x0000a000... (10 %)
Writing at 0x0000a400... (11 %)
Writing at 0x0000a800... (11 %)
Writing at 0x0000ac00... (11 %)
Writing at 0x0000b000... (12 %)
Writing at 0x0000b400... (12 %)
Writing at 0x0000b800... (12 %)
Writing at 0x0000bc00... (13 %)
Writing at 0x0000c000... (13 %)
Writing at 0x0000c400... (13 %)
Writing at 0x0000c800... (14 %)
Writing at 0x0000cc00... (14 %)
Writing at 0x0000d000... (14 %)
Writing at 0x0000d400... (15 %)
Writing at 0x0000d800... (15 %)
Writing at 0x0000dc00... (15 %)
Writing at 0x0000e000... (16 %)
Writing at 0x0000e400... (16 %)
Writing at 0x0000e800... (16 %)
Writing at 0x0000ec00... (17 %)
Writing at 0x0000f000... (17 %)
Writing at 0x0000f400... (17 %)
Writing at 0x0000f800... (18 %)
Writing at 0x0000fc00... (18 %)
Writing at 0x00010000... (18 %)
Writing at 0x00010400... (19 %)
Writing at 0x00010800... (19 %)
Writing at 0x00010c00... (19 %)
Writing at 0x00011000... (20 %)
Writing at 0x00011400... (20 %)
Writing at 0x00011800... (20 %)
Writing at 0x00011c00... (21 %)
Writing at 0x00012000... (21 %)
Writing at 0x00012400... (21 %)
Writing at 0x00012800... (22 %)
Writing at 0x00012c00... (22 %)
Writing at 0x00013000... (22 %)
Writing at 0x00013400... (23 %)
Writing at 0x00013800... (23 %)
Writing at 0x00013c00... (23 %)
Writing at 0x00014000... (24 %)
Writing at 0x00014400... (24 %)
Writing at 0x00014800... (24 %)
Writing at 0x00014c00... (25 %)
Writing at 0x00015000... (25 %)
Writing at 0x00015400... (25 %)
Writing at 0x00015800... (25 %)
Writing at 0x00015c00... (26 %)
Writing at 0x00016000... (26 %)
Writing at 0x00016400... (26 %)
Writing at 0x00016800... (27 %)
Writing at 0x00016c00... (27 %)
Writing at 0x00017000... (27 %)
Writing at 0x00017400... (28 %)
Writing at 0x00017800... (28 %)
Writing at 0x00017c00... (28 %)
Writing at 0x00018000... (29 %)
Writing at 0x00018400... (29 %)
Writing at 0x00018800... (29 %)
Writing at 0x00018c00... (30 %)
Writing at 0x00019000... (30 %)
Writing at 0x00019400... (30 %)
Writing at 0x00019800... (31 %)
Writing at 0x00019c00... (31 %)
Writing at 0x0001a000... (31 %)
Writing at 0x0001a400... (32 %)
Writing at 0x0001a800... (32 %)
Writing at 0x0001ac00... (32 %)
Writing at 0x0001b000... (33 %)
Writing at 0x0001b400... (33 %)
Writing at 0x0001b800... (33 %)
Writing at 0x0001bc00... (34 %)
Writing at 0x0001c000... (34 %)
Writing at 0x0001c400... (34 %)
Writing at 0x0001c800... (35 %)
Writing at 0x0001cc00... (35 %)
Writing at 0x0001d000... (35 %)
Writing at 0x0001d400... (36 %)
Writing at 0x0001d800... (36 %)
Writing at 0x0001dc00... (36 %)
Writing at 0x0001e000... (37 %)
Writing at 0x0001e400... (37 %)
Writing at 0x0001e800... (37 %)
Writing at 0x0001ec00... (38 %)
Writing at 0x0001f000... (38 %)
Writing at 0x0001f400... (38 %)
Writing at 0x0001f800... (39 %)
Writing at 0x0001fc00... (39 %)
Writing at 0x00020000... (39 %)
Writing at 0x00020400... (40 %)
Writing at 0x00020800... (40 %)
Writing at 0x00020c00... (40 %)
Writing at 0x00021000... (41 %)
Writing at 0x00021400... (41 %)
Writing at 0x00021800... (41 %)
Writing at 0x00021c00... (42 %)
Writing at 0x00022000... (42 %)
Writing at 0x00022400... (42 %)
Writing at 0x00022800... (43 %)
Writing at 0x00022c00... (43 %)
Writing at 0x00023000... (43 %)
Writing at 0x00023400... (44 %)
Writing at 0x00023800... (44 %)
Writing at 0x00023c00... (44 %)
Writing at 0x00024000... (45 %)
Writing at 0x00024400... (45 %)
Writing at 0x00024800... (45 %)
Writing at 0x00024c00... (46 %)
Writing at 0x00025000... (46 %)
Writing at 0x00025400... (46 %)
Writing at 0x00025800... (47 %)
Writing at 0x00025c00... (47 %)
Writing at 0x00026000... (47 %)
Writing at 0x00026400... (48 %)
Writing at 0x00026800... (48 %)
Writing at 0x00026c00... (48 %)
Writing at 0x00027000... (49 %)
Writing at 0x00027400... (49 %)
Writing at 0x00027800... (49 %)
Writing at 0x00027c00... (50 %)
Writing at 0x00028000... (50 %)
Writing at 0x00028400... (50 %)
Writing at 0x00028800... (50 %)
Writing at 0x00028c00... (51 %)
Writing at 0x00029000... (51 %)
Writing at 0x00029400... (51 %)
Writing at 0x00029800... (52 %)
Writing at 0x00029c00... (52 %)
Writing at 0x0002a000... (52 %)
Writing at 0x0002a400... (53 %)
Writing at 0x0002a800... (53 %)
Writing at 0x0002ac00... (53 %)
Writing at 0x0002b000... (54 %)
Writing at 0x0002b400... (54 %)
Writing at 0x0002b800... (54 %)
Writing at 0x0002bc00... (55 %)
Writing at 0x0002c000... (55 %)
Writing at 0x0002c400... (55 %)
Writing at 0x0002c800... (56 %)
Writing at 0x0002cc00... (56 %)
Writing at 0x0002d000... (56 %)
Writing at 0x0002d400... (57 %)
Writing at 0x0002d800... (57 %)
Writing at 0x0002dc00... (57 %)
Writing at 0x0002e000... (58 %)
Writing at 0x0002e400... (58 %)
Writing at 0x0002e800... (58 %)
Writing at 0x0002ec00... (59 %)
Writing at 0x0002f000... (59 %)
Writing at 0x0002f400... (59 %)
Writing at 0x0002f800... (60 %)
Writing at 0x0002fc00... (60 %)
Writing at 0x00030000... (60 %)
Writing at 0x00030400... (61 %)
Writing at 0x00030800... (61 %)
Writing at 0x00030c00... (61 %)
Writing at 0x00031000... (62 %)
Writing at 0x00031400... (62 %)
Writing at 0x00031800... (62 %)
Writing at 0x00031c00... (63 %)
Writing at 0x00032000... (63 %)
Writing at 0x00032400... (63 %)
Writing at 0x00032800... (64 %)
Writing at 0x00032c00... (64 %)
Writing at 0x00033000... (64 %)
Writing at 0x00033400... (65 %)
Writing at 0x00033800... (65 %)
Writing at 0x00033c00... (65 %)
Writing at 0x00034000... (66 %)
Writing at 0x00034400... (66 %)
Writing at 0x00034800... (66 %)
Writing at 0x00034c00... (67 %)
Writing at 0x00035000... (67 %)
Writing at 0x00035400... (67 %)
Writing at 0x00035800... (68 %)
Writing at 0x00035c00... (68 %)
Writing at 0x00036000... (68 %)
Writing at 0x00036400... (69 %)
Writing at 0x00036800... (69 %)
Writing at 0x00036c00... (69 %)
Writing at 0x00037000... (70 %)
Writing at 0x00037400... (70 %)
Writing at 0x00037800... (70 %)
Writing at 0x00037c00... (71 %)
Writing at 0x00038000... (71 %)
Writing at 0x00038400... (71 %)
Writing at 0x00038800... (72 %)
Writing at 0x00038c00... (72 %)
Writing at 0x00039000... (72 %)
Writing at 0x00039400... (73 %)
Writing at 0x00039800... (73 %)
Writing at 0x00039c00... (73 %)
Writing at 0x0003a000... (74 %)
Writing at 0x0003a400... (74 %)
Writing at 0x0003a800... (74 %)
Writing at 0x0003ac00... (75 %)
Writing at 0x0003b000... (75 %)
Writing at 0x0003b400... (75 %)
Writing at 0x0003b800... (75 %)
Writing at 0x0003bc00... (76 %)
Writing at 0x0003c000... (76 %)
Writing at 0x0003c400... (76 %)
Writing at 0x0003c800... (77 %)
Writing at 0x0003cc00... (77 %)
Writing at 0x0003d000... (77 %)
Writing at 0x0003d400... (78 %)
Writing at 0x0003d800... (78 %)
Writing at 0x0003dc00... (78 %)
Writing at 0x0003e000... (79 %)
Writing at 0x0003e400... (79 %)
Writing at 0x0003e800... (79 %)
Writing at 0x0003ec00... (80 %)
Writing at 0x0003f000... (80 %)
Writing at 0x0003f400... (80 %)
Writing at 0x0003f800... (81 %)
Writing at 0x0003fc00... (81 %)
Writing at 0x00040000... (81 %)
Writing at 0x00040400... (82 %)
Writing at 0x00040800... (82 %)
Writing at 0x00040c00... (82 %)
Writing at 0x00041000... (83 %)
Writing at 0x00041400... (83 %)
Writing at 0x00041800... (83 %)
Writing at 0x00041c00... (84 %)
Writing at 0x00042000... (84 %)
Writing at 0x00042400... (84 %)
Writing at 0x00042800... (85 %)
Writing at 0x00042c00... (85 %)
Writing at 0x00043000... (85 %)
Writing at 0x00043400... (86 %)
Writing at 0x00043800... (86 %)
Writing at 0x00043c00... (86 %)
Writing at 0x00044000... (87 %)
Writing at 0x00044400... (87 %)
Writing at 0x00044800... (87 %)
Writing at 0x00044c00... (88 %)
Writing at 0x00045000... (88 %)
Writing at 0x00045400... (88 %)
Writing at 0x00045800... (89 %)
Writing at 0x00045c00... (89 %)
Writing at 0x00046000... (89 %)
Writing at 0x00046400... (90 %)
Writing at 0x00046800... (90 %)
Writing at 0x00046c00... (90 %)
Writing at 0x00047000... (91 %)
Writing at 0x00047400... (91 %)
Writing at 0x00047800... (91 %)
Writing at 0x00047c00... (92 %)
Writing at 0x00048000... (92 %)
Writing at 0x00048400... (92 %)
Writing at 0x00048800... (93 %)
Writing at 0x00048c00... (93 %)
Writing at 0x00049000... (93 %)
Writing at 0x00049400... (94 %)
Writing at 0x00049800... (94 %)
Writing at 0x00049c00... (94 %)
Writing at 0x0004a000... (95 %)
Writing at 0x0004a400... (95 %)
Writing at 0x0004a800... (95 %)
Writing at 0x0004ac00... (96 %)
Writing at 0x0004b000... (96 %)
Writing at 0x0004b400... (96 %)
Writing at 0x0004b800... (97 %)
Writing at 0x0004bc00... (97 %)
Writing at 0x0004c000... (97 %)
Writing at 0x0004c400... (98 %)
Writing at 0x0004c800... (98 %)
Writing at 0x0004cc00... (98 %)
Writing at 0x0004d000... (99 %)
Writing at 0x0004d400... (99 %)
Writing at 0x0004d800... (99 %)
Writing at 0x0004dc00... (100 %)
Wrote 311296 bytes at 0x00002000 in 30.5 seconds (81.6 kbit/s)...

Leaving...
Flashing LAYOUT.tmp
Connecting...
Erasing flash...
Took 0.16s to erase flash block
Writing at 0x00051000... (100 %)
Wrote 1024 bytes at 0x00051000 in 0.1 seconds (84.6 kbit/s)...

Leaving...
Flashing 0x52000: APP.tmp, 0x53000: CORE.tmp, 0x56000: DHT22.tmp, 0x57000: FLASH.tmp, 0x58000: FONT57.tmp, 0x59000: GPIO.tmp, 0x5a000: MAILBOX.tmp, 0x5b000: NETCON.tmp, 0x5d000: NTP.tmp, 0x5e000: PING.tmp, 0x5f000: SONOFF.tmp, 0x60000: SSD1306I2C.tmp, 0x62000: SSD1306SPI.tmp, 0x64000: TASKS.tmp, 0x65000: TCPREPL.tmp, 0x66000: TURNKEY.tmp, 0x67000: WIFI.tmp, 0x68000: EVENT.tmp, 0x69000: RINGBUF.tmp, 0x6a000: DECOMP.tmp, 0x6b000: PUNIT.tmp
Connecting...
Erasing flash...
Took 0.16s to erase flash block
Writing at 0x00052000... (100 %)
Wrote 1024 bytes at 0x00052000 in 0.1 seconds (84.9 kbit/s)...
Erasing flash...
Took 0.31s to erase flash block
Writing at 0x00053000... (9 %)
Writing at 0x00053400... (18 %)
Writing at 0x00053800... (27 %)
Writing at 0x00053c00... (36 %)
Writing at 0x00054000... (45 %)
Writing at 0x00054400... (54 %)
Writing at 0x00054800... (63 %)
Writing at 0x00054c00... (72 %)
Writing at 0x00055000... (81 %)
Writing at 0x00055400... (90 %)
Writing at 0x00055800... (100 %)
Wrote 11264 bytes at 0x00053000 in 1.1 seconds (84.0 kbit/s)...
Erasing flash...
Took 0.16s to erase flash block
Writing at 0x00056000... (50 %)
Writing at 0x00056400... (100 %)
Wrote 2048 bytes at 0x00056000 in 0.2 seconds (84.1 kbit/s)...
Erasing flash...
Took 0.15s to erase flash block
Writing at 0x00057000... (50 %)
Writing at 0x00057400... (100 %)
Wrote 2048 bytes at 0x00057000 in 0.2 seconds (84.2 kbit/s)...
Erasing flash...
Took 0.16s to erase flash block
Writing at 0x00058000... (25 %)
Writing at 0x00058400... (50 %)
Writing at 0x00058800... (75 %)
Writing at 0x00058c00... (100 %)
Wrote 4096 bytes at 0x00058000 in 0.4 seconds (84.0 kbit/s)...
Erasing flash...
Took 0.16s to erase flash block
Writing at 0x00059000... (100 %)
Wrote 1024 bytes at 0x00059000 in 0.1 seconds (83.8 kbit/s)...
Erasing flash...
Took 0.16s to erase flash block
Writing at 0x0005a000... (100 %)
Wrote 1024 bytes at 0x0005a000 in 0.1 seconds (84.6 kbit/s)...
Erasing flash...
Took 0.15s to erase flash block
Writing at 0x0005b000... (20 %)
Writing at 0x0005b400... (40 %)
Writing at 0x0005b800... (60 %)
Writing at 0x0005bc00... (80 %)
Writing at 0x0005c000... (100 %)
Wrote 5120 bytes at 0x0005b000 in 0.5 seconds (84.1 kbit/s)...
Erasing flash...
Took 0.15s to erase flash block
Writing at 0x0005d000... (50 %)
Writing at 0x0005d400... (100 %)
Wrote 2048 bytes at 0x0005d000 in 0.2 seconds (84.4 kbit/s)...
Erasing flash...
Took 0.16s to erase flash block
Writing at 0x0005e000... (50 %)

A fatal error occurred: Invalid head of packet
takeshi@takeshi-brastel:bin$ 

at least I get Serial access and even a partially functioning REPL:

takeshi@takeshi-brastel:bin$ picocom /dev/ttyUSB0 -b 115200 --omap crlf --echo --imap delbs
picocom v2.2

port is        : /dev/ttyUSB0
flowcontrol    : none
baudrate is    : 115200
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : yes
noinit is      : no
noreset is     : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        : delbs,
omap is        : crlf,
emap is        : crcrlf,delbs,

Type [C-a] [C-h] to see available commands

Terminal ready
.....
(stack) 
Undefined word: ņH^NJ�^H&)�^HH^H)N��
(stack) 3

Undefined word: )��3
(stack) 3

Undefined word: 3
(stack) 3

Undefined word: 3
(stack) 4
(stack 4) 3
(stack 4 3) +
(stack 7) .
7(stack) .
1919899402
Exeption: EUNDERFLOW rdepth: 7
  at throw (1073648840)
  at stack-show (1073652908)
  at PUNIT (1075960116)
  at PUNIT (1075960204)
  at PUNIT (1075958840)
Restarting ESP ..
bcn 0
del if1
usl
sul 0 0

 ets Jan  8 2013,rst cause:1, boot mode:(3,6)

load 0x40100000, len 2292, room 16 
tail 4
chksum 0x57
load 0x3ffe8000, len 772, room 4 
tail 0
chksum 0x0b
csum 0x0b

rBoot v1.4.0 - [email protected]
Flash Size:   32 Mbit
Flash Mode:   DOUT
Flash Speed:  40 MHz
rBoot Option: Big flash
rBoot Option: RTC data

Booting rom 0.
pp_task_hdl : 3fff5bd0, prio:14, stack:512
pm_task_hdl : 3fff5630, prio:1, stack:176
frc2_timer_task_hdl:0x3fffa1b0, prio:12, stack:200

ESP-Open-SDK ver: 0.0.1 compiled @ Jan 12 2018 03:24:49
phy ver: 273, pp ver: 8.3


Loading Punyforth
mode : softAP(ce:50:e3:7c:30:6e)
add if1
bcn 100

But the flash was not complete and a stack underflow (EUNDERFLOW) causes a restart (and flashing again with '--binary false' following #45 didn't change anything).

from punyforth.

MayamaTakeshi avatar MayamaTakeshi commented on May 27, 2024

I experimented replacing esptool.py with this one
https://github.com/cefn/esptool/blob/master/esptool.py
mentioned in #40

It didn't work because after uploading the binaries it tries to hard reset the board before doing further steps.
But my ESP-01 requires soft_reset instead.

But since the flash.py doesn't expose the option "--after hard_reset|soft_reset|no_reset", I just modified hard_reset in esptool.py to do a soft_reset instead.
And with this, I could flash the board without errors:

takeshi@takeshi-brastel:bin$ python flash.py /dev/ttyUSB0 --flashmode dout
Selected modules: ALL
Flashing binaries..
Flashing 0x0: rboot.bin, 0x1000: blank_config.bin, 0x2000: punyforth.bin
WARNING: Flash size arguments in megabits like '32m' are deprecated.
Please use the equivalent size '4MB'.
Megabit arguments may be removed in a future release.
esptool.py v2.4.0-dev
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash params set to 0x0340
Compressed 3104 bytes to 2169...
Wrote 3104 bytes (2169 compressed) at 0x00000000 in 0.2 seconds (effective 126.3 kbit/s)...
Hash of data verified.
Compressed 2048 bytes to 23...
Wrote 2048 bytes (23 compressed) at 0x00001000 in 0.0 seconds (effective 2172.9 kbit/s)...
Hash of data verified.
Compressed 310784 bytes to 203813...
Wrote 310784 bytes (203813 compressed) at 0x00002000 in 18.0 seconds (effective 138.4 kbit/s)...
Hash of data verified.

Leaving...
Soft resetting...
Flashing LAYOUT.tmp
esptool.py v2.4.0-dev
Connecting.....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Warning: Could not auto-detect Flash size (FlashID=0x75fd77, SizeID=0x75), defaulting to 4MB
Compressed 392 bytes to 184...
Wrote 392 bytes (184 compressed) at 0x00051000 in 0.0 seconds (effective 141.0 kbit/s)...
Hash of data verified.

Leaving...
Soft resetting...
Flashing 0x52000: APP.tmp, 0x53000: CORE.tmp, 0x56000: DHT22.tmp, 0x57000: FLASH.tmp, 0x58000: FONT57.tmp, 0x59000: GPIO.tmp, 0x5a000: MAILBOX.tmp, 0x5b000: NETCON.tmp, 0x5d000: NTP.tmp, 0x5e000: PING.tmp, 0x5f000: SONOFF.tmp, 0x60000: SSD1306I2C.tmp, 0x62000: SSD1306SPI.tmp, 0x64000: TASKS.tmp, 0x65000: TCPREPL.tmp, 0x66000: TURNKEY.tmp, 0x67000: WIFI.tmp, 0x68000: EVENT.tmp, 0x69000: RINGBUF.tmp, 0x6a000: DECOMP.tmp, 0x6b000: PUNIT.tmp
WARNING: Flash size arguments in megabits like '32m' are deprecated.
Please use the equivalent size '4MB'.
Megabit arguments may be removed in a future release.
esptool.py v2.4.0-dev
Connecting.....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Compressed 40 bytes to 39...
Wrote 40 bytes (39 compressed) at 0x00052000 in 0.0 seconds (effective 35.1 kbit/s)...
Hash of data verified.
Compressed 11044 bytes to 3502...
Wrote 11044 bytes (3502 compressed) at 0x00053000 in 0.3 seconds (effective 281.9 kbit/s)...
Hash of data verified.
Compressed 1768 bytes to 722...
Wrote 1768 bytes (722 compressed) at 0x00056000 in 0.1 seconds (effective 205.1 kbit/s)...
Hash of data verified.
Compressed 1528 bytes to 714...
Wrote 1528 bytes (714 compressed) at 0x00057000 in 0.1 seconds (effective 178.1 kbit/s)...
Hash of data verified.
Compressed 3864 bytes to 1720...
Wrote 3864 bytes (1720 compressed) at 0x00058000 in 0.2 seconds (effective 197.3 kbit/s)...
Hash of data verified.
Compressed 800 bytes to 361...
Wrote 800 bytes (361 compressed) at 0x00059000 in 0.0 seconds (effective 171.9 kbit/s)...
Hash of data verified.
Compressed 340 bytes to 172...
Wrote 340 bytes (172 compressed) at 0x0005a000 in 0.0 seconds (effective 130.6 kbit/s)...
Hash of data verified.
Compressed 4252 bytes to 1329...
Wrote 4252 bytes (1329 compressed) at 0x0005b000 in 0.1 seconds (effective 276.8 kbit/s)...
Hash of data verified.
Compressed 1080 bytes to 542...
Wrote 1080 bytes (542 compressed) at 0x0005d000 in 0.1 seconds (effective 162.3 kbit/s)...
Hash of data verified.
Compressed 1096 bytes to 579...
Wrote 1096 bytes (579 compressed) at 0x0005e000 in 0.1 seconds (effective 155.5 kbit/s)...
Hash of data verified.
Compressed 616 bytes to 307...
Wrote 616 bytes (307 compressed) at 0x0005f000 in 0.0 seconds (effective 150.3 kbit/s)...
Hash of data verified.
Compressed 5224 bytes to 1861...
Wrote 5224 bytes (1861 compressed) at 0x00060000 in 0.2 seconds (effective 247.3 kbit/s)...
Hash of data verified.
Compressed 4972 bytes to 1709...
Wrote 4972 bytes (1709 compressed) at 0x00062000 in 0.2 seconds (effective 256.0 kbit/s)...
Hash of data verified.
Compressed 3260 bytes to 1083...
Wrote 3260 bytes (1083 compressed) at 0x00064000 in 0.1 seconds (effective 259.0 kbit/s)...
Hash of data verified.
Compressed 1760 bytes to 714...
Wrote 1760 bytes (714 compressed) at 0x00065000 in 0.1 seconds (effective 206.1 kbit/s)...
Hash of data verified.
Compressed 804 bytes to 416...
Wrote 804 bytes (416 compressed) at 0x00066000 in 0.0 seconds (effective 151.8 kbit/s)...
Hash of data verified.
Compressed 1444 bytes to 600...
Wrote 1444 bytes (600 compressed) at 0x00067000 in 0.1 seconds (effective 197.9 kbit/s)...
Hash of data verified.
Compressed 328 bytes to 193...
Wrote 328 bytes (193 compressed) at 0x00068000 in 0.0 seconds (effective 116.3 kbit/s)...
Hash of data verified.
Compressed 1392 bytes to 446...
Wrote 1392 bytes (446 compressed) at 0x00069000 in 0.0 seconds (effective 247.1 kbit/s)...
Hash of data verified.
Compressed 3312 bytes to 1257...
Wrote 3312 bytes (1257 compressed) at 0x0006a000 in 0.1 seconds (effective 228.3 kbit/s)...
Hash of data verified.
Compressed 1972 bytes to 750...
Wrote 1972 bytes (750 compressed) at 0x0006b000 in 0.1 seconds (effective 220.0 kbit/s)...
Hash of data verified.

Leaving...
Soft resetting...

However, I still get a restart of the board if I force a stack underflow:

takeshi@takeshi-brastel:bin$ picocom /dev/ttyUSB0 -b 115200 --omap crlf --echo --imap delbs
picocom v2.2

port is        : /dev/ttyUSB0
flowcontrol    : none
baudrate is    : 115200
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : yes
noinit is      : no
noreset is     : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        : delbs,
omap is        : crlf,
emap is        : crcrlf,delbs,

Type [C-a] [C-h] to see available commands

Terminal ready
.....
(stack) 4
(stack 4) 3
(stack 4 3) +
(stack 7) .
7(stack) .
1919899402
Exeption: EUNDERFLOW rdepth: 7
  at throw (1073648840)
  at stack-show (1073652908)
  at PUNIT (1075960116)
  at PUNIT (1075960204)
  at PUNIT (1075958840)
Restarting ESP ..
bcn 0
del if1
usl
sul 0 0

 ets Jan  8 2013,rst cause:1, boot mode:(3,6)

load 0x40100000, len 2292, room 16 
tail 4
chksum 0x57
load 0x3ffe8000, len 772, room 4 
tail 0
chksum 0x0b
csum 0x0b

rBoot v1.4.0 - [email protected]
Flash Size:   32 Mbit
Flash Mode:   DOUT
Flash Speed:  40 MHz
rBoot Option: Big flash
rBoot Option: RTC data

Booting rom 0.
pp_task_hdl : 3fff5bd0, prio:14, stack:512
pm_task_hdl : 3fff5630, prio:1, stack:176
frc2_timer_task_hdl:0x3fffa1b0, prio:12, stack:200

ESP-Open-SDK ver: 0.0.1 compiled @ Jan 12 2018 03:24:49
phy ver: 273, pp ver: 8.3


Loading Punyforth
mode : softAP(ce:50:e3:7c:30:6e)
add if1
bcn 100
.......
(stack)

I am assuming stack underflow should not restart the board since this is a REPL for experimentation.
Is this correct?
Or is indeed a restart expected to happen? (well maybe it should happen in case of an app running as it could be exploited).

from punyforth.

Jos-Ven avatar Jos-Ven commented on May 27, 2024

However, I still get a restart of the board if I force a stack underflow
That is normal under PunyForth.
PunyForth restarts as soon a there is a serious error.

see also:
#45
the comment of zeroflag on 18 Feb 2019

from punyforth.

MayamaTakeshi avatar MayamaTakeshi commented on May 27, 2024

Ah, so everything is fine.
Thanks.

from punyforth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.