-
I realised I had an old-ish esptool so I updated, no change.
I tried qio and that resulted in it rebooting constantly, eg
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:QIO, clock div:3 load:0x3fff0018,len:4 load:0xd532060c,len:642933257 1162 mmu set 00010000, pos 00010000 1162 mmu set 00020000, pos 00020000 1162 mmu set 00030000, pos 00030000 1162 mmu set 00040000, pos 00040000 1162 mmu set 00050000, pos 00050000 1162 mmu set 00060000, pos 00060000 1162 mmu set 00070000, pos 00070000 1162 mmu set 00080000, pos 00080000 1162 mmu set 00090000, pos 00090000 ets Jun 8 2016 00:22:57 rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:QIO, clock div:3 load:0x3fff0018,len:4 load:0xd532060c,len:642933257 1162 mmu set 00010000, pos 00010000 1162 mmu set 00020000, pos 00020000 1162 mmu set 00030000, pos 00030000 1162 mmu set 00040000, pos 00040000 1162 mmu set 00050000, pos 00050000 1162 mmu set 00060000, pos 00060000 1162 mmu set 00070000, pos 00070000 1162 mmu set 00080000, pos 00080000 ~1162 mmu set 00090000, pos 00090000 ets Jun 8 2016 00:22:57
I also tried lowering the SPI clock to 26MHz and doing and erase & reprogram but no dice.
-
OK I used dio, like so..
/Users/oconnd1/Documents/Arduino/hardware/espressif/esp32/tools/esptool.py --chip esp32 \ --port /dev/cu.usbserial-DN02MPA4 \ --baud 921600 \ --after hard_reset write_flash \ -z \ --flash_mode dio \ --flash_freq 40m \ --flash_size detect \ 0x1000 bootloader.bin \ 0x8000 partitions_espruino.bin \ 0x10000 espruino_1v99_esp32.bin
Although I flashed MicroPython with..
/Users/oconnd1/Documents/Arduino/hardware/espressif/esp32/tools/esptool.py --chip esp32 \ --port /dev/cu.usbserial-DN02MPA4 \ --baud 921600 \ --after hard_reset write_flash \ -z \ --flash_mode dio \ --flash_freq 40m \ --flash_size detect \ 0x1000 ~/Downloads/esp32-20180808-v1.9.4-443-gc1c798fbc.bin
and that worked.
I'll try qio tomorrow for Espruino tomorrow and see how I go, thanks.
-
Hi,
I flashed a SparkFun ESP32 Thing with Espruino (specifically espruino_1v99_esp32.bin) however I just get junk out of it.If I reset I see the bootloader (I assume) print some stuff then I get junk eg..
[Maelstrom 16:47] ~ >cu -l /dev/cu.usbserial-DN02MPA4 -s 115200 Connected. ets Jun 8 2016 00:22:57 rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) ets Jun 8 2016 00:22:57 rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:2364 load:0x40078000,len:0 load:0x40078000,len:10880 entry 0x40078c4c ���1Il���
I tried a few different baud rates (9600, 19200, 38400, 57600, 115200, 230400, 921600) and none of them produced anything sensible except for the boot loader at 115200.
Any help appreciated, thanks.
BTW I flashed this board with MicroPython and it worked so I think the board is OK.
-
OK, I was wrong, if I power it off for long enough I get..
[auxxoconnd1m1 10:40] ~/projects/Espruino >python scripts/stm32loader.py -p /dev/cu.usbserial -Vevw ./espruino_1v70_hystm32_24_ve.bin Open port /dev/cu.usbserial, baud 115200 Reading data from ./espruino_1v70_hystm32_24_ve.bin *** Get command Bootloader version: 0x22 Available commands: ['0x0', '0x1', '0x2', '0x11', '0x21', '0x31', '0x43', '0x63', '0x73', '0x82', '0x92'] Bootloader version 0x22 *** GetID command Chip id 0x414, STM32F1, performance, high-density Traceback (most recent call last): File "scripts/stm32loader.py", line 579, in <module> cmd.cmdEraseMemory() File "scripts/stm32loader.py", line 242, in cmdEraseMemory if self.cmdGeneric(0x43): File "scripts/stm32loader.py", line 137, in cmdGeneric return self._wait_for_ack(hex(cmd)) File "scripts/stm32loader.py", line 98, in _wait_for_ack raise CmdException("Chip replied with a NACK during %s" % info) __main__.CmdException: Chip replied with a NACK during 0x43
-
Also, I just noticed that it says NACK during 0x2 but when I first ran it (without verbose) I got
[auxxoconnd1m1 10:35] ~/projects/Espruino >python scripts/stm32loader.py -p /dev/cu.usbserial -evw ./espruino_1v70_hystm32_24_ve.bin Reading data from ./espruino_1v70_hystm32_24_ve.bin Bootloader version 0x22 Chip id 0x414, STM32F1, performance, high-density Traceback (most recent call last): File "scripts/stm32loader.py", line 579, in <module> cmd.cmdEraseMemory() File "scripts/stm32loader.py", line 242, in cmdEraseMemory if self.cmdGeneric(0x43): File "scripts/stm32loader.py", line 137, in cmdGeneric return self._wait_for_ack(hex(cmd)) File "scripts/stm32loader.py", line 98, in _wait_for_ack raise CmdException("Chip replied with a NACK during %s" % info) __main__.CmdException: Chip replied with a NACK during 0x43
I can't reproduce it though.
-
Yes, I followed those instructions but I get..
[auxxoconnd1m1 10:36] ~/projects/Espruino >python scripts/stm32loader.py -p /dev/cu.usbserial -Vevw ./espruino_1v70_hystm32_24_ve.bin Open port /dev/cu.usbserial, baud 115200 Reading data from ./espruino_1v70_hystm32_24_ve.bin *** Get command Bootloader version: 0x22 Available commands: ['0x0', '0x1', '0x2', '0x11', '0x21', '0x31', '0x43', '0x63', '0x73', '0x82', '0x92'] Bootloader version 0x22 Traceback (most recent call last): File "scripts/stm32loader.py", line 561, in <module> chip_id = cmd.cmdGetID() File "scripts/stm32loader.py", line 164, in cmdGetID if self.cmdGeneric(0x02): File "scripts/stm32loader.py", line 137, in cmdGeneric return self._wait_for_ack(hex(cmd)) File "scripts/stm32loader.py", line 98, in _wait_for_ack raise CmdException("Chip replied with a NACK during %s" % info) __main__.CmdException: Chip replied with a NACK during 0x2
I'll take a look at the touchscreen module, thanks :)
-
-
Hi,
I would like to request emacs key bindings be added (to the firmware I guess) if possible.. My hands are pretty hard wired for ctrl-a, ctrl-d, ctrl-e and ctrl-w these days so remembering to hit home, end, del etc instead hurts :)I had a go at implementing it, but I can't do a build myself (the link for the Hy Mini 2.4 target says it can't find ctr0.o).
Here's my prototype diff..
diff --git a/src/jsinteractive.c b/src/jsinteractive.c index b4de355..0d5a465 100644 --- a/src/jsinteractive.c +++ b/src/jsinteractive.c @@ -912,6 +912,12 @@ void jsiHandleChar(char ch) { // jsiConsolePrintf("[%d:%d]\n", inputState, ch); // // special stuff + // 1 - Ctrl-a - beginning of line + // 4 - Ctrl-d - backwards delete + // 5 - Ctrl-e - end of line + // 21 - Ctrl-u - delete line + // 23 - Ctrl-w - delete word (currently just does the same as Ctrl-u) + // // 27 then 91 then 68 - left // 27 then 91 then 67 - right // 27 then 91 then 65 - up @@ -929,6 +935,14 @@ void jsiHandleChar(char ch) { if (ch == 0) { inputState = IS_NONE; // ignore 0 - it's scary + } else if (ch == 1) { // Ctrl-a + jsiHandleHome(); + } else if (ch == 4) { // Ctrl-d + jsiHandleDelete(false/*not backspace*/); + } else if (ch == 5) { // Ctrl-e + jsiHandleEnd(); + } else if (ch == 21 || ch == 23) { // Ctrl-u or Ctrl-w + jsiClearInputLine(); } else if (ch == 27) { inputState = IS_HAD_27; } else if (inputState==IS_HAD_27) {
Thanks.
-
Hi,
I ordered a Espruino but while I wait I thought I'd try and get it working on a Hy Mini 2.4" LCD board I got from ebay. I have some WS2812 LEDs arranged in a panel so I am trying Project 2.I couldn't get the serial loader to work - it went into the STM boot ROM but I couldn't get it to unprotect so I used my Black Magic Probe like so..
arm-none-eabi-objcopy --output-target=elf32-bigarm --input-target=binary --change-addresses=0x08000000 espruino_1v69_hystm32_24_ve.bin espruino_1v69_hystm32_24_ve.elf arm-non-eabi-gdb espruino_1v69_hystm32_24_ve.elf target extended-remote /dev/cu.usbmodem7FC58901 load run
I had to apply the following diff to get the demo code working..
--- touchdemo.js.orig 2014-08-19 13:48:25.000000000 +0930 +++ touchdemo.js 2014-08-19 13:42:14.000000000 +0930 @@ -40,10 +40,11 @@ // Touchscreen handler function touchFunc() { if (!digitalRead(B6)) { // touch down - var d = SPI1.send([0x90,0,0xD0,0],A4); + var d = SPI1.send([0x90,0,0xD0,0, 0],B7); var pos = {x:(d[1]*256+d[2])*LCD.getWidth()/0x8000, y:(d[3]*256+d[4])*LCD.getHeight()/0x8000}; - touchCallback(pos.x, pos.y); + touchCallback(pos.x, LCD.getHeight() - pos.y); + console.log(pos.x, pos.y, d, LCD.getWidth(), LCD.getHeight()); lastPos = pos; } else lastPos = null; }
To break it down..
1- Send 5 bytes so we read 5 bytes
2- Use B7 for chip select
3- Invert y positionI suspect 2 & 3 are only useful for this board, but number 1 seems like a bug in the original code - without it you only get 4 bytes so the Y coordinates are always NaN.
I haven't connected my LEDs yet, but soon :)
PS thanks for the Espruino, I am having good fun with it so far :)
Update: LEDs work, however I needed to change the baud rate in the example to 3200000 (like in the WS2811 example)
I tried 1v97 but no luck unfortunately.