Sm@rtCafé Professional Toolkit 2.0
description
Transcript of Sm@rtCafé Professional Toolkit 2.0
Sm@rtCafé Professional Toolkit V2.0
C:\Presentations - SmartCafe_Prof_V2.0 - bsc - 22.02.01 - page 1
Sm@rtCafé Professional Toolkit 2.0
Sm@rtCafé Professional Toolkit V2.0
C:\Presentations - SmartCafe_Prof_V2.0 - bsc - 22.02.01 - page 2
Contents
• Java Card Development– What does the user expect?
– Java Card development life cycle
• Sm@rtCafé Professional– Description of all Windows
– OPT Wizard
– Add Package
– Card Access
Sm@rtCafé Professional Toolkit V2.0
C:\Presentations - SmartCafe_Prof_V2.0 - bsc - 22.02.01 - page 3
Java Card Development
• What does the user expect from a developer tool?
Sm@rtCafé Professional Toolkit V2.0
C:\Presentations - SmartCafe_Prof_V2.0 - bsc - 22.02.01 - page 4
Java Card Development Life Cycle
Editor *.java Files Java Compiler *.class Files
Sm@rtCafé
Simulator
Converter
*.cap FileScripts
Sm@rtCafé Professional Toolkit V2.0
C:\Presentations - SmartCafe_Prof_V2.0 - bsc - 22.02.01 - page 5
Characteristics of Sm@rtCafé Professional
• Integrated Development Environment for Debugging and Testing of Java Card Applets
• Complete Simulation of the Java Card VM (Virtual Machine)
• Supports Development of Applets based on a Java Card 2.1 Simulation
• Open Platform Card Specification, Version 2.1
• Symbolic and Source Code Debugging (Byte Code / JAVA)
• Single-Step, Run and Breakpoint Functionality
• Windows for View of Heap, Locals and Stack
• Supports Download of Applets on a real Java Card
• Command APDU Generator
Sm@rtCafé Professional Toolkit V2.0
C:\Presentations - SmartCafe_Prof_V2.0 - bsc - 22.02.01 - page 6
Sm@rtCafé Professional GUI
Sm@rtCafé Professional Toolkit V2.0
C:\Presentations - SmartCafe_Prof_V2.0 - bsc - 22.02.01 - page 7
Project Window
• Name of project
• Visualization of Framework– Java– Java Card– VOP
• Loaded User Packages– One or more user packages– AID of applet– Imported Packages– Classes
• Scripts with command APDU’s– One or more user defined APDU scripts
• Logbooks– Logging of APDU communication
Sm@rtCafé Professional Toolkit V2.0
C:\Presentations - SmartCafe_Prof_V2.0 - bsc - 22.02.01 - page 8
Source Editor
• Editing of Java files
• Syntax highlighting
• Mixed view Java and byte code possible
• Workbook mode– Document window tabs
• Setting of Breakpoints – F9 or double click or menu
• Bookmarks– Toggle, next, previous,
clear all bookmarks
• Program counter
Sm@rtCafé Professional Toolkit V2.0
C:\Presentations - SmartCafe_Prof_V2.0 - bsc - 22.02.01 - page 9
Heap Window (1)
• Shows all objects of simulated card
• Editing of objects possible
• Shows memory resources of simulated card
• Memory resources per package
• Memory resources per object
• Objects of package
Sm@rtCafé Professional Toolkit V2.0
C:\Presentations - SmartCafe_Prof_V2.0 - bsc - 22.02.01 - page 10
Heap Window (2)
• Symbols ofHeap window
Sm@rtCafé Professional Toolkit V2.0
C:\Presentations - SmartCafe_Prof_V2.0 - bsc - 22.02.01 - page 11
Stack Window
• Stack window shows:– Method / Operand– Class / Type– Value
• Parent and child task view
• Editing of values
• Double click opens source file
• Coloring of values– green = new value
– red = changed value
– black = no change
Sm@rtCafé Professional Toolkit V2.0
C:\Presentations - SmartCafe_Prof_V2.0 - bsc - 22.02.01 - page 12
Locals Window
• Local variables in subroutines
• Stackframe list with call stack
• Select methods and their locals
• Editing of values
• Parent and child task view
• Go to reference jumps to the object in heap window
Sm@rtCafé Professional Toolkit V2.0
C:\Presentations - SmartCafe_Prof_V2.0 - bsc - 22.02.01 - page 13
Watch Window
• Inspection of variables and heap objects– References– Data members– Arrays– Elements of arrays
• Remark to every entry possible
• Editing of values
• Go to reference jumps to the object in heap window
green = new valuered = changed valueblack = no change
Sm@rtCafé Professional Toolkit V2.0
C:\Presentations - SmartCafe_Prof_V2.0 - bsc - 22.02.01 - page 14
Breakpoint Window
• Breakpoint window shows– Class name
– Method signature
– PC (program counter)
• Toggle Breakpoint– Function key: F9
– Double click in edit window
– Menu Debug: Toggle BP
• Remove All Breakpoints
• Double click jumps to corres-ponding line in edit window
Sm@rtCafé Professional Toolkit V2.0
C:\Presentations - SmartCafe_Prof_V2.0 - bsc - 22.02.01 - page 15
Logbook Window
• Logs all Command APDUs
• Logs all Response APDUs
• Logs VM error messages
• Logbooks field– One or more logbooks
– Change of several logbooks
Sm@rtCafé Professional Toolkit V2.0
C:\Presentations - SmartCafe_Prof_V2.0 - bsc - 22.02.01 - page 16
Script Editor
• Command APDUs are stored in scripts
• Script field– One or more scripts per project
• Script editing– Copy, Paste, Insert, Delete
• Different formats of input– Hex, Decimal, Character,
Prompt (Ask for a value)
• Sending command APDUs– Target: Simulation or Real Card– Send APDU (F4)– Run Script (Ctrl+F4)– Run Script to next Tag
Sm@rtCafé Professional Toolkit V2.0
C:\Presentations - SmartCafe_Prof_V2.0 - bsc - 22.02.01 - page 17
Output Window
• Shows output of compiler and converter
• Window cleared whenever the compiler is called
Sm@rtCafé Professional Toolkit V2.0
C:\Presentations - SmartCafe_Prof_V2.0 - bsc - 22.02.01 - page 18
Exception Handling
• Configuration of Exceptions
• Counter for Exceptions
• Type and Reason of Exception
Sm@rtCafé Professional Toolkit V2.0
C:\Presentations - SmartCafe_Prof_V2.0 - bsc - 22.02.01 - page 19
OPT Wizard
• OPT file: Configuration file for the Converter– Package name
– Applet name
– Package and applet AID
– Path to class file and export file
– Converter settings
Sm@rtCafé Professional Toolkit V2.0
C:\Presentations - SmartCafe_Prof_V2.0 - bsc - 22.02.01 - page 20
Add Package
• Add User Packages to project
• Add with OPT file or CAP file
• SUN converter (*.opt)– Convert class files to cap files
with SUN converter
• CAP file reader (*.cap)– Load existing cap files
Sm@rtCafé Professional Toolkit V2.0
C:\Presentations - SmartCafe_Prof_V2.0 - bsc - 22.02.01 - page 21
Card Access
• Create new project
• Select template “Sm@rtCafe Card Access”
• Start CAP File Loader
• Connect to Card Terminal
• Choose CAP file
• Edit parameters– C6=4000, C7=30, C8=500
• Start Download
Sm@rtCafé Professional Toolkit V2.0
C:\Presentations - SmartCafe_Prof_V2.0 - bsc - 22.02.01 - page 22
Getting Started with Sm@rtCafé Professional
Applet development cycle