-
Long day at this; running out of daylight . . .
Trying these suggestions:
https://stackoverflow.com/questions/38405260/difference-between-c99-and-c11
https://es.stackoverflow.com/questions/73761/for-loop-initial-declarations-are-only-allowed-in-c99-or-c11-mode/73764
https://stackoverflow.com/questions/40303668/how-do-i-fix-for-loop-initial-declaration-used-outside-c99-mode-gcc-error
https://stackoverflow.com/questions/15870567/how-to-compile-a-c-project-in-c99-mode -
'Hold your horses'
Post #7 level shifter and post #10 #11 provided a Sparkfun solution so likely @bart became aware several hours ago.
In agreement that extra caution announced here beforehand gets the point across!
-
-
Been at it another two hours even trying @fanoush export path statement which two weeks ago seemed to work. but still consistent:
libs/graphics/lcd_arraybuffer.c:222:9: error: 'for' loop initial declarations are only allowed in C99 or C11 mode for (int i=0;i<gfx->data.bpp;i+=8)
Seems identical to this post years ago: (but using Ubuntu directly)
No confirmed solution there however.
-
and a complete solution using a standard RS-232 cable:
SparkFun RS232 Shifter - SMD
https://www.sparkfun.com/products/449 -
Just did some digging, and it will be imperative to watch those voltages:
https://www.codrey.com/embedded-systems/rs232-serial-communication/
Voltage dividers and level shifters are very likely to be required. I'd even consider opto-isolation as a better alternative as a dual chip is well under $1 USD
-
'but I can't find any pin labelled /marked as UART/USART marker.'
the schematic might provide some assistance:
found below the tutorial image icons beneath heading Information
https://www.espruino.com/Pixl.js#informationhttps://github.com/espruino/EspruinoBoard/blob/master/Pixl.js/pdf/pixljs_sch.pdf
You actually mentioned the Tx/Rx reference D0 and D1 in post #4
'Ok, so I checked Pixl.js documentation. I didn't get anything'
I'll agree that the docs (diagrams for hardware SPI/I2C/USART) are more suited for the STM family, the earlier Espruinos, when the Nordic nRF micros came about, it did take me some time to grasp software SPI/I2C/USART as it can be used on any pin. I'd re-read over the USART link in post #2 and just stick with it. There are plenty of examples and tutorials.
Remember: should you use the hardware USART the Pixl will have to give up B.T. comm which shares that Serial port -
While it doesn't appear there is a RS-232 module built
and it would take some digging to see if the onboard hardware UART could be used without the RS-232 handshaking CTS/RST, (maybe with software timers/timeout) it certainly would be possible to write a simple software equivalent using any of the pins described. (note: you may [should] need a level shifter - don't remember RS-232 output voltages)
Certainly there must be a common ground, Tx==>Rx, Rx==>Tx and depending on software both RTS and CST to initiate the handshaking. So, three, four or five connections. Chose a pin for each and set the mode for each pin first.
If not well versed in RS-232 comm, creating one would be fun and a tremendous learning experience and made much easier using the post #3 logic analyzer described above. -
-
-
Sun 2021.10.24
Firmware build for ESPRUINOWIFI fails make: *** [libs/graphics/lcd_arraybuffer.o] Error 1
Two weeks ago I was able to build .elf and .hex files using the steps clarified by @Gordon
post #12 and #14 nRF52840DK build error: src/jslex.o make
I used this sequence:
make clean source scripts/provision.sh ESPRUINOWIFI make clean make make clean && BOARD=ESPRUINOWIFI RELEASE=1 make
Which ran fine:rgc@DESKTOP-R7T0VUC:/mnt/c/Users/robin/espruino$ make clean Cleaning targets rgc@DESKTOP-R7T0VUC:/mnt/c/Users/robin/espruino$ source scripts/provision.sh ESPRUINOWIFI Provision BOARDNAME = ESPRUINOWIFI Provision FAMILY = STM32F4 ===== NRF52 ===== ARM arm-none-eabi-gcc installed rgc@DESKTOP-R7T0VUC:/mnt/c/Users/robin/espruino$ make clean make make: Nothing to be done for 'make'. Cleaning targets rgc@DESKTOP-R7T0VUC:/mnt/c/Users/robin/espruino$ make clean && BOARD=ESPRUINOWIFI RELEASE=1 make Cleaning targets CC /mnt/c/Users/robin/espruino/targetlibs/stm32f4/lib/startup_stm32f401xx.o Generating platform configs Generating pin info Generating JS wrappers WRAPPERSOURCES = src/jswrap_array.c src/jswrap_arraybuffer.c src/jswrap_dataview.c src/jswrap_date.c src/jswrap_e . . . and on and on to completion
I have not used my PC other than for email and one Windows10 update behind the scenes did reboot my laptop this past Friday.
2021-10 Cumulative Update for Windows 10 Version 20H2 for x64-based Systems (KB5006670) Successfully installed on 10/19/2021
I haven't fetched (intentionally by me) or cloned from github, I haven't made any file modifications to the make, or board .py files either. I just started this morning with the intent to build continuing where I left off, but now get htis unique new error:
libs/graphics/lcd_arraybuffer.c:222:9: error: 'for' loop initial declarations are only allowed in C99 or C11 mode for (int i=0;i<gfx->data.bpp;i+=8) ^ Makefile:803: recipe for target 'libs/graphics/lcd_arraybuffer.o' failed make: *** [libs/graphics/lcd_arraybuffer.o] Error 1 make: *** wait: No child processes. Stop. rgc@DESKTOP-R7T0VUC:/mnt/c/Users/robin/espruino$
In the mean time I re-reading:and
I haven't changed any recipe within the make file, I haven't made any mods to the LCD libs, or any lib file for that matter.
-
Sun 2021.10.24
Both hardware and software implementations
'How to connect pins to the espruino board?'
Below heading "Choosing pins"
'You can find out which pins to use by looking at your board's reference page and searching for pins with the UART/USART markers'
Remember to cross Tx ==> Rx
You migth also find this helpful: -
Sun 2021.10.24
'when it works, now it doesn't for me'
Was able to perform the translate at 09:54 CST which produces a 2M pdf in seconds.
'google can translate pdf from Chinese to English quite well'
As this is a MAX2659 Maxim chip, wouldn't it be more likely that the content listed on the web is an initial translation from English to their language?
-
Not sure if this is relevant, but after revealing using
dump()
line L7 appears a bit suspicious with an umlaut y object: (minification issue?)Layout.prototype.clear = function (l) { if (!l) l = this._l; g.reset(); if (l.bgCol!==undefined) g.setBgColor(l.bgCol); g.clearRect(l.x,l.y,l.x+l.w-1,l.y+l.h-1); }; var layout = Object.create(ÿ.modules.Layout["prototype"]); layout.l = { "type": "txt", "font": "6x8", "label": "Hello World" }; layout._l = {
-
Sun 2021.10.24
I concur, results are the same as above for both emulator versions and also tried the example beneath images. Those errors seem to result at these lines:
https://github.com/espruino/BangleApps/blob/master/modules/Layout.js#L367
https://github.com/espruino/BangleApps/blob/master/modules/Layout.js#L374 -
Sat 2021.10.23
Is this what you are after?
https://github.com/espruino/Espruino/blob/master/libs/js/banglejs/E_showMenu.js
-
Mon 2021.10.18
'I surprised how this seems to have zero views'
It is more likely that as the ESP32 is an unsupported board, most of the community members support this project with their purchase of an authentic Espruino board.
http://www.espruino.com/Other+Boards
https://www.patreon.com/espruino -
Mon 2021.10.18
' if there are lots of folders within the current project folder'
What is the range for 'lots'? I feel this representation is 'several'.
Here is a sample from one project folder. That folder is what is loaded IDE >> Settings >> Project :: Select Directory for Sandbox
These are the folders there, created when the native IDE selects the project after clicking the button above.
Most are empty of files, 1-4 in modules, 1-~10 in projects, 1 in snippets.
C:\EspruinoMQTT \binary \firmware \modules \projects \snippets \testing \testinglog
At most a list of ~25 individual items beneath each project folder.
-
Sun 2021.10.17
reply to #29 post
Thank you for posting that analysis @MisterG
In order to reduce confusion within the Espruino community and for our new members, I believe the Pico micro referenced is different from an Espruino Pico I mentioned in my post.
from separate @MisterG thread 'The PICO I'm using (M5StickC) is just an ESP32'
https://shop.m5stack.com/products/stick-c?variant=17203451265114The ESP32-Pico is likely an Espressif chip
https://www.espressif.com/sites/default/files/documentation/esp32-pico-d4_datasheet_en.pdf
with 4M of integrated flash - eigth times the capacitywhile the Pico I'm referring to is an authentic Espruino Pico using the STM32 by STMicroelectronics.
https://www.espruino.com/datasheets/STM32F401xD.pdf
512KB Flash -
Mon 2021.10.25
That should have been stated: 'Looks suspiciously like the wrong compiler version is installed',
as . . .
I've not done anything other than follow the instructions on GitHub.
That said, it is likely that you've hit on something. (see following post)
What version of
arm-none-eabi-gcc -v
is supposed to be installed, or is installed on your system?