Documentation



Oracle Java ME Embedded Getting Started Guide for the Reference Platform (Freescale FRDM-K64F)

Beta Draft: 2015-08-31

1 Installing Oracle Java ME Embedded Software

This chapter describes how to prepare your Freescale FRDM-K64F board and install the Oracle Java ME Embedded 8.2 software on it.

This chapter contains the following sections:

Required Software and Hardware Items

The following hardware and software items are required for developing on the Freescale-K64F board:

  • Freescale FRDM-K64F board

  • Micro-USB power supply of 0.7 or greater amps, and 5 volts. Note that the power supply must have a micro-USB type B connector, not a regular USB or mini-USB connector.

  • Micro-USB cable with a micro-USB type B connector (optional, used only for tooling over serial connection)

  • Micro SD card of 4 GB or less formatted with FAT32

    Note:

    You must use only SD cards. Work with SDHC cards is not guaranteed.
  • Ethernet cable with an RJ-45 connection, as well as a connection to a network with a DHCP server (optional)

  • Oracle Java ME Embedded 8.2 software distribution

  • A terminal emulator program, such as PuTTY.

    The executable file putty.exe is directly downloadable from

    http://www.putty.org/

Updating the Firmware

Ensure that you have the latest firmware on your K64F board.

  1. Connect the K64F board to your host computer with a micro-USB cable using the slot marked USB as shown in Figure 1-1. The flashing status light indicates the board has power.

    In a few seconds your computer recognizes the mbed microcontroller and displays it as a standard USB drive.

    Figure 1-1 Freescale FRDM-K64F Board

    Description of Figure 1-1 follows
    Description of "Figure 1-1 Freescale FRDM-K64F Board"

  2. Open the details.txt file on your MBED device in a text editor to learn the firmware version.

  3. Open the mbed.htm file in a browser to log in at mbed.org.

    If you do not have an mbed user account, click Signup and create the account. Otherwise, login in with your username and password.

  4. Find the latest firmware version and instructions explaining how to upgrade the firmware at

    http://mbed.org/handbook/Firmware-FRDM-K64F

Note:

Jumper J25 is responsible for the configuration of the Reset button. For a successful firmware update, it is important that jumper J25 connects SDA and SW1 pins. Turn over the board to ensure that the correct pins are connected.

Configuring Windows for Serial Communication with K64F Board

To enable serial communication with the K64F board on Windows, perform the following steps:

  1. Download and install the mbed Windows serial port driver from

    http://mbed.org/handbook/Windows-serial-configuration.

  2. Open the Windows Device Manager by clicking Start, then Control Panel and Device Manager and expand the Ports (COM & LPT) line as shown in Figure 1-2 to learn the identity of the serial port.

    Figure 1-2 Windows Device Manager Displaying an mbed Serial Port

    Description of Figure 1-2 follows
    Description of "Figure 1-2 Windows Device Manager Displaying an mbed Serial Port"

Configuring USBSerial Interface

The USBSerial interface is used to emulate a serial port over USB. If you want to communicate to your K64F board using this serial port or install the Java ME Embedded software on your board using a feature of the Oracle Java ME SDK called Device Installation Wizard, you need to configure the USBSerial interface.

On Windows, perform the following steps.

  1. Download an archive from http://mbed.org/handbook/USBSerial and extract it on your host computer.

  2. Open the serial.inf file and replace the [DeviceList] and [DeviceList.NTamd64] sections with the following lines:

    [DeviceList]
    %DESCRIPTION%=DriverInstall, USB\VID_0472&PID_145A
    [DeviceList.NTamd64]
    %DESCRIPTION%=DriverInstall, USB\VID_0472&PID_145A
    
  3. Connect the K64F board to your host computer with the second USB cable using the slot marked K64F USB.

  4. Install the driver using the Windows Device Manager as described at http://mbed.org/handbook/USBSerial.

After you successfully installed the driver, the Windows Device Manager displays the Mbed Virtual Serial Port (COM ID) as shown in Figure 1-3.

Figure 1-3 Windows Device Manager Displaying an Mbed Virtual Serial Port

Description of Figure 1-3 follows
Description of "Figure 1-3 Windows Device Manager Displaying an Mbed Virtual Serial Port"

Installing Oracle Java ME SDK 8.2 Platform

To install Oracle Java ME SDK 8.2 platform, see Oracle Java ME SDK Developer's Guide for complete instructions.

Installing Java ME Embedded 8.2 on Freescale FRDM-K64F Board

You have two options to install the Java ME Embedded software on the K64Fboard: using the Device Installation Wizard, a feature of the Oracle Java ME SDK, or manually downloading the binary file and installing it. These options are described in the following sections.

Installing Java ME Embedded 8.2 Software Using the Device Installation Wizard

This section describes how to install the Java ME Embedded software using the Device Installation Wizard.

Ensure that an SD card is inserted into the K64F board, the board is connected to your host computer with two USB cables, and also connected to a network socket with an Ethernet cable.

To install Java ME Embedded software on your K64F board, perform the following steps.

  1. Right-click the Oracle Java ME SDK Device Manager icon on the notification area as shown in Figure 1-4 and choose Manage Device Connections.

    Figure 1-4 Oracle Java ME SDK Device Manager Icon

    Description of Figure 1-4 follows
    Description of "Figure 1-4 Oracle Java ME SDK Device Manager Icon"

    If there is no Device Manager icon, start the Java ME SDK Device Connections Manager located at <SDK Installation Folder>/bin/device-manager.exe

    Figure 1-5 Device Connections Manager

    Description of Figure 1-5 follows
    Description of "Figure 1-5 Device Connections Manager"

  2. Click Setup new device icon. The Flash Devices window opens up.

  3. Select an mbed device and click Flash.

  4. Wait while the Java ME Embedded runtime image is being installed or updated.

  5. Press the Reset button on the board.

The FRDM-K64F board is now registered. It has the Connected status and is ready for work as shown in Figure 1-6.

Figure 1-6 FRDM-K64F Board Is Registered

Description of Figure 1-6 follows
Description of "Figure 1-6 FRDM-K64F Board Is Registered"

Note that the Java ME Embedded runtime image is written into the on-chip flash and does not appear on the SD card's file system.

There is no need to copy the jwc_properties.ini file onto the SD card unless you want to modify some of the default values. The version of the file with the default property values is already written to the Java ME Embedded runtime image.

Downloading and Installing Java ME Embedded 8.2 Manually

If you want to install the Java ME Embedded software on your K64F board manually, perform the following steps:

  1. Download the binary zip file called oracle-jmee-8-2-dp2-fs-k64-mbed-bin.zip from

    http://www.oracle.com/technetwork/java/embedded/javame/embed-me/downloads/index.html

  2. Extract the contents of the zip in a directory on your computer.

  3. Copy the flash\JavaVM.bin file from the extracted directory onto your MBED drive.

    Note:

    There is no need to copy the jwc_properties.ini file on the SD card unless you want to modify some default property values such as network setup. The next three steps are optional.
  4. Mount the SD card to your desktop computer and copy the modified sd_card\java\jwc_properties.ini file from the extracted directory to the java directory on the SD card.

  5. Eject or unmount the SD card from the desktop computer.

  6. After the green light on the board stops blinking, insert the SD card into the K64F board.

  7. Press the Reset button.

Setting Up a Network Configuration

By default the K64F board obtains an IP address from a DHCP server. However, you can setup using a static IP address by modifying the jwc_properties.ini file as follows:

ip_method=static
ip_addr=XXX.XXX.XXX.XXX
ip_netmask=XXX.XXX.XXX.XXX
ip_gateway=XXX.XXX.XXX.XXX

To switch to using the DHCP server, remove the ip_method parameter or set

ip_method=dhcp

Installing Certificates

By default, FRDM-K64F does not contains certificates. To make SSL/HTTPS connections from the K64F board, import certificates using either of the following procedures.

  • Create an empty /java/_main.ks file on the SD card and use the mekeytool.exe tool to import appropriate certificates into the K64F board.

  • Create the _main.ks file by using the MEKeyTool.jar with -version restricted option and copy it in the java directory on the SD card.

For more information about using the mekeytool.exe tool, see Manage Certificates (mekeytool) in the Oracle Java ME SDK Developer's Guide at https://docs.oracle.com/javame.

Close Window

Table of Contents

Oracle Java ME Embedded Getting Started Guide for the Reference Platform (Freescale FRDM-K64F)

Expand | Collapse