18
The Embedded Experts Your One-Stop Shop From Development to Production www.segger.com Microchip J-32 Freely Available Software Utilities

The Embedded Experts - Microchip Technology · 2020. 2. 3. · • #ifndef'd options in SEGGER_SYSVIEW_Conf.hto enable definition from project options. • Added callback to notify

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: The Embedded Experts - Microchip Technology · 2020. 2. 3. · • #ifndef'd options in SEGGER_SYSVIEW_Conf.hto enable definition from project options. • Added callback to notify

The Embedded ExpertsYour One-Stop Shop From Development to Production

www.segger.com

Microchip J-32 Freely Available Software Utilities

Page 2: The Embedded Experts - Microchip Technology · 2020. 2. 3. · • #ifndef'd options in SEGGER_SYSVIEW_Conf.hto enable definition from project options. • Added callback to notify

www.segger.com

SEGGER Contact

BOSTONMassachusetts

SILICON VALLEYCalifornia

HEADQUARTERMonheim, Germany

Worldwide Distribution

https://www.segger.com/purchase/distributors/

101 Suffolk LaneGardner, MA 01440, [email protected].: +1-978-874-0299Fax: +1-978-874-0599

Milpitas, CA 95035, [email protected].: +1-408-767-4068

Ecolab-Allee 540789 Monheim am Rhein, [email protected].: +49-2173-99312-0Fax: +49-2173-99312-28

https://www.segger.com/support/technical-support/

Technical Support

Page 3: The Embedded Experts - Microchip Technology · 2020. 2. 3. · • #ifndef'd options in SEGGER_SYSVIEW_Conf.hto enable definition from project options. • Added callback to notify

Microchip J-32 – Overview

www.segger.com

• https://www.microchipdirect.com/product/search/all/DV164232?_ga=2.28615999.200041300.1578495403-298564829.1563378363

J-32 Debug Probe details are available on microchip.com and is available for sale on microchipdirect.

• https://www.microchip.com/Developmenttools/ProductDetails/DV164232

What we know already:

* Images are screenshots taken from Microchip video @ https://www.microchip.com/Developmenttools/ProductDetails/DV164232

Page 4: The Embedded Experts - Microchip Technology · 2020. 2. 3. · • #ifndef'd options in SEGGER_SYSVIEW_Conf.hto enable definition from project options. • Added callback to notify

Microchip J-32 – Advanced Software Utilities

www.segger.com

J-32 also benefits from many available advanced software utilities, many of which are free!

SystemView(V.2x) Live visual analysis of captured tasks, interrupts, timers, API calls and user events. It has minimal system impact and works with all of Microchip’s Arm® Cortex®-M0, M1, M3, M4, M7 and RISC-V based processors.

J-Scope Displays runtime data of multiple variables in an oscilloscope format. Simply connect the J-32 Debug Probe to your target, program and start J-Scope. Each variable can be individually manipulated with familiar oscilloscope controls and features. J-Scope also has minimal system impact and works with all of Microchip’s Arm Cortex-M0, M1, M3, M4, M7 and RISC-V based processors.

Remote Server allows the J-32 Debug Probe to debug from anywhere in the world. This is especially useful when your software expert needs to resolve development or product issues in another region. Remote Server works on all of Microchip’s 32-bit MCU and MPU products.

J-Mem permits direct RAM and Special Function Register (SFR) modifications without a bulky Integrated Development Environment (IDE). Memory can be displayed in an 8-, 16- or 32-bit format and can be exported to a .bin file. J-Mem is compatible with Windows®, macOS® and Linux® operating systems. J-Mem works on all of Microchip’s 32-bit MCU and MPU products.

Free for use with J-32:

Page 5: The Embedded Experts - Microchip Technology · 2020. 2. 3. · • #ifndef'd options in SEGGER_SYSVIEW_Conf.hto enable definition from project options. • Added callback to notify

Microchip J-32 – SystemView (V2.x)

www.segger.com

Free for use with J-32

ARM7, ARM9, ARM11 NoCortex-M0 YesCortex-M1 YesCortex-M3 YesCortex-M4 YesCortex-M7 YesCortex-A, Cortex-R NoPIC32 NoRISC-V Yes

Requires background memory access while the target is running. Supported devices are shown in the table above.

• Continuous real-time recording and live analysis with J-32 and SEGGER RTT technology

• RTOS task, resource, and API tracing• embOS, uC/OS-III, Micrium OS Kernel, and

FreeRTOS instrumentation included• Interrupt tracing• Live analysis of captured data - view responses to

stimuli in real time without stopping the target• SEGGER embOS, embOS/IP, and emFile API call

tracing as standard • Works on any CPU

https://www.segger.com/products/development-tools/systemview/

Page 6: The Embedded Experts - Microchip Technology · 2020. 2. 3. · • #ifndef'd options in SEGGER_SYSVIEW_Conf.hto enable definition from project options. • Added callback to notify

Microchip J-32 – SystemView (V2.x)

www.segger.com

What happens in the System?

On the target system, SystemView records events that happen during runtime. This can be interrupts, timers, task switches and scheduling with an RTOS, API function calls and returns, or user events and messages. The events are retrieved from the target, analyzed and visualized in the SystemView Application, while the target keeps running. The Events Window in SystemView displays the recorded events along with more information.

To keep the communication overhead on the target system low, it only needs to record basic information, such as "API function with Id x has been called with parameter values y and z and n ticks after the last event".SystemView analyzes all information from the events and shows:

• The API function name and its parameters and values• The recording time or system time when the call happened• The task in which the call happened• The duration of the API call

A regular event is 4 to 8 bytes long and takes about 1 us to be recorded at 200 MHz.With 10,000 events per second the overhead added by SystemView is less than 1% of the CPU time and the amount of data is easily within the bandwidth limits of the recorder.The timestamps for events can be as accurate as 1 CPU cycle, which equates to 5 ns on a 200 MHz CPU.

Page 7: The Embedded Experts - Microchip Technology · 2020. 2. 3. · • #ifndef'd options in SEGGER_SYSVIEW_Conf.hto enable definition from project options. • Added callback to notify

Microchip J-32 – SystemView (V2.x)

www.segger.com

What drives the System?

Most embedded systems do not have linear code execution. They implement interrupts for timers and use of peripherals, or might use an RTOS with multiple tasks. SystemViewrecords the runtime behavior of such a system.

The target generates events on enter and leave of interrupts, when tasks become ready for execution, and when a task starts or stops execution. The SystemView Application visualizes these events plotted over the system time in the Timeline Window and shows all other events in the context in which they happen.

This enables easy analysis of when, how long, and why tasks run or what happens on an interrupt.

• Issues and inefficiencies in the system can be identified that way:• Incorrect task priorities or priority inversion leading to starvation• Incorrect inter-task communication• Inefficient delays and timeouts• Spurious or unnecessary interrupts

Page 8: The Embedded Experts - Microchip Technology · 2020. 2. 3. · • #ifndef'd options in SEGGER_SYSVIEW_Conf.hto enable definition from project options. • Added callback to notify

Microchip J-32 – SystemView (V2.x)

www.segger.com

Where is System Time spent?

CPU cycles are limited on embedded systems. Therefore it can be important to optimize the performance of tasks as well as getting the order of execution and the time distribution right.

With the CPU Load Window, SystemView helps analysis of where CPU load is high. With SystemView's information of what happens at or before high-load times, the system can be tuned to avoid such bottlenecks which may lead to delayed execution of important tasks.

The Runtime Window provides additional information about the runtime distribution of contexts. It can be used to verify that each context runs within its timing limits or to find cases where a context unexpectedly runs too long.

Page 9: The Embedded Experts - Microchip Technology · 2020. 2. 3. · • #ifndef'd options in SEGGER_SYSVIEW_Conf.hto enable definition from project options. • Added callback to notify

Microchip J-32 – SystemView (V2.x)

www.segger.com

How to track and measure Performance?

SystemView provides events especially suited to mark certain points in a target system. To easily measure the duration from point A to point B, or from point A through point B to point C, marker start, mark, and marker stop events can be generated. The SystemView Application automatically links corresponding markers and adds more information, such as run time and run count of the measurement.

How to get Log Output?

SystemView also includes logging of messages with a recording. Simple strings can be recorded as log, warning, or error message. The logging functions support formatting of strings, similar to printf(). Since formatting strings can be time-consuming and requires additional memory, this can be deferred to the SystemView Application. The target system simply records the format string and the parameters in an event, and the SystemView Application takes care of formatting the string and prints it in the Terminal Window.

Page 10: The Embedded Experts - Microchip Technology · 2020. 2. 3. · • #ifndef'd options in SEGGER_SYSVIEW_Conf.hto enable definition from project options. • Added callback to notify

Microchip J-32 – SystemView (V2.x) vs (V3.x)

www.segger.com

A new major version of SystemView has been released and there are a number of differences

SystemView V2.x

SystemView V3.x

Licensing:SystemView (V2.x) - FREE for non-commercial and commercial use, limited to 1 Million eventsSystemView PRO (V2.x) - Commercial license $1248

SystemView (V3.x) - FREE for any non-commercial use and evaluation purpose, without any limitationsSystemView (V3.x) - Commercial license $998 (“PRO” version no longer necessary as all features are included)

Technical:

SystemView (V.3x):• Support for data acquisition over IP: Can be used with any target with Ethernet as well as Simulation environments• Support for data acquisition through UART (UART Recorder)• Display Markers (User Events) in timeline.• Added Runtime Information on Timers.• SystemView: Added Names for Timers.• SystemView: Improved (multi) selection of Events.• SystemView: Added drag of Timeline without changing selected events (when Alt key is down).

Target Source:• Added UART Recorder.• Added event to record intermediate Markers between start and stop.• #ifndef'd options in SEGGER_SYSVIEW_Conf.h to enable definition from project options.• Added callback to notify recorder (such as UART Recorder) about new Events.• Renamed User Events to Markers.• Added IP Recorder for embOS and emNet.• Added IP Recorder for embOS Windows Simulation.

All these features are key improvements to the already powerful and very beneficial SystemView.

Page 11: The Embedded Experts - Microchip Technology · 2020. 2. 3. · • #ifndef'd options in SEGGER_SYSVIEW_Conf.hto enable definition from project options. • Added callback to notify

Microchip J-32 – J-Scope

www.segger.com

Free for use with J-32

ARM7, ARM9, ARM11 NoCortex-M0 YesCortex-M1 YesCortex-M3 YesCortex-M4 YesCortex-M7 YesCortex-A, Cortex-R NoPIC32 NoRISC-V Yes

Requires background memory access while the target is running. Supported devices are shown in the table above.

• Show the values of multiple variables in an oscilloscope-like style or in watch panel

• Easily configure J-Scope, and select the symbols to be shown and manage project files.

• Each symbol can be configured separately• Analyze the collected data, scroll through the

visualized graphs, zoom in and out or save the data to a file for further analysis.

• J-Scope can be used in parallel to your debugging environment and extends your IDE's debugging experience.

https://www.segger.com/products/debug-probes/j-link/tools/j-scope/

Page 12: The Embedded Experts - Microchip Technology · 2020. 2. 3. · • #ifndef'd options in SEGGER_SYSVIEW_Conf.hto enable definition from project options. • Added callback to notify

Microchip J-32 – J-Scope

www.segger.com

Easy to get started

• Start J-Scope by double-clicking on the executable.• In the configuration dialog, select your elf-file. For most

targets, the configuration does not have to be specified. If there are any problems, select your target device and configure the interface accordingly.

• Click OK. The Symbol Selection Dialog opens.• Select the symbols of your application, you want to watch

and analyze. Click OK to start J-Scope.

Data Acquisition methods

Data Acquisition via RTT - the target application performs the sampling of the data and stores the results in a RTT buffer, residing in the target's memory. J-Link periodically reads data from the RTT buffer and transfers it to the J-Scope application.

Data Acquisition Via HSS - J-Link periodically reads data from specified addresses on the target in the background, in fixed intervals, and transfers the data to the J-Scope application. In the following, the pro and contra of this technique are explained.

Note: J-32 supports up to 10 variables and has a max sampling frequency of 1 kHz

Page 13: The Embedded Experts - Microchip Technology · 2020. 2. 3. · • #ifndef'd options in SEGGER_SYSVIEW_Conf.hto enable definition from project options. • Added callback to notify

Microchip J-32 – Remote Server

www.segger.com

Free for use with J-32

https://www.segger.com/products/debug-probes/j-link/tools/j-link-remote-server/

Debug from anywhere in the world!

Direct Mode

Usually, the user's computer connects by USB to a J-32, which itself is connected to a target in the same office, typically on the same desk.

LAN Mode

Remote Server's LAN Mode allows the user to connect to a J-Link (and thus its connected target device) over a local area network (LAN). This is ideal for big target hardware that cannot be moved, or for test farms where multiple J-Links are installed.

Tunnel Mode

Remote Server's Tunnel Mode allows the user to connect to a J-32 (and thus its connected target device) over the internet. This means a device located anywhere in the world can be debugged or brought up. One sample use is to gain early access to a new device, such as silicon sitting on distant hardware, where physical shipment is unfeasible. There are also many applications for cloud based services.

Remote Server is also, of course, compatible with SEGGER production programmers, Flashers, allowing full control of the Flash programmer, including the ability to perform remote programming. This saves the time and money of moving hardware or people.

Page 14: The Embedded Experts - Microchip Technology · 2020. 2. 3. · • #ifndef'd options in SEGGER_SYSVIEW_Conf.hto enable definition from project options. • Added callback to notify

Microchip J-32 – J-Link Remote Server

www.segger.com

In LAN Mode

The J-32 software used by the IDE establishes a direct connection between the IDE and the J-Link Remote Server (which translates the IP traffic into USB commands). In this mode, the J-32 is not accessible from outside the LAN, unless the firewall etc. is explicitly configured to allow incoming connections etc. .

In Tunnel Mode

The J-Link Remote Server connects to a Tunnel Server that then manages all connections. From then on the Tunnel Server waits for a client to connect and request a connection to the J-32.

On the IDE side, it is as if the J-32 were connected directly to the PC. A one-time-setup tells the J-32 software to establish a tunneled connection. Optional credentials may be used to protect the connection.

The J-32 software on the IDE side then establishes a connection to the Tunnel Server and identifies the J-32 to connect to by providing either the S/N or a customer chosen name. The Tunnel Server now checks for a registered Remote Server instance and checks that the credentials match.

The Tunnel Server then forwards the traffic between the client (IDE, etc) and J-Link Remote Server. No side is directly connected to the other and therefore neither side is vulnerable. This procedure makes it possible to connect to, and debug, targets behind firewalls.

Customers can also run their own tunnel server if desired.

How it works

In both LAN and Tunnel Modes the J-Link is first connected to a remote PC, via USB or IP, and the Remote Server is started on that PC. From then on the J-Link is accessible from any IDE (Integrated Development Environment) as if it were directly connected to this PC.

Page 15: The Embedded Experts - Microchip Technology · 2020. 2. 3. · • #ifndef'd options in SEGGER_SYSVIEW_Conf.hto enable definition from project options. • Added callback to notify

Microchip J-32 – J-Link Remote Server

www.segger.com

Using the J-Link Remote Server is very easy:

• Connect the J-32 to be remotely accessed to a PC via USB or IP• Download the J-Link Remote Server application (part of the J-Link software package).• Start the Remote Server• Select the appropriate mode (LAN or Tunnel)• Specify credentials (optional)• And you are done

Example: Connecting to the client J-Link CommanderLet's connect to this J-32, which is potentially a couple thousand miles away.We use J-Link Commander as a test client here, but it could be any IDE (e.g. SEGGER Embedded Studio, MPLAB X, etc…)

Just start J-Link Commander and type the following IP command:ip tunnel:<Name/SN>[:<PW>]

On the machine where the Remote Server is running it will now show an active client connection:

From now on, the J-Link can be used as if it were connected directly to this PC.

It's that easy.

For more examples and a troubleshooting guide refer to the SEGGER Wiki.

How it is used

Page 16: The Embedded Experts - Microchip Technology · 2020. 2. 3. · • #ifndef'd options in SEGGER_SYSVIEW_Conf.hto enable definition from project options. • Added callback to notify

Microchip J-32 – J-Mem

www.segger.com

Free for use with J-32.J-Mem is an application that displays memory contents of microcontrollers and allows modifications of RAM as well as special function registers while the target is running. Available for Windows, macOS and Linux, it is included in the J-Link Software and documentation package.

• RAM can be modified• Special Function Registers (SFRs) can be written• Whole regions in RAM can be filled with a desired value• Memory sections can be saved to a .bin file• A periodic refresh of the displayed memory contents can be

set

https://www.segger.com/products/debug-probes/j-link/tools/j-mem/

The memory accesses can be selected to be 8, 16 or 32 bit.J-Mem works nicely when modifying SFRs, especially because it writes the SFR only after the complete value has been entered.

Page 17: The Embedded Experts - Microchip Technology · 2020. 2. 3. · • #ifndef'd options in SEGGER_SYSVIEW_Conf.hto enable definition from project options. • Added callback to notify

Microchip J-32 – Advanced Software Utilities

www.segger.com

Also available for J-32 are Free for non-commercial/educational use as well as paid-for commercial use software.

SystemView(V.3x) Live visual analysis of captured tasks, interrupts, timers, API calls and user events. It has minimal system impact and works with all of Microchip’s Arm® Cortex®-M0, M1, M3, M4, M7 and RISC-V based processors.

Embedded Studio Powerful C/C++ IDE (Integrated Development Environment) for embedded systems. It is specifically designed to provide users with everything needed for professional embedded C programming and development: An all-in-one solution providing stability and a continuous workflow for any development environment. Works with all of Microchip’s Arm Cortex-M0, M1, M3, M4, M7 and RISC-V based processors.

Upgrade BASE to PLUS further empower your J-32 to upgrade its features to match that of a J-Link PLUS. This includes licenses for all of the following components:

• J-Flash / J-Flash SPI • J-Link Unlimited Flash Breakpoints • Ozone - The J-Link Debugger• Monitor Mode• J-Link ARM RDI / RDDI

Free for non-commercial/educational and paid-for commercial for J-32:

Page 18: The Embedded Experts - Microchip Technology · 2020. 2. 3. · • #ifndef'd options in SEGGER_SYSVIEW_Conf.hto enable definition from project options. • Added callback to notify

Click To Edit Master Title Style

SEGGER Microcontroller GmbH

Ecolab-Allee 540789 Monheim am Rhein

[email protected].: +49-2173-99312-0Fax: +49-2173-99312-28

www.segger.com