1 / 51

Building and debugging GNU Electric version 8.08 by Java SDK & Eclipse (Ganymede)

by Kazzz (a Japanese engineer) May 11 th , 2009 (created the original) May 30 th , 2009 (modified for posting to ) June 2 nd , 2009 (added information on Java 3D environment).

carlyn
Télécharger la présentation

Building and debugging GNU Electric version 8.08 by Java SDK & Eclipse (Ganymede)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. by Kazzz (a Japanese engineer) May 11th, 2009 (created the original) May 30th, 2009 (modified for posting to ) June 2nd, 2009 (added information on Java 3D environment) Building and debugging GNU Electric version 8.08by Java SDK & Eclipse (Ganymede)

  2. Objectives • To build GNU Electric 8.08 from its source code by using Java SDK and Eclipse 3.4.2 (Ganymede) • To use the source code debugger to survey different causes of exceptions thrown by Electric while processing a user-defined Technology File

  3. Some icons used throughout this document • Set the default workspace # 02 Micro-steps to be followed sequentially • Uncheck “Build Automatically” flag # 03 Options/points to be carefully checked

  4. References You should refer to : [1] Not available yet! [2] http://java.com/en/ for Java [3] http://www.eclipse.org/for Eclipse [4] http://www.staticfreesoft.com/productsFree.html for GNU Electric ✔

  5. Index Part-I Setting up Software Development Environment Part-II Creating a New Project Part-III Building the New Project Part-IV Debugging GNU Electric

  6. Part-I Setting up Software Development Environment

  7. 01. Java Runtime and SDK The images were captured on Japanese Windows throughout this document. Therefore, wherever you see a Yen mark in a file path, please understand that it corresponds to a “back slash” character in the non-Japanese world. • The tools listed below are assumed as Java development environment

  8. Customization of Java environment made for my convenience Manually copied --- for some reasons; cannot remember ;-( The modified “build.xml” file embedded in slide #26 reflects this organization as shown below.

  9. 02. Eclipse ✔ • The tools checked below are assumed as Eclipse environment ✔ Visit http://www.eclipse.org/downloads/ ✔

  10. Author’s Eclipse environment used in this document ※ C/C++ and Qt tools are not required for building/debugging GNU Electric.

  11. Author’s batch file used to start Eclipse rem ----- Batch file for invoking Eclipse with Qt plug-in ----- rem ----- Qt-related environment variables set QTDIR=D:\Qt\2009.01\qt\ set QMAKESPEC=win32-g++ set MINGWDIR=D:\Qt\2009.01\mingw\ rem ----- Java SDK-related environment variable set JDKDIR=c:\Program Files\Java\jdk1.6.0_13\ rem ----- Set path to all the tools set Path=%JDKDIR%\bin;%MINGWDIR%\bin;%QTDIR%\bin;%Path% rem ----- Invoke Eclipse call eclipse.exe exit This shortcut calls the batch file.

  12. 03. Default workspace for Eclipse • Invoke Eclipse # 01 • Set the default workspace # 02

  13. Uncheck “Build Automatically” flag # 03 This option is useful for incremental building. As I’m going to build everything from scratch, let’s suppress this feature for the time being. Otherwise, compilation will automatically start while importing a Jar file to a new Java project.

  14. Part-II Creating a New Project

  15. 01. Create a new project for GNU Electric • Create a new Java project # 01

  16. Import the JAR file of GNU Electric 8.08 # 02

  17. Select the JAR file of GNU Electric 8.08 # 03 Not “electricBinary-8.08.jar”

  18. Configure Build Path # 04

  19. Check the build path (1) # 05

  20. Check the build path (2) # 06

  21. Check the build path (3) # 07

  22. Check the build path (4), then press [OK] # 08

  23. Confirm that these packages have been created # 09

  24. 02. Information on how-to-build • Go through “README.txt” file # 01 • Read “Building from Sources” section carefully # 02

  25. 03. Edit “build.xml” file for Ant tool • Copy then paste “build.xml” to backup the original one # 01

  26. Edit “build.xml” according to the information described in “README.txt” file. • For example, Macintosh-related descriptions are to be removed. # 02 Modified Original : : : : Unpack and compare these two files for details The above tool is Slide #8

  27. Delete “MacOSXInterface.java” file, which is not necessary for Windows # 03

  28. Optionally edit a file to modify the splash image # 04 Original Modified

  29. Part-III Building the New Project

  30. 01. Build by Ant tool • To clean, follow clean  Run As  Ant Build # 01

  31. To build, follow compile  Run As  Ant Build # 02 Successfully built with 91 warnings

  32. To run, follow runMain  Run As  Ant Build # 03

  33. Check that the tool has started successfully; watch the console # 04 “Added Technologies” is being loaded…

  34. 02. Quickly check that the tool works • Load a library and open a layout cell # 01 Looks OK!

  35. Run NCC # 02 Looks OK!

  36. Run DRC # 03 Exception has been caught!

  37. Check the console of Eclipse workbench # 04 The same exception has also been caught by Eclipse • Click a hyperlink and confirm that the source code can be loaded to the editor view # 05

  38. The location has been correctly identified in the editor view # 06

  39. Part-IV Debugging GNU Electric

  40. 01. Configuring the debug setup • Start Debug Configurations … # 01

  41. Setup configuration # 02

  42. Set break point(s) as needed # 03

  43. 02. Start the debugger • Change the perspective to Debug and start the debugger # 01

  44. Confirm that GNU Electric has started in a debug mode # 02

  45. Load the same library and open the same layout cell as before # 03 Looks OK!

  46. Run NCC # 04 Looks OK!

  47. Run DRC # 05 Exception has been caught and the program has stopped at the break point.

  48. Inspect variable(s) # 06 This is what the author wanted to do!

  49. Resume the execution # 07 Exception has been caught!

  50. Check the console of Eclipse debug perspective # 08 The same exception has also been caught by Eclipse

More Related