Skip to content

Commit

Permalink
scripts: zephyr: separate from server dir
Browse files Browse the repository at this point in the history
Move the zephyr start scripts from server dir to root directory. The
scripts are used for testing and are not directly related to the server
implementation.

Signed-off-by: Jonas Remmert <jremmert@gmx.net>
  • Loading branch information
jonas-rem committed May 25, 2024
1 parent 653e667 commit 16f6c0e
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 16 deletions.
3 changes: 1 addition & 2 deletions doc/source/documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ components locally. Once leshan and Zephyr are running, the Zephyr application
can be started in emulation with the following command:

.. code-block:: console
host:lwm2m_server/server$ zephyr_build_run_sim.sh
host:lwm2m_server$ zephyr_build_run_sim.sh
*** Booting nRF Connect SDK zephyr-v3.5.0-3024-g7c3e830729b7 ***
[00:00:00.000,000] <dbg> net_lwm2m_engine: lwm2m_engine_init: LWM2M engine socket receive thread started
Expand Down
6 changes: 0 additions & 6 deletions server/zephyr_build_run.sh

This file was deleted.

8 changes: 0 additions & 8 deletions server/zephyr_build_run_sim.sh

This file was deleted.

5 changes: 5 additions & 0 deletions zephyr_build_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

## Build and run Zephyr
west build -p=auto -b qemu_x86 fw_test/lwm2m_client -p -- -DCONF=overlay-lwm2m-1.1.conf
west build -t run
18 changes: 18 additions & 0 deletions zephyr_build_run_sim.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# Function to stop networking
cleanup() {
../tools/net-tools/net-setup.sh stop
}

# Register the cleanup function to be called on the EXIT signal
trap cleanup EXIT

# Start networking via net-tools
../tools/net-tools/net-setup.sh start

## Build and run Zephyr
west build -p=auto -b qemu_x86 ../zephyr/samples/net/lwm2m_client -- -DCONF=overlay-lwm2m-1.1.conf
west build -t run

cleanup

0 comments on commit 16f6c0e

Please sign in to comment.