-
I had copied the node_modules with installed acorn from the npm's folder to catalog ..\EspruinoCompiler-master.
The error went away, the server runs (in browser at the address localhost:32766, I see the the message Espruino compilation server), but compiling isn't performed :-( The function is sended to Espruino as javascript code, not as native code
-
-
-
-
-
Unfortunately I have an internet connection not always... And fact that I must compile a code again for new Espruino version is not a good thing.
Say please is it possible to run a compiled code from controller's flash? I'd like to save compiled functions to STM32's flash by STM32F1 FLASH MEMORY MODULE and call them from there. Or do the compiled code works from RAM only?
-
-
@Gordon
Sorry, it seems to me there is a little bug in second code: the Uint8Array constructor must have the argument len, isn't that so? Or I have understood nothing... -
The constructor Uint8Array uses second and third parameters when first parameter is ArrayBuffer only. Therefore in second case (string 8 in your code) array v gets the full copy of array t.
There was a surprise for me when i have found out that in first case (string 4 in your code) array u gets not a copy of t but reference to elements t[1] and t[2]. And if I change u[0] and u[1] t[1] and t[2] are changed too :-0
In addition the u.buffer consists of all elements of t array :-D and some function may work not quite properly :-( I have found this when I worked with LCD.drawImage()
Now I have decided a problem by method you can see in post #6 of this conversation.
-
I have decided the problem by next way: first of all someInt8Array is copied with offset and len to a interim array tempArr and then the last one is copied fully to the newArr.
tempArr = new Uint8Array(someInt8Array.buffer, offset, len);
newArr = new Uint8Array(tempArr);But it seems me, that is not a finest decision...
-
@Gordon
If I remove the .buffer, the someInt8Array will be copied to newArr completely. But it is needed that only part of source array will be copied with offset to destination array... -
When I use the constructor
newArr = new Uint8Array(someInt8Array.buffer, offset, len),
it doesn't copy the someInt8Array into newArr, but makes the reference to it for newArr and if I change some element of newArr, the element of source array someInt8Array with offset index is changed too!
In Espruino Reference it says: "If an ArrayBuffer view (eg. Uint8Array rather than ArrayBuffer) is given, it will be completely copied rather than referenced." Does it mean, that someInt8Array must be copied to newArr?
Is it real bug? Or do I understand it wrong?
-
-
-
Ok, you are right. There is transistor, that connects the USP_DP via 1k5 resistor to +3,3V, if PC13 is LOW. When the board is restart, there is HIGH on PC13 and system doesn't see on USB the Espruino. I have reset PC13 and then computer find the board.
But this didn't give the result: the program with "compiled" function hangs...
@TrapperBob had same situation (post #38 in this theme), I think so :-)
PS. I have connected those base resistor of Q1 from PC13 to ground, and now the USB is seen always. And additional I have the free port PC13 :-)
-
-
-
-
-
@Gordon, the Espruino is very handy to test any algorithm: I can draft quickly anything and probe it in Espruino :-) And therefore I like it :-)
What is the problem with HY? Isn't it good enough? There are flash, SD, LCD, touchscreen... Very nice board, isn't it?
-
2Gordon
No, no, no. That's not for car, of course :-) We work with a system that consists of many modules. They communicate by CAN. The master (module) that is on PIC builded has anywhere an error in program that we cannot find :-(. I'd like to probe to communicate by Espruino with slaves, but there is no library hier for it...The way with building Espruino by myself seems me... mmm, not simple and long...
2alexanderbrevig
It will be great if you would help me.
Certainly we can move this theme to Interfacing if you think that it will be better -
-
Yes, sure. I have changed the Javascript Compiler address in Web IDE.
The GCC for ARM is installed, but I have no idea how it must be attached to JS Compiler. I think problem is that JS Compiler doesn't see the GCC...