Debugging and Testing
ZeroBrane Studio
ZeroBrane Studio is a lightweight Integrated Development Environment (IDE) for Lua. A version of ZeroBrane is included in the NovAtel API that contains additions to make creating and debugging Lua scripts on NovAtel receivers easier.
The ZeroBrane Studio project website is studio.zerobrane.com/.
The ZeroBrane documentation on debugging can be found at: studio.zerobrane.com/doc-remote-debugging.
On Target vs. Off Target Debugging
There are two main ways to debug Lua scripts for use on the OEM7 receiver:
-
On Target:
The Lua interpreter on NovAtel receivers can be debugged using the ZeroBrane IDE via an Ethernet connection to the receiver. In this method, the Lua interpreter on the target (i.e. the receiver) is executing the script and the Lua interpreter on the host PC is just providing a debug server. -
Off Target:
The Lua interpreter within ZeroBrane Studio can execute a script and interact with the receiver via the SCOM ports over an Ethernet connection.
The diagram below describes how the various pieces interact in both methods and the table that follows contains more notes on the differences:
Debugging Type |
Lua |
IP Address to Use for SCOM |
Notes |
---|---|---|---|
On Target |
On OEM7 Receiver |
127.0.0.1 |
This environment more closely resembles how the Lua scripts will be deployed in an end user use case. |
Off Target |
On PC |
IP Address of OEM Receiver See the IPSTATUS log |
Useful for quickly developing Lua scripts and testing non-real time aspects of the code. |
SCOM Port Numbers
The NovAtel provided scom module can be used to programatically determine socket port numbers for the SCOM port. For more information, see Additions and Limitations.
See the table below for the port numbers:
SCOM Port |
Port Number |
---|---|
SCOM1 |
49154 |
SCOM2 |
49155 |
SCOM3 |
49156 |
SCOM4 |
49157 |