Closed ig-66 closed 1 year ago
Are you guys alive overthere?
Well, yes, thanks for asking. A gentle ping would have sufficed.
It seems system headers are missing, maybe something is not installed. We don't know your platform, but somebody at zephyr community might know more.
Well, yes, thanks for asking. A gentle ping would have sufficed.
@akosthekiss Sorry, it sounded funny on my head
I asked overthere yesterday, but as it isn't considered a Zephyr issue, that got moved to the discussion, still nothing though it is recent, so that is expected. BTW I'm working on making Jerry a Zephyr module, lets see how that turn out
Unfortunately I cannot really comment on the "top of stack" issue. The memcheck.h is needed by valgrind, did you enabled its support (passing JERRY_VALGRIND
to the compiler)?
A stack issue just came to my mind. I had a multi threaded experiment before, where I accidentally placed the whole jerry heap on thread stack, and it crashed instantly. This is an unlikely case, but maybe it helps.
Unfortunately I cannot really comment on the "top of stack" issue. The memcheck.h is needed by valgrind, did you enabled its support (passing
JERRY_VALGRIND
to the compiler)?
Actually I haven't done that. But as of now, the Jerry module for zephyr is working to some extent, but I have some features to fix. Either way, thanks for the help!
Update: Here is a repository of a modified version of JerryScript to be built for Zephyr. It might suffer modifications, but it is working great so far And here is a test/sample repo on how to use JerryZ
Hi there, I've tried out the current Zephyr version (2.7) with latest JerryScript (that is for stm32f4-discovery device). I've followed the documentation (targets/os/zephyr/README.md) and everything worked fine - my OS is Ubuntu 20.04. After flashing the binary to the board, the header of the demo app appeared as expected, while the prompt does not.
*** Booting Zephyr OS build zephyr-v2.7.0 ***
JerryScript build: Jan 3 2023 16:17:15
JerryScript API 3.0.0
Zephyr version 2.7.0
The prompt problem is solved by applying #5033 modification.
I'm simply not able to make JerryScript work with Zephyr. I have tried different processes with different outcomes:
1>
Tried running the command below (just like this tutorial) in the
targets\os\zephyr
, but changing the toolchain in the CMakeLists:Changes to the CMakeLists: from this:
--toolchain=${JERRY_BASE}/cmake/toolchain_mcu_stm32f4.cmake)
to this:--toolchain=${ZEPHYR_BASE}/boards/arm/waveshare_nrf52840_eval_kit/board.cmake)
Result:
2>
So, tried running the command to generate the libjerry files from the
jerryscript
folder:python tools\build.py
, but this gave me this error:So I set up the python build to use the ninja (because Zephyr uses ninja, and it is already configured in my machine) using CMake GUI, also set the following with CMake GUI:
Also set the configs in the
jerryscript\targets\os\zephyr\CMakeLists.txt
in CMake GUIAnd then ran the command
python tools\build.py
, the build is succeeded. After that tried buildingjerryscript\targets\os\zephyr
with west.Result:
3>
Then tried running west command in the jerryscript directory (after deleting the contents in the build folder, of course):
The build was succeeded, but got the following warning:
Then returned to
targets\os\zephyr
, removed the build folder and ran:Got:
So I removed the
#include <sys/printk.h>
header, as it is not required forprintk
anymore, and re-ran the west command.Result:
4>
Update Zephyr to 3.1.0, setup the the build in the jerryscript folder with CMake GUI, the same way as described above and ran west in
targets\os\zephyr
Result:
But that was fixed by setting float ABI to use soft float calling conventions using![image](https://user-images.githubusercontent.com/72050063/198031816-1b7c03cf-4636-4ca5-baeb-8a08e6e972e8.png)
menuconfig
/guiconfig
:After that I re-ran the west build command, the build was succeeded, so I flashed to the board and openned the Arduino's Serial Monitor, the program simply stops, note how the "js>" is not printed:
Tried sending
Maybe the warning in try number 3 has something to do with it:
print('Test')
through the serial monitor, but nothing happens. When debbug with Ozone, the problem is in thejerry_init()
function in thejerry-main.c
, a MemManage exception heppens:Comments
I haven't setup Zephyr according to the JerryScript tutorial, because Zephyr is already setup and running.
Platform: Windows 10 Zephyr version: 2.7.0 and 3.1.0 JerryScript Version: 3.0.0