-
Notifications
You must be signed in to change notification settings - Fork 440
Add several options to the nuttx target in precommit.py #1207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@robertsipka Some code seem to duplicate with |
@hs0225 : This is the first patch of the other approach, where we could test our development on devices without downloading the js-remote-test project. Several related code parts are already implemented in the js-remote-test, which I have planned to use. The main goal is the testrunner itself had to be part of the IoT.js project. |
@robertsipka Are there too many duplicate codes like |
@hs0225 : These patches only needed for IoT.js. The reason is that the jerryscript allocator could able to follow the libtuv and IoT.js memory allocations. The jerryscript itself does not have to contain them. |
7cf71f1
to
cd46f31
Compare
@robertsipka I think, it would be a nicer solution if all your patch files ( Just a note: the |
@robertsipka OK got it. @rtakacs I agree with you. |
Apply memstat patches to measure the memory consumption of IoT.js. Create a ROMFS image from the contents of the IoT.js testsuite. Flash the NuttX binary onto the board. IoT.js-DCO-1.0-Signed-off-by: Robert Sipka [email protected]
cd46f31
to
387a16f
Compare
I think we will need these patches (3 of a 4) also in case of |
LGTM (informally) By the way, could you give an example that shows the usage of your development? |
Adding the memstat patches and the testsuite to the binary for measure the memory consumption of the IoT.js testsuite on the nuttx target: |
|
||
/* Zero out all members. */ | ||
- memset (&JERRY_CONTEXT (JERRY_CONTEXT_FIRST_MEMBER), 0, sizeof (jerry_context_t)); | ||
+ // memset (&JERRY_CONTEXT (JERRY_CONTEXT_FIRST_MEMBER), 0, sizeof (jerry_context_t)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this is commented out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It needs to prevent the overflow of the counter. When jerry_init
called, the allocated memory is not zero, because the IoT.js did some allocation for the environment. So we should not zero out memory statistics here, because it will cause an overflow after the free
function calls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LGTM |
…uttx target. Using `.config.alloptions` since it contains all the features that IoT.js requires. Restored `.config.travis` to the original state (modified in jerryscript-project#1207). IoT.js-DCO-1.0-Signed-off-by: Robert Sipka [email protected]
…uttx target. (#1219) Using `.config.alloptions` since it contains all the features that IoT.js requires. Restored `.config.travis` to the original state (modified in #1207). IoT.js-DCO-1.0-Signed-off-by: Robert Sipka [email protected]
As @rtakacs mentioned earlier, the
precommit.py
script should be extended with a flash mechanism.It is a small modifications, and does not contain to many things to significantly influences the readability and the maintenance of the script.
The other hand, by adding the memstat patches and the testsuite to the binary, we finally able to measure the memory consumption of the IoT.js testsuite on the nuttx target.