Skip to content

Conversation

@janjongboom
Copy link
Contributor

@janjongboom janjongboom commented Dec 2, 2016

Update mbed OS target to latest version of mbed OS (5.2.3). Also rename all files in jerryscript-mbed-drivers/ to include -js.cpp, as our build tools now generate warnings for C++ files with the same name. mbed-events library is now mainlined, so no longer required to pull this library in as a separate dependency. main.cpp is auto-generated and should not be included in this repository.

JerryScript-DCO-1.0-Signed-off-by: Jan Jongboom janjongboom@gmail.com

/cc @thegecko @matthewelse

Verified against:

  • mbed-js-easy-connect
  • mbed-js-example
  • mbed-js-repl-example
  • mbed-js-ble-example

When switching to this branch for an existing mbed JS program, you might need to run:

$ cd build/jerryscript/targets/mbedos5
$ mbed deploy
$ rm -rf mbed-events

Although probably taken care off by gulp.

@LaszloLango LaszloLango added the jerry-port Related to the port API or the default port implementation label Dec 2, 2016
@LaszloLango
Copy link
Contributor

LGTM

1 similar comment
@zherczeg
Copy link
Member

zherczeg commented Dec 2, 2016

LGTM

@zherczeg
Copy link
Member

zherczeg commented Dec 6, 2016

@thegecko @matthewelse please check this patch

@matthewelse
Copy link
Contributor

@zherczeg LGTM, though looks like a few conflicts need resolving (I think these might be the copyright notices)

@janjongboom janjongboom force-pushed the update_to_mbed-os-5.2.3 branch from 94e684e to fb43cc5 Compare December 12, 2016 05:15
@janjongboom
Copy link
Contributor Author

@zherczeg @LaszloLango Rebased against upstream/master, but fails now with (gcc 4.9):

[Warning] ecma-arraybuffer-object.h@37,1: always_inline function might not be inlinable [-Wattributes]
[Warning] ecma-arraybuffer-object.h@39,1: always_inline function might not be inlinable [-Wattributes]
[Error] ecma-arraybuffer-object.h@39,0: inlining failed in call to always_inline 'ecma_arraybuffer_get_length': function body not available
[Error] ecma-builtin-arraybuffer-prototype.c@64,21: called from here
[ERROR] In file included from ../../jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer-prototype.c:22:0:
../../jerry-core/ecma/operations/ecma-arraybuffer-object.h:37:1: warning: always_inline function might not be inlinable [-Wattributes]
 ecma_arraybuffer_get_buffer (ecma_object_t *) __attr_pure___ __attr_always_inline___;
 ^
../../jerry-core/ecma/operations/ecma-arraybuffer-object.h:39:1: warning: always_inline function might not be inlinable [-Wattributes]
 ecma_arraybuffer_get_length (ecma_object_t *) __attr_pure___ __attr_always_inline___;
 ^
../../jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer-prototype.c: In function 'ecma_builtin_arraybuffer_prototype_bytelength_getter':
../../jerry-core/ecma/operations/ecma-arraybuffer-object.h:39:1: error: inlining failed in call to always_inline 'ecma_arraybuffer_get_length': function body not available
../../jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer-prototype.c:64:21: error: called from here
       ecma_length_t len = ecma_arraybuffer_get_length (object_p);

Removing the always inline from ecma_arraybuffer_get_buffer and ecma_arraybuffer_get_length makes it build again... Has something changed here recently?

@jiangzidong
Copy link
Contributor

@janjongboom we extended the builtin object recently.
I think it's because the definition of inline functions (ecma_arraybuffer_get_buffer and ecma_arraybuffer_get_length) are in other source files. link
My gcc version is 4.8.4 and didnt throw error.

I think there are 2 solutions

  • remove the inline
  • put the defination into the header file, and set the function static

I prefer removing the inline flag.

Should I post a new PR, or janjongboom fix it in his PR? @LaszloLango @zherczeg

@janjongboom
Copy link
Contributor Author

janjongboom commented Dec 12, 2016

@jiangzidong Preferably in a new PR.

FYI, this is my GCC version: gcc version 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 224288] (GNU Tools for ARM Embedded Processors)

@zherczeg
Copy link
Member

@jiangzidong ok, lets remove the inline flag. I hope the compiler will be clever enough to do inlining automatically. Please open a new PR since this seems an unrelated change.

jiangzidong added a commit to jiangzidong/jerryscript that referenced this pull request Dec 12, 2016
related issue jerryscript-project#1468

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
@jiangzidong
Copy link
Contributor

@janjongboom @zherczeg the new PR is #1484

jiangzidong added a commit to jiangzidong/jerryscript that referenced this pull request Dec 12, 2016
related issue jerryscript-project#1468

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
tilmannOSG pushed a commit that referenced this pull request Dec 12, 2016
Related issue #1468.

JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
Update mbed OS target to latest version of mbed OS (5.2.3). Also rename all files in jerryscript-mbed-drivers/ to include -js.cpp, as our build tools now generate warnings for C++ files with the same name. mbed-events library is now mainlined, so no longer required to pull this library in as a separate dependency.

JerryScript-DCO-1.0-Signed-off-by: Jan Jongboom janjongboom@gmail.com
@janjongboom janjongboom force-pushed the update_to_mbed-os-5.2.3 branch from fb43cc5 to 7286547 Compare December 13, 2016 03:31
@janjongboom
Copy link
Contributor Author

Rebased again. Builds and works if #1485 is landed too.

@tilmannOSG
Copy link

LGTM, I think we can merge this right after #1485 goes in (which should happen very soon).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jerry-port Related to the port API or the default port implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants