FIND is a free to use protocol for Embedded devices which makes it easy and fast to locate them in the LAN. FIND locates all embedded devices supporting discovery in fractions of a second. With less than 300 bytes of ROM and no RAM for the implementation, it can be easily implemented on any device with any TCP/IP stack. You are free to use FIND for anything, even commercial and closed source software.
1.FIND - Fast Interoperable Network Discovery Protocol
2.FIND Discover - The FIND response collector
3.FIND command-line server
4.How to add FIND to your application
5.emNet client side implementation
6.Resource usage
7.Protocol specification
8.The protocol on the wire
9.J-Link support
No additional or ULINK2-specific drivers are required. To view the status of the ULINK2 USB connection: Connect the Keil ULINK2 Adapter to the PC. Right-click on My Computer and open the Properties dialog. Under Hardware click on Device Manager and select Human Interface Devices. Open the Properties page for each device. Go to Control panel, enter System to access your Device Manager Scroll down to the LPT/ COM port then double click Prolific USB to Serial Comm Port Click Driver in the Windows Properties section The driver must be numbered as '2.0.2.8' and dates accordingly. If the USB driver is working properly and your Flasher is connected with the host system, you may connect Flasher to your target hardware. Then start the J-Link command line tool JLink.exe, which should now display the normal Flasher related information and in addition to that it should report that it found a JTAG target and the target’s core ID. USB™ multi-port adapters with Ethernet connectivity and some Ethernet adapters are not compatible at this time (due to IC design). Click here for more information. The display driver does not support Mac® computers with the M1 processor at this time, contact your computer manufacturer to verify if your computer supports the display driver.
FIND - Fast Interoperable Network Discovery Protocol
In today's networks, even simple questions regarding the reachability of a device are nearly impossible to answer. Especially headless devices like sensors, network printers and network attached storages are often not responsive.
New devices which have to request an IP address from a DHCP server to get reachable are an everyday scenario. In home networks the IP address will normally automatically assigned to each device which sends a request. Thereafter, the device is available on the network, but still not automatically reachable for the user. To connect to the new device you need at least its IP address or the device name if local name resolution protocols like NetBios or mDNS are supported. If the IP address and the device name are unknown, the simplest solution is often to check the administration panel of the router and search the list of distributed IP addresses. This is doable, but not user-friendly.
How easy could it be, if every device would simply send a response, if the user asks for the name and the IP address of each device in his network? Sounds simple and reasonable, but nevertheless it is not normal in today's networks.
SEGGER's FIND (Fast Interoperable Network Discovery) protocol is designed to fill this gap. It helps to collect the most important information of each target on the network, works on top of each TCP/IP stack and helps to satisfy the needs of the normal user.
The simplest way to display the collected information is our free tool FIND Discover. It sends queries and lists all valid responses of the devices in the network.
FIND command-line server
To test FIND in your network, you can download a simple command line implementation of a FIND server, which generates and sends valid FIND responses with the information of your host. The application opens the UDP port 50022 and waits until it receives a valid FIND query. A FIND response will be send back after the receipt of a FIND query.
Download Sample command-line FIND server for Microsoft Windows hosts.
The protocol can be used on every hardware and with every TCP/IP stack. If your device can send UDP packets, it can also add support for the FIND protocol.
Client side:
Open UDP port 50022 in listening mode.
Send a response to UDP port 50022 back to the query sender (unicast)
Host side:
Open UDP port 50022 in listening mode.
Send a FIND query (UDP broadcast to port 50022) with payload FINDReq=1;.
Check for responses sent by the devices with FIND support in the network.
emNet client side implementation
The code is for the client side is really simple. The sample implementation uses the emNet UDP zero-copy API.
Add it to your emNet application: Download the archive and add the included files to your project. To enable FIND support on your device, IP_FIND_Init() has to be called in your application. That's it. Thereafter your device will answer FIND queries and can be found in your network.
Download Sample implementation of the client side for emNet
Compiler settings:
CPU:
ROM usage:
Query payload: The payload of the query is a zero-terminated UTF-8 string, which will be checked by the listening devices. The string consists of the keyword FINDReq followed by the delimiter (=), the protocol version (1) and the delimiter (;). Optional type/value pairs (e.g. filter rules) can be added to the query. The payload ends with the zero-termination.
Segger Port Devices Drivers
Response structure: The payload of the response is a zero-terminated UTF-8 string. The string starts with a marker which has to be checked by the device which receives the responses. The marker consists of the keyword FIND followed by the delimiter (=) and the protocol version (1). The marker ends with the delimiter (;). The marker is followed by type/value pairs. The sequence of the type/value pairs in the response string is not relevant.
Mandatory fields: The protocol specifies the following type/value pairs as mandatory:
Device name (e.g. DeviceName=MyTarget;)
Serial number (e.g. SN=12345678;)
Hardware address of the interface (e.g. HWADDR=00:22:CC:AA:BB:CC;)
Our sample implementation sends also the IP of the device as additional information.
IP address(es) of the interface (e.g. IP=192.168.123.123;)
The IP address of the device is always part of the IP header of response. If the IP address is not part of the response string, the client should extract the IP address out of the IP header of the packet. Additional information can be added to the response (Type=Value;). Clients should ignore and skip unknown type/value pairs.
Devices with FIND support are listening on UDP port 50022. To get the information from each device with FIND support the host sends a UDP broadcast query with the query marker FINDReq=1 as payload to port 50022.
The devices with FIND support in the same network segment will receive the broadcast and check the payload for the query marker. If the marker is valid, each device will send an unicast response with the most important configuration settings as payload back to the host.
J-Link support
The industry leading SEGGER J-Link supports FIND since software version V6.34f. Use the free FIND Discover tool to detect the J-Link PROs in your network.
More Information
Purchase
Technology
Add-Ons
Tools
Eclipse is a universal customizable IDE, which is also the base for many common commercial IDEs.In order to work with Eclipse and debug with J-Link, you also need to install a toolchain which includes compiler, assembler, linker + GDB (GNU Debugger) for debugging (e.g. GNU Tools for ARM).Moreover, in order to allow hardware debugging on embedded systems via GDB + GDB Server, there is also an Eclipse plugin needed, which enables hardware debugging via GDB (e.g. the CDT plugin).After setting up Eclipse + Plugin, Eclipse will use GDB as debugger where GDB communicates via the GDB protocol with J-Link GDB Server, allowing to debug the target hardware which is connected to a J-Link.
The tutorials in this article are based on Eclipse Neon.3 setup with the GNU MCU Eclipse environment by following the official install instructions.The GNU MCU Eclipse project is a collection of plug-ins for Eclipse CDT and ARM toolchains including extensions for easy embedded development in Eclipse.It is recommended to use this plug-in when working with a standard Eclipse installation.
Note: J-Link GDB Server is part of the J-Link Software and Documentation Pack and can be used free of charge.
1Getting started
2FAQ
Getting started
Creating a J-Link Debug Configuration
Segger Port Devices Driver Device
Open Run -> Debug Configurations...
Double click GDB SEGGER J-Link Debugging
Eclipse will create a New Debug Configuration and set setting to defaults based on the workspace and project
Configuring the target interface type
Open Run -> Debug Configurations...
On the left side, select the used Debug configuration in the group GDB SEGGER J-Link Debugging
Switch to the tab Debugger
The target interface can be selected in the area marked below
Configuring the target interface speed
Initial interface speed before/during connect
Open Run -> Debug Configurations...
On the left side, select the used Debug configuration in the group GDB SEGGER J-Link Debugging
Switch to the tab Debugger
The interface speed before connect can be specified in the field Initial speed marked below
Interface speed after connect to target before/during reset & halt
Open Run -> Debug Configurations...
On the left side, select the used Debug configuration in the group GDB SEGGER J-Link Debugging
Switch to the tab Startup
The interface speed after connect to target before/during reset & halt can be specified in the field Low speed marked below
Interface speed after initialization
Open Run -> Debug Configurations...
On the left side, select the used Debug configuration in the group GDB SEGGER J-Link Debugging
Switch to the tab Startup
The initial speed can be specified in the area JTAG/SWD Speed marked below
Specifying the target device
Open Run -> Debug Configurations...
On the left side, select the used Debug configuration in the group GDB SEGGER J-Link Debugging
Switch to the tab Debugger
The target device can be specified in the field Device name: marked below
Specifying J-Link GDB Server commandline options
For a list of available commandline options, please refer to UM08001.Commandline options for GDB Server can used for various J-Link features, e.g.
specifying a J-Link Settings file
specifying a J-Link script file
specifying a J-Link Command String
Commandline options can be specified by editing the field Other options:
Open Run -> Debug Configurations...
On the left side, select the used Debug configuration in the group GDB SEGGER J-Link Debugging
Switch to the tab Debugger
Commandline options can be specified by editing the field Other options marked below
J-Link Settings File
Please refer to Specifying J-Link GDB Server commandline options
Using J-Link Command Strings
Please refer to Specifying J-Link GDB Server commandline options Please note that J-Link Command Strings can also be executed from J-Link script files.
Using J-Link script files
Please refer to Specifying J-Link GDB Server commandline options
Segger Port Devices Driver
Connecting to J-Link via J-Link Remote Server
The J-Link Remote Server makes it possible for Eclipse/ GDB to connect to a J-Link remotely, without needing a physical connection to the J-Link.
In order to connect to a J-Link Remote Server using Eclipse/ GDB follow these instructions:
Make sure that a J-Link Debug Configuration is already created, as described above
Open Run -> Debug Configurations...
Select a J-Link Debug Configuration under GDB SEGGER J-Link Debugging
Select the Debugger tab
For Connection select IP
Edit the IP field:
For a remote server running in LAN mode, enter '<RemoteServerIP>'.
For a remote server running in tunneling mode, enter 'tunnel:<SN/Nickname>[:<Pasword>[:tunnelserver[:port]]]'
Click Apply
I am using a standard Eclipse. What do I need to debug my application with J-Link?
To debug with J-Link the CDT plugin with GDB Server support, the GNU ARM Eclipse plugins or a similar plugin are required.
I have all plugins installed. What else do I need?
To use J-Link, the J-Link Software and Documentation Pack has to be installed. It includes the J-Link USB drivers and the J-Link GDB Server.
I cannot set a debug session with one of the plugins. Where can I get help?
For setting up a debug session, please refer to the respective documentation of the used plugin. SEGGER can only provide support for problems which are directly related to J-Link or GDB Server.
Does SEGGER support and maintain the GNU ARM Eclipse plugins?
No. The GNU ARM Eclipse plugins are not affiliated with SEGGER and are created, supported and maintained by Liviu Ionescu. SEGGER does only recommend these plugins as they are easy to use.
I am missing a feature in Eclipse. Can SEGGER add it?
No. SEGGER does not develop Eclipse or its plugins. Please contact the respective distributors.
When debugging with Eclipse, some commands do not work with J-Link. Why not?
Eclipse was mainly designed for JAVA development, later C/C++ development features and debugging features were added via plugins. Some of the plugins even work for embedded development, but there might be limitations related to the used plugin. In some cases it is possible to control J-Link and GDB Server by issuing monitor commands directly via GDB. (In the Eclipse Consoles -> '.../arm-...-gdb.exe') For the available GDB Server commands refer to the corresponding chapters in the J-Link User Manual (UM08001_JLink.pdf). Otherwise another debugger plugin or debugger might be needed.
Where can I find the GDB and GDB Server output?
Most Eclipse plugins invocate GDB and GDB Server and redirect input and output to the Console Window. GDB commands can be executed in the arm-...-gdb Console. gdb traces shows the log output of executed GDB commands. JLinkGDBServer(CL) shows the log output of GDB Server.
I am absolutely sure I set up everything correctly, but GDB Server or J-Link report errors. Can SEGGER help?
In this case, mostly yes. If your J-Link is within the support period (12 / 24 months), contact us at support@segger.com. If you are using a J-Link LITE / EDU / OB or an older J-Link, please use the SEGGER Forum. To allow fast response, please add your J-Link S/N, your target device name, the Eclipse version number, the used plugin and the GDB Server output to your mail or post.
Is there an alternative to debugging with Eclipse?
Yes. There are many commercial and free IDEs and stand-alone debuggers available. If you want to use Eclipse for your project development but not for debugging, J-Link Debugger is a good soulution. It is a full featured stand-alone GUI debugger to be used with J-Link, featuring nearly all functionality of J-Link. J-Link Debugger is as flexible as Eclipse, but with better performance and intuitively easy to use user interface. It is available free of charge and can also be used with Eclipse-created applications.
Retrieved from 'https://wiki.segger.com/index.php?title=Eclipse&oldid=8913'