Skip to content

target: tizenrt-artik05x: Initial porting #1775

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

Merged
merged 1 commit into from
Apr 26, 2017
Merged

target: tizenrt-artik05x: Initial porting #1775

merged 1 commit into from
Apr 26, 2017

Conversation

glistening
Copy link
Contributor

Initial porting to tizenrt-artik05x.

Tizen RT is a lightweight RTOS-based platform to support low-end IoT devices.
The project is under developing in github TizenRt repo.
Artik05x is an IoT SoC solution that will be released soon.

This PR contains the minimum porting that can print Hello
world from jerryscript and a document for building and running.

I used jerry_port.c and jerry_main.c in nuttx port and default port for
porting base code. Also I used Make.defs and Makefile in working
example in tizenrt for adding jerryscript configuration.

JerryScript-DCO-1.0-Signed-off-by: Sanggyu Lee [email protected]

Copy link
Contributor

@yichoi yichoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@zherczeg zherczeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. But I have some questions.

# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
# either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to combine the first two licenses?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think both license are necessary although it is same Apache license, because the Makefile comes from TizenRT source and we usually keep the original license.

static void
print_help (char *name)
{
jerry_port_console ("Usage: %s [OPTION]... [FILE]...\n"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The jerry_port_console is planned to be phased out from the project. I would recommend to use printf.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I will get rids of it.

Copy link
Contributor Author

@glistening glistening Apr 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to remove jerry_port_console beforehand. However, jerry-core/ecma/builtin-objects/ecma-builtin-global.c uses jerry_port_console. Perhaps I can remove jerry_port_console after #1749 is merged.

int
setjmp (jmp_buf buf)
{
return __builtin_setjmp (buf);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The __builtin_setjmp implementation is incorrect on NuttX. I would recommend to use the solution from the NuttX port and add an assembly file for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for informing me. setjmp/longjmp implementation on NuttX is not yet checked correctly working in tizenrt-artik05x. I had a plan to make another patch. The next patch will contains like followings:

  • Integrating longjmp/setjmp from NuttX port (after confirming correctly working on TizenRT)
  • Adapting incoming breaking changes (e.g., removing jerry_port_console, PORT_DIR, ...)
    ...

@LaszloLango
Copy link
Contributor

Please check #1776 and #1777
IMHO it would be better to land #1777 at first and follow the new design for very new port/target. @akosthekiss what do you think?

Initial porting to tizenrt-artik05x.

Tizen RT is a lightweight RTOS-based platform to support low-end IoT devices.
The project is under developing in github TizenRt repo.
Artik05x is an IoT SoC solution that will be released soon.

This PR contains the minimum porting that can print Hello
world from jerryscript and a document for building and running.

I used jerry_port.c and jerry_main.c in nuttx port and default port for
porting base code. Also I used Make.defs and Makefile in working
example in tizenrt for adding jerryscript configuration.

JerryScript-DCO-1.0-Signed-off-by: Sanggyu Lee [email protected]
@glistening
Copy link
Contributor Author

@LaszloLango I rebased since #1777 landed.
@zherczeg I removed the uses of jerry_port_console in this PR. However, I have to provide the definition of jerry_port_console since it is required before #1749 is merged.

Copy link
Contributor

@LaszloLango LaszloLango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@zherczeg zherczeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zherczeg zherczeg merged commit e8be198 into jerryscript-project:master Apr 26, 2017
@akosthekiss
Copy link
Member

Sorry for the late review, but cannot find jerry_port.c in the port. (Or, do I miss something?)

@yichoi
Copy link
Contributor

yichoi commented Apr 26, 2017

Alas, It's initial porting. he will ramp up the Tizen RT features. :p

@akosthekiss
Copy link
Member

Fine. I was just puzzled as jerry_port.c was explicitly mentioned in the commit message and was also referenced in the makefiles.

@glistening
Copy link
Contributor Author

glistening commented Apr 26, 2017

@akosthekiss Oh. It's my mistake! After moving jerry_port.c from previous PORT_DIR to tizenrt app path. I didn't do git add. I will push the file within 4 hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants