Seeing Inside your Target at Run-Time with µC_Probe_LabProcedures

30 144 0
Seeing Inside your Target at Run-Time with µC_Probe_LabProcedures

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

LAB PROCEDURE Micriµm’s µC/Probe Page 1 of 30 Seeing Inside your Target at Run-Time with µC/Probe RX Architecture - RX63N Description: This lab will show you how to use Micriµm’s highly innovative product called µC/Probe. This Windows-based application allows you to visualize run-time variables in your target using numeric indicators, gauges, meters, bitmaps, graphs and more. You can also change the value of variables using sliders, buttons and other objects. You can use µC/Probe very early in your product development, during the testing phases of your product and even in the field. Lab Sections 1 Lab #1 - Setup 3 2 Lab #2 - Advanced Controls 12 3 Lab #3 - Graphs 23 4 Lab #4 – Save/Restore and Line Graphs in Scope Mode 29 Lab Objectives 1. Become familiar with Micriµm’s µC/Probe 2. Monitor run-time data on the RX 3. Change the value of run-time target variables Skill Level 1. Understand Embedded Systems 2. Understand C Time to Complete Lab 15 Minutes Each Lab Materials • RX63N Development Kit (YRDKRX63N) • µC/Probe V3.1.xx.yyy • Target code .ELF file • µC/Probe Workspaces • µC/Probe provided images LAB PROCEDURE Micriµm’s µC/Probe Page 2 of 30 µC/Probe Lab #1 – Setup LAB PROCEDURE Micriµm’s µC/Probe Page 3 of 30 1 Lab #1 - Setup Overview: The latest version of µC/Probe is already pre-loaded onto the PC you will be using in the lab. The board for the lab is also pre-loaded with all the example code we will be using for these labs. There is no need to setup any tools beyond simply connecting the YRDKRX63N using the USB cable to the PC. Board Setup Step 1.1 Remove the YRDKRX63N from its packaging. Step 1.2 Connect one end of the USB cable provided in the blister-pack into a free USB port on the PC. Step 1.3 Connect the other end into the ‘USER USB’ connector on the bottom right of the YRDKRX63N board. You should see LED activity on the circular LED display. Setting up µC/Probe Step 1.4 Start µC/Probe by clicking on the µC/Probe icon: After a few seconds, you should see the following Splash Screen, followed by the µC/Probe application. The µC/Probe application is located in C:\Micrium\µC-Probe directory in case you can’t find it on the task bar. Insert the small end of the USB cable here Circular LED Display LAB PROCEDURE Micriµm’s µC/Probe Page 4 of 30 Step 1.5 Your target should be running but, µC/Probe needs to know what the names of all the variables, their memory location and their data types are in order to assign them to µC/Probe objects. Step 1.6 Load the .ELF file for the project. You do this by clicking on the green PLUS-sign on the bottom left of the µC/Probe screen as shown below. LAB PROCEDURE Micriµm’s µC/Probe Page 5 of 30 Step 1.7 The ELF file of the code already loaded into the RX63N evaluation board is found in the C:\Renesas\DevCon2012\Micrium\Micrium-uC-Probe-RX63N.ELF file. Simply browse to that directory as shown below and double click on the file to load it into µC/Probe. Step 1.8 1) Click on the ‘Settings’ menu as shown below 2) Select the J-Link interface 3) Move the slider to set the ‘Speed’ to 12000. This will allow the J-Link connection to communicate with the target as fast as it can. 4) Browse to the path where the J-Link DLL is located. For convenience, we placed the DLL into the same directory (i.e. Folder) as the ELF file: C:\Renesas\DevCon2012\Micrium\JLink.DLL 5) Click ‘OK’ when done. Add Symbol Table LAB PROCEDURE Micriµm’s µC/Probe Page 6 of 30 Testing with one variable Step 1.9 Click on the ‘Numerics’ object (bottom left) in the ‘Toolbox’ and click on the ‘Numeric 2’ icon (top left) as shown below. (1) Click Here (3) Move the slider to 12000 KHz (4) Browse to the latest ‘Segger J-Link DLL’ (2) Select ‘Segger J-Link’ (1) Select ‘Numerics’ (2) Select ‘Numeric 2’ LAB PROCEDURE Micriµm’s µC/Probe Page 7 of 30 Step 1.10 Drag-and-Drop ‘Numeric 2’ onto ‘DataScreen1’ as shown below. Step 1.11 Type the name ‘OSTickCtr’ in the ‘Symbol Browser’ window as shown below. Step 1.12 Double click to the left of the variable name (OSTickCtr). You will see OSTickCtr appear below the numeric indicator. Step 1.13 Click on the ‘Run’ icon on the upper left corner of µC/Probe. You should see the value of OSTickCtr update live on the numeric indicator. If the number ‘overflows’ the numeric indicator, simply click on the ‘Stop’ button on the upper left and ‘resize’ the numeric indicator by grabbing and moving one of the corners of the numeric indicator. LAB PROCEDURE Micriµm’s µC/Probe Page 8 of 30 Step 1.14 Since this is a large number, we’d like to separate thousands with ‘commas’. You can easily do that by ‘stopping’ µC/Probe (the target is not stopped) and click on the numeric object. You should see a ‘Property’ screen as shown below: Step 1.15 Simply click on the ‘Thousand Separator’ checkbox and then click on the ‘Run’ button. What µC/Probe is doing is its asking the target (through the J-Link) for the latest value of OSTickCtr and displaying it using the numeric indicator. Since there is only one object on the screen, µC/Probe will continuously ask for the same variable, as quickly as it can to update the value. Properties Editor Thousand Separator LAB PROCEDURE Micriµm’s µC/Probe Page 9 of 30 Writing and Reading variables Step 1.16 Click on the object and press the ‘Delete’ key to delete the numeric indicator and thus clear the data screen. Step 1.17 Now, drag and drop two objects: ‘Linear Gauge 2’ (see ‘Linear Gauges’ in the Toolbox) and ‘Slider’ (see ‘Slider’ in the ‘Writable Controls’). Then, assign ‘AppSlider1’ (from the symbol browser. Click on the ‘Run’ icon. Move the slider and you should see the linear gauge move proportionally. Edit Mode Run Mode Now, if you click on the ‘Run’ button in µC/Probe, the number should be easier to read because thousands are separated by a comma. Each object has a ‘Properties Editor’ allowing you to adjust the behavior of each object to your liking. Some properties are obvious and you can thus easily figure out what the property does. Others are not as obvious and we’ll explain each one as needed. The ‘Scaling Factor’ property allows you to multiply the variable by a ‘factor’. For example, I might decide that I’d like the value to be multiplied by 100 or 0.01. The ‘Scaling Offset’ property allows you to add a value to the multiplied property. Both of these allow you to create a simple equation of the form: y = m * X + b which you should be able to recognized as being a linear equation where ‘m’ is the scaling factor, ‘X’ is the symbol (or variable) assigned to the indicator and ‘b’ is the scaling offset. An example of this is to convert degrees Celsius to Degrees Fahrenheit. So, if ‘X’ (the variable being monitored) reads a degrees C temperature sensor but, you’d like to display the value in µC/Probe in degrees Fahrenheit then you’d set the ‘Scaling Factor’ to 1.8 and the ‘Scaling Offset’ to 32. Unfortunately, at this time, µC/Probe doesn’t allow you to go the other way because we’d need to first subtract 32 from the sensor and then divide by 1.8. LAB PROCEDURE Micriµm’s µC/Probe Page 10 of 30 What we did here is assign a control (slider) to change the value of a variable ‘AppSlider1’. We also assigned ‘AppSlider1’ to a display object (the linear gauge) in order to see the behavior of the slider. ‘AppSlider1’ is a variable that resides in the target (i.e. RX63N board) and is declared as follows: static CPU_INT16U AppSlider1; In the application on the RX63N, AppSlider1 is not actually used in the code (the variable is simply declared). µC/Probe simply reads the current value and displays it on the linear gauge. It’s important to notice that: We never had to stop the target nor did we have to rebuild the code! [...]... button and see the ‘Task(s)’ tab update with the target s run-time task information The screen might require scrolling left and right to see all the information collected for each task Micriµm’s µC/Probe Page 20 of 30 LAB PROCEDURE Of particular interest are: 1) The ‘Item’ indicates the order in which tasks were created The largest number indicates the first task created In this case, ‘13’ is the item... see that the microphone is picking up the sound Try to synchronize your clapping with the other attendees to see how much signal you can capture on your ‘scope’ Step 4.5 Change the mode to ‘Trig Mode’ and repeat step 4.4 Step 4.6 Make sure you clap for at least 1 minute In fact, you can also shout and say something like “This product is Awesome!”, “Micrium is great!”, “This is the best class at DevCon... data is updates on the right hand side of the graphs and ‘scrolls’ to the left revealing previous values The leftmost values are thus the oldest values and the rightmost value is the latest Scope-mode emulates an oscilloscope where the data starts on the left, new values are placed to the right of the previous value and when the graph is full, the data is plotted from the left In burst-mode, the data... ‘Toggle Button’ onto the data screen as shown below Assign ‘AppSw1’ to this button Step 2.14 Drag-and-Drop another ‘Bitmap’ control above the button Assign ‘AppSw1’ to this bitmap object This time, you’ll add an LED image A zero state will be dark and a 1 state will be lit (red) Your data screen should look as shown below Click on the ‘Run’ button and notice that the LED changes state whenever you click... Slider Label’ You should also notice that as you move the slider around, it snaps to where the tick marks are That’s because you selected the ‘Use Discrete Values’ option This feature is very useful to use the slider as a ‘selector’ of options We’ll demonstrate this next Bitmap Animations (Variable value mapping to a picture) Step 2.9 Now add the ‘Bitmap Animation’ next to the numeric value and assign... graph is full, the data is plotted from the left In burst-mode, the data is displayed from an array that resides in the target s memory All points of the array are read and displayed at once It’s the application’s responsibility to update the array, whether circularly or once New Workspace Step 3.1 Create a ‘New Workspace’ by clicking on the ‘File’ then ‘New Workspace’ item Answer ‘Don’t Save’ when prompted... Micriµm’s µC/Probe Your µC/Probe screen Page 23 of 30 LAB PROCEDURE Step 3.4 Assign ‘ECG_Value’ to the line chart Step 3.5 Click on the ‘Run’ button and you will see a ‘simulated’ ECG waveform as shown below: Micriµm’s µC/Probe Page 24 of 30 LAB PROCEDURE Of course, the ECG waveform is simulated since we are not actually connected to a patient Also, the ECG waveform is played back at a slower rate because... (Dimmer_VoltageRMS) Add a numeric indicator to display this value Do the same to display the RMS power (i.e Watts), Dimmer_PowerRMS Your screen should look something like this: Questions 1 What kind of load are we controlling? 2 Why would we want to control the phase angle instead of the voltage amplitude? 3 How would you synchronize with the power line? 4 What device would you use to control the phase... Micriµm’s µC/Probe Page 28 of 30 LAB PROCEDURE 4 Lab #4 – Save/Restore and Line Graphs in Scope Mode Overview: Within minutes, you can create quite sophisticated screens using µC/Probe but it would be a shame to lose all that work once you close the application As expected, though, you can save your workspace for future use Save Workspace Step 4.1 Assuming you still have the previous workspace opened,... collect data from the target The code on the RX63N runs a task that reads the ‘microphone’ on the target and stores the amplitude on a line graph The microphone is actually sampled at 1,000 Hz The bottom graph is configured for scope mode The code in the RX63N actualy implements a ‘triggered scope’ or a ‘continuous scope’ You can select either one by clicking on the push button Step 4.4 Clap your hands . Micriµm’s µC/ Probe Page 1 of 30 Seeing Inside your Target at Run-Time with µC/ Probe RX Architecture - RX63N Description: This lab will show you how to use Micriµm’s highly innovative product. Lab Materials • RX63N Development Kit (YRDKRX63N) • µC/ Probe V3.1.xx.yyy • Target code .ELF file • µC/ Probe Workspaces • µC/ Probe provided images LAB PROCEDURE Micriµm’s µC/ Probe. up µC/ Probe Step 1.4 Start µC/ Probe by clicking on the µC/ Probe icon: After a few seconds, you should see the following Splash Screen, followed by the µC/ Probe application. The µC/ Probe

Ngày đăng: 22/06/2015, 14:19

Từ khóa liên quan

Mục lục

  • 1 Lab #1 - Setup

    • Step 1.1 Remove the YRDKRX63N from its packaging.

    • Step 1.2 Connect one end of the USB cable provided in the blister-pack into a free USB port on the PC.

    • Step 1.3 Connect the other end into the ‘USER USB’ connector on the bottom right of the YRDKRX63N board. You should see LED activity on the circular LED display.

    • Step 1.4 Start µC/Probe by clicking on the µC/Probe icon:

    • 2 Lab #2 - Advanced Controls

      • Step 2.1 Create a ‘New Workspace’ by clicking on the ‘File’ then ‘New Workspace’ item. Answer ‘Don’t Save’ when prompted.

      • Step 2.2 Load the same symbol table ‘Micrium-uC-Probe-RX63N.ELF’ from the ‘C:\Renesas\DevCon2012\Micrium’ directory.

      • Step 2.3 The first control we’ll look at in this second lab is the ‘Text Tool’ which can be found in the ‘Miscellaneous’ toolbox as shown below.

      • Step 2.4 Drag-and-Drop the ‘Text Tool’ onto the Data Screen. It should look as shown below.

      • Step 2.5 At this point, you have two choices:

      • 1) You can assign the ‘Text’ control to a symbol as you have done in the previous lab. In this case, you can also change some properties which affect a numerical value (Scaling Factor, Scaling Offset, Decimal Places, Leading Zeros and Thousand Separator).

      • 2) If you DO NOT assign a symbol to the ‘Text’ control then you can use it as a ‘comment’ or ‘label’ for other controls.

      • Either way, you can change the properties of the ‘Text’ (Font type, Font size, horizontal alignment, Color, etc.).

      • Step 2.6 You can how add a slider to you screen and move the text either above or below the slider. You can assign ‘AppSlider1’ to your slider. Your screen should look as shown below. As you can see, we used the Text Tool as a label.

      • Step 2.7 Add another Text object right next to the slider but this time, assign AppSlider1 to that object. Click on the ‘Run’ button and move the slider. You will notice that the first text object remains as a comment and the second one tracks the value of the slider.

      • Step 2.8 Click on the ‘Stop’ button and now change the property of the slider as follows:

      • Step 2.9 Now add the ‘Bitmap Animation’ next to the numeric value and assign the bitmap object to ‘AppSlider1’ as shown below.

      • Step 2.10 Click on the ‘Bitmap’ object’s properties. You should see the following screen.

      • Step 2.11 Click on the ‘…’ button of the ‘Path’ settings and browse to the C:\Renesas\DevCon2012\Micrium\Bitmap directory and select the ‘Small Renesas Logo’ image called ‘Logo-Renesas-200px.jpg’. Set the ‘value’ property for this image to 0. You should see the following screen:

      • Select ‘Image 2’ in the properties of the bitmap object and this time, select the green ‘traffic light’ image called ‘Traffic-G-S.jpg’. Set its ‘Value’ property to 1.

      • Step 2.12 Click on the ‘Run’ button and move the slider between values 0 to 4. The image you will see will depend on the slider value.

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan