-
Notifications
You must be signed in to change notification settings - Fork 688
Support Bluetooth communcation JerryScript debugger #2633
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,7 @@ This simple application demonstrates the communication protocol | |
| between the client and server, and can be reused by integrated | ||
| development environments. | ||
|
|
||
| ## Setting up the debugger server | ||
| ## Setting up TCP/IP debugger server | ||
|
|
||
| The following arguments must be passed to `tools/build.py`: | ||
|
|
||
|
|
@@ -21,7 +21,23 @@ JerryScript extension, which transmits messages over TCP/IP networks. | |
| If necessary/implemented, any reliable stream or datagram based | ||
| protocol can be used for transmitting debugger messages. | ||
|
|
||
| ## Debugging JavaScript applications | ||
| ## Setting up Bluetooth debugger server | ||
|
|
||
| The following arguments must be passed to `tools/build.py`: | ||
|
|
||
| `--jerry-bt-debugger=on` | ||
|
|
||
| The transport layer of the communication protocol is pluggable. | ||
| At the moment, a WebSocket-based implementation is provided as a | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this true? It seems to me that the BT stack uses RFCOMM, i.e., "serial port emulation". |
||
| JerryScript extension, which transmits messages over Bluetooth network. | ||
|
|
||
| The following library is needed to build JerryScript | ||
| - libbluetooth-dev | ||
|
|
||
| The following python commands needed to run jerry-client.py | ||
| - sudo apt-get install -q python-dev | ||
| - pip install --user pylint==1.6.5 pybluez | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the second new line is necessary? |
||
|
|
||
| The debugger client must be connected to the server before the | ||
| JavaScript application runs. On-the-fly attachment is supported | ||
|
|
@@ -43,6 +59,12 @@ source code: | |
|
|
||
| `--debugger-wait-source` | ||
|
|
||
| The following argument makes JerryScript create a server with | ||
| the given type. There are two choices, tcp or bluetooth. | ||
| (default: tcp) | ||
|
|
||
| `--server-type bluetooth` | ||
|
|
||
| It is also recommended to increase the log level to see | ||
| the *Waiting for client connection* message: | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,9 +18,13 @@ project (${JERRY_EXT_NAME} C) | |
|
|
||
| # Optional features | ||
| set(FEATURE_INIT_FINI OFF CACHE BOOL "Enable init/fini arrays?") | ||
| set(FEATURE_BT_DEBUGGER OFF CACHE BOOL "Enable JerryScript bluetooth?") | ||
|
|
||
|
|
||
| # Status messages | ||
| message(STATUS "FEATURE_INIT_FINI " ${FEATURE_INIT_FINI}) | ||
| message(STATUS "FEATURE_BT_DEBUGGER " ${FEATURE_BT_DEBUGGER}) | ||
|
|
||
|
|
||
| # Include directories | ||
| set(INCLUDE_EXT_PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include") | ||
|
|
@@ -32,6 +36,10 @@ if(FEATURE_INIT_FINI) | |
| set(DEFINES_EXT ${DEFINES_EXT} ENABLE_INIT_FINI) | ||
| endif() | ||
|
|
||
| if(FEATURE_BT_DEBUGGER AND FEATURE_DEBUGGER) | ||
| set(DEFINES_EXT ${DEFINES_EXT} JERRY_BT_DEBUGGER) | ||
| endif() | ||
|
|
||
| # Source directories | ||
| file(GLOB SOURCE_EXT | ||
| arg/*.c | ||
|
|
@@ -49,3 +57,7 @@ target_link_libraries(${JERRY_EXT_NAME} jerry-core) | |
|
|
||
| install(TARGETS ${JERRY_EXT_NAME} DESTINATION lib) | ||
| install(DIRECTORY ${INCLUDE_EXT_PUBLIC}/ DESTINATION include) | ||
|
|
||
| if(FEATURE_BT_DEBUGGER) | ||
| target_link_libraries(${JERRY_EXT_NAME} -lbluetooth) | ||
|
||
| endif() | ||
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 do code smell and style checks need the installation of additional system and python packages?
But if they are needed, the system dependencies should be added to
addons.apt.packages.