Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
drozd
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
drozd
4y ago
The linker script specifies that .data section starts where 192k RAM region starts - in other words, addresses of all variables, etc, are in the RAM memory range. But the firmware image (that resides on flash), which has .text and .data con
2.
▲
A bare metal programming guide
(github.com)
26 points
by
drozd
4y ago
|
7 comments
3.
▲
Control Arduino Uno via AWS Device Shadow
(youtube.com)
3 points
by
drozd
8y ago
|
0 comments
4.
▲
by
drozd
9y ago
Fast prototyping is the answer. If you or some others are skilled in C/C++, you don't need JS. For others, having a simple way to prototype fast on the target hardware is a big benefit.
5.
▲
by
drozd
9y ago
mJS allows you to use C/C++ SDK functions directly without writing a glue code - basically, you can prototype things quite fast with the libraries/drivers that do not have any scripting support yet.
6.
▲
by
drozd
9y ago
That's right, cause Linux cannot run on the large class of microcontrollers - particularly, those with less than 4M of RAM. Mongoose OS is targeting that category.
7.
▲
by
drozd
9y ago
JS is for prototyping.
8.
▲
by
drozd
9y ago
Sure, try to run those on e.g. TI CC3200 microcontroller.
9.
▲
by
drozd
9y ago
I think Mongoose was called mongoose before mongo db plugin existed. https://github.com/cesanta/mongoose - that's the project from which Mongoose OS stems.
10.
▲
by
drozd
10y ago
Ah, thanks, wrong about flash footprint. Neil has done a great job adopting Duktape on ESP32.
11.
▲
by
drozd
10y ago
Hi Gordon! Nice to meet you :) I am the author of the article, and I am quite fond of Espruino, it's a great project. Wasn't aware that Espruino has FFI API!
12.
▲
by
drozd
10y ago
Yes. Closures add quite a bit of complexity and footprint. Anticipated use case was a short script that orchestrates the device logic, calling existing SDK functions.
13.
▲
by
drozd
10y ago
Nice! I wasn't aware of lua ffi api, thank you!
14.
▲
by
drozd
10y ago
Nope. It's similar though, cause some of the concepts, and the code, were reused. mJS does not need an embedding API, really. The intent is that FFI is used.
15.
▲
by
drozd
10y ago
Embedded environment in this context means hardware low on resources, e.g. microcontrollers. Your perception of that word is "embedded into the C/C++ program". These are two different things. I agree that Lua (like some other
16.
▲
by
drozd
10y ago
Duktape is nice, and I've mentioned it in the article. However it's quite fat, and can't be used on some boards like ESP8266. It's flash footprint is Megabytes, whereas mJS flash footprint is ~25k.
17.
▲
by
drozd
10y ago
I recall that very much the same opinions were expressed about the JS and backend programming, until node.js appeared. Now the reality is different. To be honest, we do not think that JS is a good language for embedded. Like any other exist
18.
▲
by
drozd
10y ago
There is no yacc code in either V7 or mJS. V7 uses hand-written recursive-descent parser. Initially, it was using ordinary C functions, and that created a problem on systems with low stack size. E.g. each '(' starts statement pars
19.
▲
by
drozd
10y ago
Currently we use mJS in our Mongoose OS firmware framework. There, a symbol resolver is generated automatically from the configuration file which tells which symbols you'd like to use. https://github.com/cesanta/mo
20.
▲
by
drozd
10y ago
The ability to script without the need of rebuilding/reflashing the whole firmware is often fairly useful. The most value is not in JS per se, but in the ability to script.
21.
▲
by
drozd
10y ago
Currently, mJS FFI is limited to functions only. And, to simple enough functions. On how to access memory from mJS: write an accessor function! // C void setmem(uint8_t *ptr, int index, int value) { ptr[index] = va
22.
▲
JSON parser/emitter for embedded systems with printf/scanf semantics
(github.com)
1 points
by
drozd
10y ago
|
0 comments
23.
▲
V7 – the smallest embeddable JavaScript engine
(github.com)
2 points
by
drozd
10y ago
|
0 comments
24.
▲
Implementing “real” Posix Filesystem on TI CC3200
(blog.cesanta.com)
7 points
by
drozd
11y ago
|
0 comments