How can i select Hello World Applet from my SAM card and then how send APDU for receive "48 65 6C 6C 6F" that it is equivalent with "Hello" String - applet

I am very newbie in javacard and applets.
I now have a Hello World project according this link and i made its .cap
file, .exp file and .jca file. I have "DE-ABCM_TB" reader and a SAM card also.
i already loaded my Hello World project to the SAM card .
Now How can i select Hello World Applet from my SAM card and then how send APDU
for receive "48 65 6C 6C 6F" that it is equivalent with "Hello" String. (with
which commands? and with which platform that is free and exists on the net?)

Actually you need to download the JCOP plugin for eclipse , then you need to activate JCOP tools to start writing in the card. To activate JCOP tools , just start a new javacard project in eclipse ; and it will ask you if you have an activation code from NXP , or do you have a JCOP card : Put your card in the reader and select the choice of using an already activated card. And you should have all the tools then (Eclipse/Javacard Plugin / JCOP tools installed /JCOP tools activated using your card)

Related

How to fix 'Unable to open file' when uploading to STM32 in TrueStudio

I am attempting to upload my written program for the STM32F411RE from my TrueStudio for STM32 IDE to the board itself. The board is connected via the mini USB b cable and the intent is to program it via SWD.
Setup
Atollic provides a nice tutorial on how to perform this programming via it's TrueStudio IDE and the ST-Link_CLI (Command Line Interface), as described in the document at this link. This requires the following steps, which I have followed and checked multiple times:
First and foremost the output (binary) file needs to be an intel .HEX and
not the TrueStudio .elf default. To change this go to Project properties -> c/c++ build -> settings -> tool settings tab -> other -> Output format
and tick the option 'Convert build output', ensure that the Intel Hex
option is selected in the dropdown.
To call the ST-Link_CLI from inside the IDE requires making an external
tools configuration. To make this config I go to Run -> External Tools ->
External Tools Configurations .... and create a new configuration, lets
call it ST-Link_CLI. For the Working Directory I specify the directory of my ST-LINK_CLI
(C:\Program Files (x86)\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK Utility)
whilst for the Location I specify this directory and the file name
(C:\Program Files (x86)\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK
Utility\ST-LINK_CLI.exe).
Lastly, I add the following parameters to
identify the STM32 board, have it connect via SWD and under reset, whilst
telling it to upload the .HEX file built by TrueStudio
(-c ID=0 SWD UR LPM -P ${project_loc}\Debug\${project_name}.hex -v).
Output
When I then call this external tool configuration via the Run -> External Tools -> ST-Link_CLI link just created I get the output listed below:
STM32 ST-LINK CLI v3.4.0.0
STM32 ST-LINK Command Line Interface
ST-LINK SN: 066EFF525750877267092042
ST-LINK Firmware version: V2J33M25
Connected via SWD.
SWD Frequency = 4000K.
Target voltage = 3.3 V
Connection mode: Connect Under Reset
Reset mode: Hardware reset
Debug in Low Power mode enabled
Device ID: 0x431
Device flash Size: 512 Kbytes
Device family: STM32F411xC/E
Loading file...
Unable to open file!
Clearly the ST-Link_CLI is succesfully called from inside the IDE, but it somehow cannot digest the .hex file (inside the debug folder) and upload it to the STM32 board.
Even flashing a completely new generated project from CubeMX and setting the options above (including setting it to a .hex file) will not let this toolchain upload it to the board.
Manual code flashing
I have been able to succesfully upload the .HEX file built by TrueStudio via manually uploading it to the STM32 Board with the use of the ST-Link GUI, so I do not think the problem is in the ST-Link itself. I cannot however debug it in this manner, since I need the TrueStudio IDE tools for that and thus need the external tool configuration to work succesfully.
Instead I suspect the issue lies with my own setup, where is somehow is missing a call or has an option set incorrectly. It could also be that the GUI and CLI clients operate in a completely different fashion allowing one to read and upload the file whilst the other cannot, but that seems unreasonable to me.
I am kind of at a loss here however, as I cannot seem to figure out why others can make this work via the provided Atollic documentation and mine is throwing up these errors.
You try to reinvent the wheel using the triangle.
Everything is configured in the TrueStudio:
Just in add the debug configuration and you are done.
What benefits would OpenOCD offer at this point
One essencial : debugging
given how much I have already learned about TrueStudio?
This knowledge (how to configure external tools etc) is rather useless in 99.9999% of circumstances. It is only the configuration of the Eclipse. Not too complex actually needed here.
In regards to my own code, I have not been able to get the ST-Link_CLI to work as an external tool the way I intended, [but I have been able to get the STCubeProgrammer (CLI) to work in the same respective manner as I was attempting to do with the ST-Link].(http://gotland.atollic.com/resources/applicationnotes/AN1801_cubeprogrammer_in_truestudio.pdf).
Seeing as I literally used the same procedure as before but instead specifying the location and executable for the STCubeProgrammer (rather than the ST-Link), I suspect the issue may indeed be the ST-Link CLI (connection to TrueStudio).
It now uploads successfully and immediately after boots me into the debug environment of TrueStudio :)
I simply commented "load" command in the startup script and debugging worked. I only had to load the hex using the st link first.
/# Load the program executable
#load <---//added "#"

Install extended applet on JavaCard

How can I deploy an extended Java-Card-applet to my card?
Until now I've only dealt with classic applets and installed them with GlobalPlatformPro under OS X.
However, when I try to install an extended applet (using gp -install KCIdentity.eap) it fails with the following message:
Exception in thread "main" java.lang.RuntimeException: Could not figure out the package name of the applet!
at pro.javacard.gp.CapFile.<init>(CapFile.java:94)
at pro.javacard.gp.CapFile.<init>(CapFile.java:65)
at pro.javacard.gp.GPTool.main(GPTool.java:441)
Does anyone know how I can deploy my applet to my card (ideally using OS X, but Debian or Windows is also OK)?
Edit: Link to GlobalPlatformPro: https://github.com/martinpaljak/GlobalPlatformPro
Update:
This has nothing to do with extended APDUs but with the Java-VM-version. Classic applets use version 2.x whereas extended applets use version 3.y. NetBeans packages the extended applets in an *.eap-file which doesn't seem to be supported... However I'll look if I can package it in an *.cap-file. Renaming didn't work...
I guess with "extended applet" you are refering to an applet that Extended Length APDUs. To use extended length APDUs the Applet must implement the ExtendedLength interface fomr the standard javacard package. Otherwise the applet will return with 0x6700 to extended Length APDUs.
However, GP says that the package name could not be determined, so I suppose you did not properly convert/compile the CAP file. Therefore you should review your compilation process.
I suppose the .eap is a typo? Otherwise change that to .cap, which is the standard format for downloading applets to the card.
edit: answer in the comments.
edit: the reason turned out to be that the card does not support the connected edition. Javacard3 is divided into classic edition(basically an update on the Javacard 2.2.2 API) and the connected edition(new mechanisms like Webserver applets etc...).

Flashing image to STM3220g-EVAL board using Trace 32

I have an STM3220g-EVAL board. It doesn't seem to have a preloaded image in it now, as it was used for other purposes.
When I power it on, the display is shown blank.
I dont have a STLINK/V2 hardware. I am using Trace32 and Lauterbach for flashing and debugging the code.
I created a simple C program, created an elf file by using arm-none-eabi-gcc toolchain, and was able to flash it into the STM3220g-EVAL board using a cmm script for stm32 provided in demo folder of Trace32.
What I require is to flash default image for STM3220g-eval using Trace32.
Can someone provide me the link to get the boot image and cmm script to flash the same.
I tried the demonstration builder platform and demonstration firmware provided in the following link
http://www.st.com/web/en/catalog/tools/FM116/SC959/SS1532/PF250374
As they are providing hex file, I used Trace 32 command data.load.asciihex to load the hex file. When I press go, am getting error( emulation poer fail).
Can somesome provide me the correct cmm script to flash the .hex file to the board.
If I understand you correctly you are trying to flash the "STM3220G-EVAL demonstration firmware" on your STM3220G-EVAL board.
So the hex-file you are talking about is "STM322xG_EVAL_FW_V1.2.0.hex", right?
This hex-file is in Intel HEX file format. (See https://en.wikipedia.org/wiki/Intel_HEX)
To load a file in Intel HEX format, you should use Data.LOAD.IntelHex
So this is how to flash the file in your CPU:
Select your CPU with SYStem.CPU STM32F207IG
Connect to your CPU with SYStem.Up
Prepare flash-programming with DO ~~/demo/arm/flash/stm32f2xx.cmm PREPAREONLY
Arm flash programming with FLASH.ReProgram ALL
Load your Intel Hex file with Data.LOAD.IntelHex STM322xG_EVAL_FW_V1.2.0.hex
Finalize flash programming with FLASH.ReProgram OFF (This will start the actual programming.)
The STM3220 comes with the STLink hardware built in via the USB port. See section 2.20 from here
Version 2 of the ST-LINK, called ST-LINK/V2, is embedded on the board.
This tool allows onboard program loading and debugging of the STM32F
using the JTAG or SWD interface. Third-party debug tools are also
supported by the JTAG (CN14) or Trace (CN13) connectors. To
communicate with the embedded ST-LINK/V2, a specific driver needs to
be installed on your PC. To download and install this driver, refer
to the software and development tools page for the STM32F family
available on www.st.com (the install shield is called
ST-LINK_V2_USBdriver.exe).

Error while Debugging using Eclipse for DS-5

I am using DS5 evaluation version. I created a simple hello world C project in eclipse for DS5. Project type chosen while creating the project is Bare Metal executable->Empty project. Tool chains ARM Compiler 5 was selected. I complied the code and generated the axf file. When i right click on the axf file and select debug as->debug configurations->Connection tab->ARM FVP VE_Cortex_A7x1->Bare Metal Debug->Debug Cortex-A7 and click on debug I am facing the error as in the image.
Please let me know how to resolve the same.
The reason you're seeing that error is that the evaluation version of DS-5 Professional Edition gives you access to the Cortex-A8 and Cortex-A9 FVPs, not the Cortex-A7 one.
Extra FVPs need to be purchased separately from ARM.

BB 10 Development Environment

Hello Everybody ,
I am using following tools & SDK for Blackberry Native development in Windows
10 Native SDK 10.0.9.1673
BlackBerry10Simulator-Installer-BB10_0_10
Virtual Machine VMware-player-4.0.3-703057
Let me know, following configuration is correct for BB Cascaded Development.
Because I am getting the following problems
"ldd:FATAL: Unresolved symbol "_ZN2bb8cascades11QmlDocumentC1Ev" called from Executable" error when I am trying to run binaries on
simulator.
If I import a BB Cascaded sample project in SDk then "BAR PACKAGES" Folder show by default , if I create my own project then
"BAR PACKAGES" then it will not show .
Actually it's not a answer I don't have any choice for image post that's why I follow this way ,here I am showing you the Snapshot of my QNX-IDE , I have imported GoodCitizen & Falling Blocks from sample projects . Good-Citizen Project is working fine compile as well as run on Virtual Machine. But in the Falling Blocks Project no BAR Packages create why this is happening , can any one explain me the scenario.
Have you declared your QML Document in either your main.cpp or app.cpp?
QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
I think you need to update api level
help-->updade api levels & install new software
Keep on update your tools to avoid errors