Rob Ostapiuk
Microchip Technology
1501 IDE
Slide
1501 IDE
Slide
1501 IDE
Slide
Rationale
Why make such a big change?
Rationale
1501 IDE
Slide
Rationale
Why the NetBeans IDE?
1501 IDE
Slide
Rationale
Why the NetBeans IDE?
1501 IDE
Slide
Rationale
Why not the Eclipse IDE?
More advanced
Less bloated / faster
More intuitive
1501 IDE
Slide
C Compilers for
MPLAB
X IDE
1501 IDE
Slide
MPLAB XC Compilers
Coming in June 2011
HI-TECH PICC Based
MPLAB XC8
MPLAB XC16
MPLAB XC32
8-bit Compiler
16-bit Compiler
32-bit Compiler
PIC10, PIC12,
PIC16, PIC18
PIC24,
dsPIC30, dsPIC33
PIC32
1501 IDE
Slide
10
Major Differences
An overview of the most significant
changes over MPLAB IDE 8
1501 IDE
Slide
11
Major Differences
USB Drivers
MPLAB IDE 8
MPLAB X IDE
1501 IDE
Slide
12
Major Differences
USB Drivers
1501 IDE
Slide
13
Major Differences
USB Communications Link with Hardware Tools
MPLAB IDE 8
1501 IDE
Slide
14
Major Differences
Projects and Workspaces
MPLAB IDE 8
Projects contain:
Basic project settings, project files and locations, target device
Workspaces contain:
Open projects, window placement, build and debug tools
MPLAB X IDE
Projects contain:
Everything no workspaces needed
Project Groups:
List of projects to simplify opening up multiple related projects
that are frequently opened together
2011 Microchip Technology Incorporated. All Rights Reserved.
1501 IDE
Slide
15
Major Differences
Project Files and Structure
MPLAB IDE 8
1501 IDE
Slide
16
Major Differences
Project Files and Structure
Automatically Generated Project Directory Structure
Local Disk (C:)
RTC
Project Location (User's choice)
TLS0101
Lab1
build
default
debug
production
dist
default
debug
production
nbproject
private
17
Major Differences
Project Based IDE
MPLAB IDE 8
MPLAB X IDE
1501 IDE
Slide
18
Major Differences
Debug/Release Build Settings
MPLAB IDE 8
Build All
MPLAB X IDE
Debug
Build (Make)
Run Project
Program Target
1501 IDE
Slide
19
Major Differences
Legacy Tool Support
1501 IDE
Slide
20
Overview
A quick look at MPLAB X IDE's components
1501 IDE
Slide
21
Start Page
Learn & Discover Tab
1501 IDE
Slide
22
Start Page
1501 IDE
Slide
23
Start Page
Whats New Tab
1501 IDE
Slide
24
IDE Layout
1501 IDE
Slide
25
IDE Layout
Main Toolbar
Main Toolbar
Most frequently used functions have buttons here. The toolbar is
somewhat dependent on context, automatically adding or removing
buttons depending on what tasks are currently being performed.
The toolbar is fully customizable.
1501 IDE
Slide
26
IDE Layout
Project Window / Project Tree
Project Tab
Just like version 8s Project window: A virtual representation of your
projects files that does not correspond to their organization on your hard
drives file system. The categories are there for your convenience you
can ignore them, delete them, edit them or add your own.
Files Tab
This is a mini-file manager, showing the true layout of your projects files on
your hard drive. Anything you do to a file here will be done to the real file
on your hard drive.
Classes
Similar to version 8s Symbols tab: Lists all the types, constants, variables
and functions defined in your project. Double clicking on an item will open
the source file and place the cursor where it is declared (or defined if
available).
Services
Mostly unused for embedded development. May be of value if connecting
to a version control system from within the IDE.
1501 IDE
Slide
27
IDE Layout
Project Environment Tab
1501 IDE
Slide
28
IDE Layout
Navigator
Navigator
Lists all symbols and header files in the currently selected source file in
alphabetical order. Double clicking takes you to the declaration.
1501 IDE
Slide
29
IDE Layout
Editor
Editor
All new editor boasts many advanced features never before available in
MPLAB IDE.
2011 Microchip Technology Incorporated. All Rights Reserved.
1501 IDE
Slide
30
IDE Layout
Editor Toolbar
Editor Toolbar
Editor specific functions are conveniently located in a toolbar just under the
editor document tabs.
1501 IDE
Slide
31
IDE Layout
Glyph Margin
Glyph Margin
Line numbers and live parsing notification icons are displayed here.
Double clicking here sets a breakpoint.
1501 IDE
Slide
32
IDE Layout
Error Stripe
Error Stripe
Representing the entire length of the file (not just what is visible), this
gives you a quick overview of errors, warnings and other issues in
your code.
1501 IDE
Slide
33
IDE Layout
Output Window
Output Window
Displays results of current build as well as communications with
debug tool / programmer. Many other tabs also open in this region.
1501 IDE
Slide
34
1501 IDE
(Windows Only)
Slide
35
1501 IDE
Slide
36
1501 IDE
Slide
37
1501 IDE
Slide
38
1501 IDE
Slide
39
1501 IDE
Slide
40
1501 IDE
Slide
41
button
1501 IDE
Slide
42
1501 IDE
Slide
43
Click on the
2011 Microchip Technology Incorporated. All Rights Reserved.
OK
button
1501 IDE
Slide
44
ASSEMBLER
picc.exe
picc18.exe
dspicc.exe
pic32.exe
mpasmwin.exe
pic30-as.exe
pic32-as.exe
1501 IDE
Slide
45
Lab 1
How to create a new standalone project
1501 IDE
Slide
46
Lab 1
How to create a standalone project
Purpose
1501 IDE
Slide
47
Lab 1
How to create a standalone project
Objective
Increase or decrease
count variable with S4
and S3 respectively
S3
Decrease
count
2011 Microchip Technology Incorporated. All Rights Reserved.
1501 IDE
D7 & D6
(RA4 & RA3)
S4
Increase
count
Slide
48
Lab 1
How to create a standalone project
Objective
Lab1.c
main()
delay()
RESET
Delay
Configure
Peripherals
Initialize Count
Count-Write to LCD
Toggle LEDs
Count = 0?
Delay
Return
1501 IDE
Slide
49
Lab 1
How to create a standalone project
Procedure
Select Device
Select
Debug Tool
Select
Build Tool
Create
Project
Add
Files
Select
Project Location
Library Files
liblcd24.x.a
Source Files
Debug
Run
Lab1.c
1501 IDE
Slide
50
Lab 1
How to create a standalone project
Procedure
MPLAB X
IDE
1501 IDE
Slide
51
Lab 1
How to create a standalone project
Launch the New Project Wizard
Click
on the toolbar
or
Select from the menu:
File New Project
1501 IDE
Slide
52
Lab 1
How to create a standalone project
Choose Project
Under Categories select:
Microchip Embedded
Under Projects select:
Standalone Project
Click
Next >
1501 IDE
Slide
53
Lab 1
How to create a standalone project
Select Device
For Family select:
PIC24
For Device select:
PIC24FJ128GA010
Click Next >
1501 IDE
Slide
54
Lab 1
How to create a standalone project
Select Header
No headers are required for
the devices used in this
class. Leave the box
unchecked.
1501 IDE
Slide
55
Lab 1
How to create a standalone project
Select Tool
Click on the serial number
below the name of the tool
you are using.
1501 IDE
Slide
56
Lab 1
How to create a standalone project
Select Compiler
Click on the compiler with a
version number below the
name of the compiler you
are using. You may need to
click on the '+' to expand
the list under each compiler
name.
If you dont see a version
number under a compiler
name then it either isnt
installed or the IDE cannot
find it.
1501 IDE
Slide
57
Lab 1
How to create a standalone project
Select Project Name and Folder
Enter a Project Name:
Lab1
Enter a Project Location:
C:\RTC\TLS0999
A folder with the project name will be
created in the project location.
My Computer
Local Disk (C:)
MTT
TLS0999
Lab1
Click
Project Location
Project Name
Finish
1501 IDE
Slide
58
Lab 1
How to create a standalone project
Add files to the new project
In the project tree, right click
on the appropriate logical
folder and select Add
Existing Item from the
popup menu.
Add the following files from
the Lab1.X directory:
Header Files:
libLCD24.h
Library Files:
libLCD24.X.a
Source Files:
Lab1.c
Use the default of Relative
paths for now
2011 Microchip Technology Incorporated. All Rights Reserved.
1501 IDE
Slide
59
Lab 1
How to create a standalone project
Path Storage
Example
Relative
Absolute
.. = Go up one level
. = Project directory
Auto
(C:)
com
utils.c
C:\com\utils.c
..\com\utils.c
C:\com\utils.c
uses absolute
project
main.c
C:\project\main.c
.\main.c
.\main.c
uses relative
sub
fn.c
C:\project\sub\fn.c
.\sub\fn.c
.\sub\fn.c
uses relative
1501 IDE
Slide
60
Lab 1
How to create a standalone project
Build and Run Project
Build the project to ensure
that everything was done
properly.
1501 IDE
Slide
61
Lab 1
How to create a standalone project
Results
If everything was done
correctly, you should see
"MPLAB X" on the LCD
and two of the LEDs should
be blinking.
When done:
Click on the Pause button:
1501 IDE
Slide
62
Lab 1
How to create a standalone project
Conclusions
1501 IDE
Slide
63
1501 IDE
Slide
64
MPLAB X IDE
Make
Build Project
Build All
1501 IDE
Slide
65
MPLAB X IDE
Debug Mode
Debug Project
Make
Program Target Device
Debug Mode
Make
Program Target Device
Reset
Run (optional)
Reset
Run
In most situations, it is not
necessary to hit the "Build"
or "Clean and Build" button
before hitting this button.
2011 Microchip Technology Incorporated. All Rights Reserved.
1501 IDE
Slide
66
1501 IDE
Slide
67
MPLAB X IDE
Release Mode
Make
Program Target Device
1501 IDE
Slide
68
MPLAB X IDE
Release Mode
Run Project
Make
Program Target Device
Release Mode
Make
Program Target Device
Release from Reset (Run)
1501 IDE
Slide
69
1501 IDE
Slide
70
1501 IDE
Slide
71
1501 IDE
Slide
72
1501 IDE
Slide
73
1501 IDE
Slide
74
1501 IDE
Slide
75
1501 IDE
Slide
76
1501 IDE
Slide
77
1501 IDE
Slide
78
1501 IDE
Slide
79
1501 IDE
Slide
80
1501 IDE
Slide
81
Default Buttons
New File
Build
New Project
Open Project
Save All
Program Target
Undo
Read Target
Redo
Hold in Reset
default
Project
Configuration
2011 Microchip Technology Incorporated. All Rights Reserved.
Quick Search
Slide
82
1501 IDE
Slide
83
1501 IDE
Slide
84
Bottom of
world's
longest
popup
menu
2011 Microchip Technology Incorporated. All Rights Reserved.
1501 IDE
Slide
85
FileProject Properties
General
If using source files
from outside the
project directory, paths
to their directories
should be added here.
1501 IDE
Slide
86
Select
Debug
Tool
Select
Build
Tool
1501 IDE
Slide
87
Categories
(Same as MPLAB IDE 8)
Debugging and
Programming
options including:
Memory Ranges
Memory Preservation
Freeze Peripherals
Trace
Clock
Set options
for selected
debug tool
1501 IDE
Slide
88
Assembler options
including:
Categories
(Same as MPLAB IDE 8)
Version
Assembler Includes
Macro Expansion
Set options
for assembler
1501 IDE
Slide
89
Compiler options
including:
Categories
(Same as MPLAB IDE 8)
Version
Memory Model
Optimization
ANSI Compliance
Set options
for compiler
1501 IDE
Slide
90
Linker options
including:
Heap Size
Stack Size
Library Paths
Symbols
Categories
(Same as MPLAB IDE 8)
Version
Set options
for linker
1501 IDE
Slide
91
opens the
project properties
window
2011 Microchip Technology Incorporated. All Rights Reserved.
1501 IDE
Slide
92
Project Configurations
1501 IDE
Slide
93
1501 IDE
Slide
94
1501 IDE
Slide
95
1501 IDE
Slide
96
1501 IDE
Slide
97
1501 IDE
Slide
98
#ifdef EXPENSIVE_VERSION
lcdPutStr("Expensive");
#endif
#ifdef CHEAP_VERSION
lcdPutStr("Cheap");
#endif
1501 IDE
Slide
99
1501 IDE
Slide
100
Tab Navigator
Maximize
or Restore
Editor
Editor
Toolbar
Glyph
Margin
Error
Stripe
1501 IDE
Slide
101
Previous Edit
Next Edit
Find Selection
Comment
Uncomment
Go to Header/Source
Previous Bookmark
Next Bookmark
Toggle Bookmark
* Next and Previous Edit buttons become active after using Navigate Go to X
2011 Microchip Technology Incorporated. All Rights Reserved.
1501 IDE
Slide
102
1501 IDE
Slide
103
1501 IDE
Slide
104
When multiple
glyphs are required
on a line, a small
black arrow
pointing down
appears to the right
of one glyph.
Clicking on the
arrow will cycle
through the glyphs.
1501 IDE
Slide
105
Color Code
Clickable
Warnings
Errors
Occurrences
Breakpoint
Bookmark
Suggestion
Multiple Items
Error Stripe
Error
Cursor
Position
2011 Microchip Technology Incorporated. All Rights Reserved.
1501 IDE
Slide
106
1501 IDE
Slide
107
1501 IDE
Slide
108
1501 IDE
Slide
109
Ctrl
1501 IDE
+
Slide
110
Matching Brace
Selected Brace
1501 IDE
Slide
111
Go To Declaration
Go To Source
Go To Type
Go To File
Go To Symbol
Go To Line
1501 IDE
Slide
112
Lists identifiers
and symbols
for current file
Double click on
an item to jump
to its
declaration
1501 IDE
Slide
113
Lists identifiers
for the project
Double click to
jump to
declaration
1501 IDE
Slide
114
Unfolded / Expanded
Folded / Collapsed
1501 IDE
Slide
115
1501 IDE
Slide
116
1501 IDE
Slide
117
1501 IDE
Slide
118
wh
Editor expands this into:
while (exp) {
}
Type in a value for exp and press Enter key. The cursor will be
automatically placed inside the braces.
1501 IDE
Slide
119
1501 IDE
Slide
120
#ifdef EXPENSIVE_VERSION
lcdPutStr("Expensive");
#endif
#ifdef CHEAP_VERSION
lcdPutStr("Cheap");
#endif
//TODO Translate to Spanish
lcdPutCur(1, 0);
lcdPutInt(count, DEC);
LATLED = 0x0010;
TRISLED = 0xFF00;
1501 IDE
Slide
121
1501 IDE
Slide
122
1501 IDE
Slide
123
End Debug
Session
Ends a debug session.
If connected to a hardware
debugger, this severs the
USB connection. This must
be done before making
changes to code and
continuing to debug.
2011 Microchip Technology Incorporated. All Rights Reserved.
Slide
125
MPLAB IDE 8
No Equivalent
MPLAB X IDE
Halt / Pause
Run / Continue
Animate
Run To Cursor
In Context Menu
Step Into
Step Over
Step Out
Reset
Focus Cursor at PC
2011 Microchip Technology Incorporated. All Rights Reserved.
1501 IDE
Slide
126
Breakpoints
How to set or clear a breakpoint
Line Breakpoints
1501 IDE
Slide
127
Breakpoints
How to set a conditional line breakpoint
Conditional Line
Breakpoints
Select from the menu
Debug New Breakpoint
Choose Line as the
Breakpoint Type
Specify the data File
and Line Number
settings
(automatically populated
from cursor position)
1501 IDE
Slide
128
Breakpoints
How to set a conditional data breakpoint
Conditional Data
Breakpoints
Select from the menu
Debug New Breakpoint
Choose Data as the
Breakpoint Type
Specify the data
Address and Breaks on
settings
Specify the Pass count
Condition
1501 IDE
Slide
129
Breakpoints
How to view all breakpoints in a project
Show Breakpoint
Window
Select Debug New
Breakpoint
1501 IDE
Slide
130
Watches
How to display the Watches tab
From the main menu
select: Window
Debugging Watches
1501 IDE
Slide
131
Watches
How to add a variable to the watches tab
(Optional) Highlight
variable in editor
Do one of the following:
Right click in editor and
select New Watch from
the popup menu
Shift
F7
1501 IDE
Slide
132
Watches
How to change a watch variable's radix
Right click on a value in
the Value column
Select from the popup
menu:
Display Value As
Choose the desired
radix / format:
Character
Hexadecimal
Decimal
IEEE Float
Binary
Octal
Fractional Integer
1501 IDE
Slide
133
Watches
How to change a watch variable's value
Double click on a value
in the Value column
Enter a new value and
hit the Enter key when
done
1501 IDE
Slide
134
Watches
How to sort watch variables
Default
(Fields Sorted Numerically)
1st Click:
Sort Ascending (Alphabetically)
2nd Click:
Sort Descending (Alphabetically)
3rd Click:
Default
1501 IDE
Slide
135
Memory Windows
How to view embedded memory
From the main menu
select: Window
PIC MCU Memory
Views Memory View n
Slide
136
Memory Windows
How to change a memory location's value
Double click on
a cell and start
typing the new
value hit
Enter when
done
1501 IDE
Slide
137
Memory Windows
How to fill memory
Right click in
memory window
and select Fill
Memory from
the popup menu
1501 IDE
Slide
138
Memory Windows
How to quickly jump to a specific address
1501 IDE
Slide
139
Call Stack
How to view the call stack
1501 IDE
Slide
140
Instrumented Trace
How to enable the Trace function
Open the Project
Properties dialog by
right clicking on the top
node of the project and
selecting Properties
from the popup menu.
Under Categories
select Real ICE
Select Trace from the
Option Categories
combo box
Select Use
Instrumented Trace
next to Trace Selection
1501 IDE
Slide
141
Instrumented Trace
How to insert Trace Code
Right click in the editor
where you want to insert
the trace code
Select from the popup
menu either:
Insert C Line Trace
Log Selected C Value
1501 IDE
Slide
142
Instrumented Trace
How to view Trace output
From the main menu
select: Window
Debugging Trace
1501 IDE
Slide
143
1501 IDE
Slide
144
1501 IDE
Slide
145
1501 IDE
Slide
146
1501 IDE
Slide
147
1501 IDE
Slide
148
1501 IDE
Slide
149
1501 IDE
Slide
150
After Conversion
1501 IDE
Slide
151
1501 IDE
Slide
152
Lab 2
Converting an MPLAB IDE 8 Project
to MPLAB X IDE
2011 Microchip Technology Incorporated. All Rights Reserved.
1501 IDE
Slide
153
Lab 2
1501 IDE
Slide
154
Lab 2
1501 IDE
Slide
155
Lab 2
1501 IDE
Slide
156
Lab 2
1501 IDE
Slide
157
Lab 2
Microchip Embedded
Under Projects select:
Standalone Project
Click Next >
1501 IDE
Slide
158
Lab 2
1501 IDE
Slide
159
Lab 2
1501 IDE
Slide
160
Lab 2
Next >
1501 IDE
Slide
161
Lab 2
1501 IDE
Slide
162
Lab 2
1501 IDE
Slide
163
Lab 2
1501 IDE
Slide
164
Lab 2
1501 IDE
Slide
165
Lab 2
1501 IDE
Slide
166
Lab 2
1501 IDE
Slide
167
1501 IDE
Slide
168
1501 IDE
Slide
169
Current
Active Project
New
Active Project
1501 IDE
Slide
170
1501 IDE
Slide
171
Main Project
Selected Project,
but not Active
1501 IDE
Slide
172
Trademarks
The Microchip name and logo, the Microchip logo, dsPIC, KeeLoq, KeeLoq logo,
MPLAB, PIC, PICmicro, PICSTART, PIC32 logo, rfPIC and UNI/O are registered
trademarks of Microchip Technology Incorporated in the U.S.A. and other
countries.
All other trademarks mentioned herein are property of their respective companies.
1501 IDE
Slide
173