Home
STM32Java: Build Your First Java Platform On STM32F429I
Contents
1. Figure 5 3 MVC Example on the Simulator 13 STM32Java Build Your First Java Platform On STM32F429I DISCO Getting Started 6 Run the Example on the STM32F429I DISCO Board Emb JPF 6 1 Compile Java Application e Open the run dialog Run gt Run configurations and select the MicroEJ launcher MyMvcSample EmbJPF e Click Run the application is compiled and the compilation result an ELF file is copied into a well known location in the workspace The Keil p Vision BSP project will look for it there when it performs the final link 6 2 Link and Deploy Java Application The aim of the final step is to e Compile the BSP project such as drivers Link the BSP and the others libraries MicroJvm Virtual Machine native stacks Java application e Deploy the full application on the STM32F429I DISCO board E Note This final step uses Keil j Vision e In STM32Java expand the project example bsp and the folder Project MicroEJ MDK ARM A Keil Vision project file Project uvproj is available 4 MyPlatform bsp gt CS htmresc gt gt Libraries a Project a 2 Microb gt 2 inc 2 includeAPIs gt lib a 2 MDE ARM Project uvopt Project uvproj gt gt sre gt 5TM32P4a_StdPeriph_ Templates 2 Utilities project le MCD ST Liberty SW License Agreement V2 pdf Release_Notes html MyHMIPlatform fp MyHMIPlatform intern MyHMIPlatform jpt ES MyHMIPlatform micro
2. Java all Java based marks and all related logos are trademarks or registered trademarks of Sun Microsystems Inc in the United States and other Countries Other trademarks are proprietary of their authors STM32Java Build Your First Java Platform On STM32F429I DISCO Getting Started Table of Contents t aOd aioli OOOO OPE PE CONO O o II trem en ari mene rrr 5 1 1 MENGE Andien C aaa TAE a E 5 ADICON AAN 5 le R sada na DT ND E r r r r r eesceaaeees 5 124 TermilOl00y oaee o TN 5 Be ROGUE GR OMS 1 ALOU aoar a EAA 7 SOVETION event o a SO 8 Dili PATAS auth ke Way TA Seva N A A A ci 8 32 gt 1M32JavaF4 ARMCOCVA aa 8 Create and Use Your First Java Platform keke k eke k ke e keke K KK KK KA 9 Run an Example on the Simulated Java Platform SimJPF ke 11 Dl Greater calle sy ren N A O nO S N n Ren ann GENE Man AN M DG G N AE Ke GEN WNN ER KABOK AY G QA DAN 11 DZ RO EID A e eareke n 12 Run the Example on the STM32F429I DISCO Board EMDJPEF u eee 14 6 1 Compile Java ADDlICati Ok A aa 14 6 2 Link and Deploy Java Application a 14 O raan SN CAK KA N KE N i E W S nna eee imu e S K e ee d 16 7 1 STM32F429I DISCO Technical Specifications E kek kek ke 16 Ta DOMO BE Or EKE EK HHHH AA 16 aS T N iO y N ND A DN n 17 14 Demos Msalato in A a ion 18 s Document FISIOL dd 19 STM32Java Build Your First Java
3. Options for Target Device Target Output Listing User C C Asm Linker Debug Utilities Configure Flash Menu Command Use Target Driver for Flash Programming Settings I Update Target before Debugging C Use Extemal Tool for Flash Programming Figure 7 2 ULINK Probe Configuration Click on OK 7 4 Demos Installation This chapter explains how to install extra demos and application notes They have to be imported as a standard Eclipse project archive file Go to the website http www stm32java com portal q resources demos Download zip files containing one or more demos Open STM32Java Open the wizard Import File gt Import Select the item General gt Existing Projects into Workspace Click on Next Select the downloaded zip file 18 STM32Java Build Your First Java Platform On STM32F429I DISCO Getting Started 8 Document History 19
4. E Ka es so ce I j MB1075B www st t com stma2f4 discal a mA aiene mla Hi kam o o pa ay 838 a 9 03 a oe oon PFO D Zy STM32F4291 Disco Tos 9 lak ruie o 15838 Qio ms le e 2 om gt 2 la Ojos PEA 0 a z 3 Mi A 8 00UCS te HA mio o de 0 Oj PEO e pi 3 PAO O OPA s00T0 E Haa dedi 9 PAS rce KOR Hand e oim KOR Haia Pr 3 Pf 5 EH P88 reo PE12 Qe Ps10 0 re 2 USART RX oan O jros USART TX 1Q Q POM io jro 2 i Figure 7 1 Board configuration 7 3 Keil u Vision 7 3 1 Project Compatibility The j Vision projects available as Java platform examples are compatible Keil pVision 4 60 5 0 Several options have to be updated manually to be compatible with Keil Vision 5 x such as the choice of the microprocessor 7 3 2 Probe Configuration This chapter explains how to use a ULINK probe instead of using the ST LINK V2 This step is useful if you use Keil Vision 4 5 x as older versions of Keil Vision do not manage the ST LINK V2 probe well e Open a Keil Vision project e Open the menu Project gt Options for Target your target Open the tab Utilities e Select the item ULINK2 ME Cortex Debugger in the combo box of the menu Use Target Driver for Flash Programming 17 STM32Java Build Your First Java Platform On STM32F429I DISCO Getting Started
5. be extended with Mocks to simulate the native C Ada asm code of the JPF such as drivers or to connect hardware to the workstation Mocks can feed the SimJPF with real external stimuli so that the Java application can behave as if it was running on the EmbJPF SimJPF allows the design and functional testing of an embedded Java application in a development environment STM32Java Build Your First Java Platform On STM32F429I DISCO Getting Started Java Kickstart Platform Tool Flow MicroEJ SDK Application software Java Virtual Machine Embedded Libraries BSP Library Executable Binary elf DT an Hardware Figure 1 1 Java Platform Tool Flow MicroEJ SDK Application software Java Virtual Machine amp Embedded Libraries C C IDE BSP Source Executable Binary elf hex out Hardware Platforms Flow STM32Java Build Your First Java Platform On STM32F429I DISCO Getting Started 2 Product Registration The development version of STM32Java uses hardware activation keys Open STM32Java Open welcome page Help gt Welcome Ej MicroE STM32Java CEM file Edit Navigate Search Project Run Window Hel Welcome to STM32Java Y Getting Started G Fik Manage Licenses IA f ee y as Try out Java Examples j View Documentation Dr Manage Platforms ld Create New Project Figure 2 1 STM32Java Welcome Page e Insert your USB dongl
6. 32Java Example Project page 1 e Click on Next The next page suggests a name for the new project 11 STM32Java Build Your First Java Platform On STM32F429I DISCO Getting Started New MicroEJ Example Project L En Create a MicroEJ Project Enter a project name Y Project Name MyMVCSample Figure 5 2 New STM32Java Example Project page 2 e Click on Finish The selected example is imported into a project with the given name The main class the Java class which contains the main method here MVCDemo java is automatically opened E Note Note The New Java Example Project wizard is also accessible from the menu File gt New gt Java Example 5 2 Run Example e Open the run dialog Run gt Run configurations and select the STM32Java launcher MyMVCSample SimJPF e Click on Run the application starts It is executed on the simulator SimJPF of the selected JPF STM32F429IDISCO MyPlatform CM4_ARMCC A picture of the board appears The result of the execution is shown on the display of the board The touchscreen can be used to adjust the division of the screen areas 12 STM32Java Build Your First Java Platform On STM32F429I DISCO Getting Started ul 5TM324291 DI500 O 4 aT 1111 e AMA a ag aa E ii Ha MB1075B Www Ni st Eomsimazta discovery ar A iH kaz Sp o O 380 gt EM STM32F429l DISCO r et 66000000000 aco ir 2232252337
7. DISCO board and is ready to be linked into the Keil Vision project The name of this platform is SIM32F429IDISCO MyPlat form CM4_ARMCC The platform is now ready for use and available in the Platforms list of your STM32Java repository windows gt Preferences gt STM32Java 10 STM32Java Build Your First Java Platform On STM32F429I DISCO Getting Started 5 Run an Example on the Simulated Java Platform SimJPF The aim of this chapter is to create a simple Java application from a built in example This example will initially be run on the simulator SimJPF of the platform created in the previous chapter Then in the next chapter this application will be compiled and deployed on the STM32F429I DISCO board using the EmbJPF 5 1 Create Example Open STM32Java Open the welcome page Help gt Welcome Press the Try out Java Examples button to open the New Java Example Project wizard e Select the Java platform STM32F429IDISCO MyPlatform CM4_ARMCC from the combo box e Select the example Examples gt MicroUI gt MVC New MicroEJ Example Project O E Select an Example y A Target JPF Platform a Samples mi BON ECOM COMM zi EDC Getting Started zi MWT 4 BA MicroUl Iz Check Input Events gt Filters Iz Fonts LS Hello World I gt Images Iz LCD Iz LEDs Iz Layers This example shows how to create and use a MVC design pattern 2 lt Back Next gt Finis Cancel Figure 5 1 New STM
8. EDC B ON SNI SP NLS ECOM COMM and embedded Ul extension MicroUl MWT Comes with a BSP example for the board 2 lt Back Next gt Finish Cancel Figure 4 1 Java Platform Configuration page 1 Select the example configuration Fu11 in menu STM32F429I DISCO e Click on Next Give a name which be used as prefix for all platform projects For instance MyPlat form STM32Java Build Your First Java Platform On STM32F429I DISCO Getting Started a Create a Java Platform a Ea Create a Java Platform lt gt Create a new Java Platform Project name MyPlatform v Use default location C Users JPF Properties Device Name MyPlatform Version 1 0 0 Provider MyCompany Vendor URL MicroEJ Min Version 1 7 0 lt Back Next Cancel Figure 4 2 Java Platform Configuration page 2 e Click on Finish The selected example is imported as several projects prefixed by the given name e example bsp contains a ready to use package for Keil Vision on STM32F429I DISCO board e example configuration contains some files to configure the platform automatically e example microuiGeneratorExtension contains some files to extend the MicroUI Image Gen erator tool A README file and a platform configuration file are automatically opened The README file explains the aim of the projects and how to launch an example We recommend you follow the steps described in this docu
9. Platform On STM32F429I DISCO Getting Started List of Figures Platos POW aaa 6 a TMSZlava Welcome Page eg tsa sic cle s n kelay Nan Sai hewane eh Ruled AVAN n d n na keweke NE eeu 7 sAvdlable Plat orm S encens AS 8 Java Plattorm Configuration page Dl sii dia 9 Java Platform Configuration page 2 K AG lhL keke ek eke k k ee ke k k ke KK K KK KK KK K KA 10 Plafon Configuracion Ple A e K R ae Ri y 10 New STM32Java Example Project page 1 HKHhK i keke kek k k KK Kek 11 New STM32Java Example Project page 2 K K eee keke e k k kr KAK K KK KAR 12 lt MVC Example on ihe SIMIO ias 13 Keil had m Project lr dan 14 ADE 15 Board CONSULAR AA 17 ULEINK Probe Gomis uration SNA A A A EA 18 List of Tables Til STM32F429I DISCO Technical Specifications L kk k k Kek KK 16 STM32Java Build Your First Java Platform On STM32F429I DISCO Getting Started 1 Introduction 1 1 Intended Audience The intended audience for this document are developers who wish to develop their first Java application with STM32Java Notes e This document is for STM32F429I DISCO board This document is not a user guide for the C development environment used for the final application link Please consult the supplier of the C development environment for more information Please visit the website http www stm32java com for m
10. STM32Java Bu ld Your F rst Java Platform On STM32F429I DISCO Getting Started Y l fe qugmented Reference TLT 0725 MAN PlatformGettingStarted STM32F429I DISCO Revision A Architecture STM32JavaF4 Compiler Keil uVision Board STM32F429I DISCO STM32Java Build Your First Java Platform On STM32F429I DISCO Getting Started Confidentiality amp Intellectual Property All right reserved Information technical data and tutorials contained in this document are confidential secret and IS2T S A Proprietary under Copyright Law Without any written permission from IS2T S A copying or sending parts of the document or the entire document by any means to third parties is not permitted including but not limited to electronic communication photocopies mechanical reproduction systems Granted authorizations for using parts of the document or the entire document do not mean they give public full access rights IceTea IS2T MicroJvm MicroEJ S3 SNI SOAR Drag Emb Drop IceOS Shielded Plug and all associated logos are trademarks or registered trademarks of IS2T S A in France Europe United States or others Countries Java is Sun Microsystems trademark for a technology for developing application software and deploying it in crossplatform networked environments When it is used in this documentation without adding the symbol it includes implementations of the technology by companies other than Sun
11. e Press the Manage Licenses button Hardware dongles are automatically detected when the STM32Java preferences main page is shown e Click on Refresh when a new hardware dongle is plugged in E Note The STM32Java preferences page is also accessible from the menu window gt Preferences gt STM32Java STM32Java Build Your First Java Platform On STM32F429I DISCO Getting Started 3 Overview 3 1 Platforms Several Java platforms JPF are pre installed in STM32Java Open STM32Java Open the welcome page Help gt Welcome Press the Manage Platforms button El Preferences lala Available Platforms b Yek General z Add or remove platforms Ant C C Platforms and Packs Cache Name Version License Select All Help Fi Platform X X X A Install Update J Java Ti Import MicroEJ Available Platforms Naming Convention Plug in Development Run Debug Team Restore Defaults Malidatian Uninstall Figure 3 1 Available Platforms This Available Platforms page shows all platforms installed in STM32Java Each platform has its own characteristics and specific behavior E Note e The Available Platforms page is automatically populated by the work in progress JPFs e The Available Platforms page is also accessible from the menu window gt Preferences gt STM32Java gt Available Platforms 3 2 STM32JavaF4 ARMCCv4 This Java platform architecture has bee
12. ment and refer to the README file for more detail and latest changes The platform needs to be built with several additional modules Java and natives libraries scripts etc From the platform configuration file click on the link Build Platform P Overview Java Platform Properties Platform Content General information about this Java platform The content of the platform is composed of two parts Device MyBoard Pi Environment select the Java platform environment architecture and version mene are add Modules select modules to import in the Java platform Version 1 0 0 Provider MyCompany Platform Configuration Once the content of the platform is chosen it can be configured 2 Configuration Each modul be configured creating a folder with its name along the platfor in MicroE Min Version 1 7 0 e can be m file lt could conta e an optional module properties file e optional module specific files and folders Modifying one these files requires to build the platform again Build Generate and test the Java platform 2 Build Platform The new platform is now available and visible in Available Platforms Figure 4 3 Platform Configuration File The build starts This step can take several minutes You can see the progress of the build steps in the Eclipse console Please wait for the final message BUILD SUCCESSFUL At the end of the execution the platform is fully built for the STM32F429I
13. n designed to be extended to run on any board with a COR TEX M4 based CPU The Section 4 Create and Use Your First Java Platform uses this platform to run your first Java application on your first extended platform This platform requires the Keil Vision C compiler to create the final binary file for a Java application STM32Java Build Your First Java Platform On STM32F429I DISCO Getting Started 4 Create and Use Your First Java Platform The aim of this chapter is to create a platform from a Java platform architecture The platform will then be used to run a Java application in subsequent chapters Although it is possible to use STM32Java to create every aspect of a platform in accordance with specific requirements in this chapter we will use a pre packaged example of a platform that is already configured for the STM32F429I DISCO Open STM32Java Open the Java Platform Example wizard File gt New gt Java Platform e Select the Java platform architectue STM32JavaF4 ARMCCv4 from the combo box A list of examples is available Create a Java Platform Configuration n En Create a Java Platform lt gt Create a new Java Platform configuration Target Extensible JPF Platform y v Create a platform from an example or a template a gt Platform 4 BA Board Iz Basic Iz Basic SNI and SP Iz Basic Ul i Full 4 BA Template Iz Java Platform Template Includes MicroE Java Virtual Machine CLDC
14. ore information about STM32Java products platforms videos examples application notes etc 1 2 Scope This document describes step by step how to start your development with STM32Java Register your product Understand the package Create your own platform e Runa Java application on the simulation platform SimJPF and on the embedded platform EmbJPF 1 3 Prerequisites PC with Windows XP or later The STM32Java environment must be installed e STM32F429I DISCO board The ST LINK utility normally installed as part of the STM32Java installation e Keil Vision 4 60 or higher The Keil Vision evaluation version is 32Kb code size limited To get a Keil pVision evaluation license for STM32Java please visit the website https is2t microej com Keil Vision 4 5x is sufficient except for deploying your application on the board using a ST LINK V2 Refer to the appendix to use a ULINK probe instead of using the integrated ST LINK V2 1 4 Terminology A Java platform JPF is a library that at a minimum embeds a JVM the MicroJvm virtual machine from IS2T some native libraries also called firmware or drivers or BSP and some Java libraries that characterize an application domain Depending on these libraries some specific tools are provided too Every embedded JPF EmbJPF has a sibling platform that simulates it on a PC called the SimJPF The SimJPF exactly mimics the semantics of the JPF The SimJPF can
15. uiGeneratorExtension Figure 6 1 Keil uVision Project File e Double click on this file to open Keil Vision The remaining steps are performed within Keil Vision 14 STM32Java Build Your First Java Platform On STM32F429I DISCO Getting Started EI Wisiond Aram File Edit View Project Flash Debug Peripherals Tools SVCS Window Help ES ll a p layer_address ya o Sara seca 3 STMa24xei_EvaL EENE amp Project n main c 6 3 STM324 9i EVAL LETA i CMSIS 2 Cc ij MDK ARM a E MicroE 4 Copyright 2013 IS2T All rights reserved A Cu BEFANT e 132 PROPRIETARY CONFIDENTIAL Use is subject to license t LLDISPLAY_STM324x9IEVAL c a a m e N EDE DED ee E LLINPUT c 8 L LLLEDS c 9 Includes 23 LLMJVM_RTX c 10 LLSP_RTX c 11 include lt stdio h gt E RTX_Conf_CM c 12 include sni 4 buttons c 13 include LLM h A buttons listener c 14 Pionie lt RTL h gt 15 include sram driver h ecom_comm c 16 ae E interrupts c B Defines __ _ _ _ _ _ _ _ _ _ _ _ _ a ioel6 c 18 ioe8 c 19 define MICROJVM_STACK_ SIZE 2048 a ioe_task c 20 2 joystick c EEE a _ _ _ _ _ _ _ _ _ __ _ _ __ __ __ _ __ _ SS SSS SS SS Icd_type c 22 m gt 23 static U64 ja
16. ur own platform 15 STM32Java Build Your First Java Platform On STM32F429I DISCO Getting Started 7 Appendix 7 1 STM32F429I DISCO Technical Specifications The following table illustrates some board features used by the Java platform It doesn t list all board features such as all available memories on the board MCU architecture Cortex M4 STM32F429ZIT6 MCU Clock speed 180MHz 225 DMIPS Internal Flash 2 MBytes Internal RAM 128 KBytes External RAM 8 MBytes SDRAM Table 7 1 STM32F429I DISCO Technical Specifications 7 2 Board Setup This section explains how to configure and connect the STM32F429I DISCO board 7 2 1 Jumpers and Switches Set all jumpers and switches to their default settings please refer to the STM32F429I DISCO docu mentation STMicroelectronics documentation User manual STM32F4291 DISCO kit board 7 2 2 Power Supply Select your power supply mode please refer to the STM32F429I DISCO documentation STMicroelec tronics documentation UM1662 User manual STM32F4291 DISCO kit board 7 2 3 PC Board Connection Plug a serial cable between the PC and the board USART 1 connector PA9 for TX PA10 for RX Note the PC s COM port it will be used later in the application launcher This allows all traces to be received from the board and printed on the console 16 STM32Java Build Your First Java Platform On STM32F429I DISCO Getting Started 7 2 43 Summary Power supply STLINK CN1 La
17. vaTaskStack MICROJVM_STACK_SIZE 8 m 24 static void vm E microui_bsp c 25 2 os_ support c 26 Private API amp putchar c 27 2 sram_driver c 28 static void enter_java_world void E stm32f4xx_it c 2901 F timer_hardware c 30 int32_t err touch c 31 int32_t exitcode touch_MBIDA6 c printf VM START n VM T n touch_MB1063 c 34 err SNI startVM vm 0 NULL touch_listener c 35H if err lt Di H libs 36 Error occurred H A STM324 9i EVAL 374 if err LLMJVM_E EVAL_ LIMIT 1 3 STM32F4xx_StdPeriph_Driver 38 printf Evaluation limits reached n 39 j 405 else 41 printf VM execution error err d n err 42 43 24H elset 45 VA execution ends normally 46 exitcode SNI_getExitCode vm 47 printf VM END exit code d n exitcode 48 49 50 SNI_destroyVM vm s 52 53 static _ task void javaTask void 54 41 55 enter_java_world bed E Project ax 0 re 4 m ST Link Debugger Figure 6 2 C IDE Li C1 CAP NUM SCRL OVR R W Build the Keil pVision project by clicking on the menu Project gt Build target The project is compiled and linked e Deploy the link result on the STM32F4291 DISCO board by clicking on the menu Flash gt Download The application starts The result of the execution is shown on the display of the board Congratulations you have built the Java application on yo
Download Pdf Manuals
Related Search
Related Contents
3 - Firmware Center (cyprodinile et fludioxonil) dans le buis StarTech.com 2m QSFP+ 40-Gigabit Ethernet (40GbE) Passive Copper Twinax Direct Attach Cable VSP Manual - Heat-Timer Corporation Chapter 1 - Sacramento Samsung KFR-35W/SWA 用户手册 USB-2533 User's Guide - from Measurement Computing Copyright © All rights reserved.
Failed to retrieve file