Phytec Linux-Kit phyCARD-M Quick Start Instructions

Using eclipse and the gnu cross development tool chain
Table of Contents

Advertisement

Quick Links

PHYTEC Messtechnik GmbH
Quick Start Instructions
Linux-Kit
phyCARD-M
Using Eclipse and the GNU Cross Development Tool Chain
Note: The PHYTEC Linux-phyCARD-M-Disc includes the electronic
version of the English phyCARD-M Hardware Manual.
A product of a PHYTEC Technology Holding company

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Linux-Kit phyCARD-M and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Phytec Linux-Kit phyCARD-M

  • Page 1 PHYTEC Messtechnik GmbH Quick Start Instructions Linux-Kit phyCARD-M Using Eclipse and the GNU Cross Development Tool Chain Note: The PHYTEC Linux-phyCARD-M-Disc includes the electronic version of the English phyCARD-M Hardware Manual. A product of a PHYTEC Technology Holding company...
  • Page 2 PHYTEC Messtechnik GmbH neither gives any guarantee nor accepts any liability whatsoever for consequential damages resulting from the use of this manual or its associated product. PHYTEC Messtechnik GmbH reserves the right to alter the information contained herein without prior notification and accepts no responsibility for any damages that might result.
  • Page 3: Table Of Contents

    2.7.1 Copying a Program to the Target with the Command..Line ................41 2.7.2 Executing a Program on the Target ......41 2.7.3 Executing a Program directly on the Target using SSH41 Chapter 3 Getting More Involved ........42 Configuring and Compiling the Kernel........42 70 min © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 4 Installing Linux on the phyCARD-M .....95 Installing the Boot Loader............95 Configure Barebox Environments Variables ......100 Restoring the Barbebox Default Configuration ..... 102 Writing the Kernel / Root File System into Flash....103 © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 5: Chapter 1 Introduction

    Chapter 1 Introduction 5 min In this Quick Start you can find general information on the PHYTEC phyCARD-M, and an overview of the Eclipse software development tool and the GCC C/C++ cross development tool chain. You will also find instructions on how to run example programs on the phyCARD-M, mounted on the PHYTEC Development Board, in conjunction with the Eclipse development tool.
  • Page 6: Professional Support Packages Available

    • The “Debugging” chapter provides information on how to debug an application with the Eclipse debugging interface. In addition to the dedicated data for this Rapid Development Kit, the PHYTEC Linux-phyCARD-M-Disc contains supplemental information on embedded microcontroller design and development in general. © 2010 PHYTEC Messtechnik GmbH...
  • Page 7: Conventions Used In This Quick Start Manual

    At the beginning of each chapter you can find information of the time needed to pass that chapter. You have successfully passed an important part of this Quick Start manual. Provides information to solve common problems. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 8: System Requirements

    Use of this “Rapid Development Kit” requires: • The PHYTEC phyCARD-M. (i.MX 35) • The PHYTEC Development Board with the included DB-9 serial cable, Ethernet cross-over cable and AC adapter supplying 12 VDC (min. 2 • PHYTEC Linux distribution based on OSELAS from Pengutronix.
  • Page 9: Software Development Tool Chains

    • CDT Core provides Core Model, CDOM, and Core Components. • CDT UI is the Core UI, views, editors, and wizards. • CDT Launch provides the launch mechanism for external tools such as the compiler and debugger. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 10: The Gnu Cross Development Tool Chain

    Building a program for a CPU architecture different from the one used on the machine where the compilation is done is accomplished using a cross compiler tool chain and cross-compiled libraries. In this Quick Start we are using the GNU C/C++ cross development tool chain. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 11: Chapter 2 Getting Started

    In these Quick Start Instructions you will have to shutdown the firewall and configure the network card of your host PC. If your host PC is connected to another network, changing the IP address can cause conflicts with existing hosts. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 12: Configuring The Host Platform

    To accomplish the steps in the Quick Start Instructions, you will have to install additional packages. If you don’t install all of these packages, the setup may fail or some configuration steps won’t work correctly. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 13 Getting Started • Open the K menu from the lower-left corner of the desktop and click on the tab Computer. • Open the Administrator Settings / YaST. • Enter your root password and click OK. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 14 Quick Start Instructions • Open Software Management in Software. • Select the filter Search. • Type libxml2-devel and click the Search button. • Check libxml2-devel. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 15 Getting Started • • Type python-devel and click the Search button. • Check python-devel. • Type tftp and click the Search button. • Check the packages tftp and yast2-tftp-server © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 16 Quick Start Instructions • Type qt3-devel and click the Search button. • Check qt3-devel. • Select the filter Patterns. • Select Basis Development, C/C++ Development, Tcl/Tk Development. • Click Accept. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 17 Some additional packages will be selected automatically to resolve any dependencies. If problems occur while resolving dependencies, we re- commend going back to a default configuration. • Click Continue to install the packages. • Click Finish. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 18: Set Up Network Card Configuration

    If you change the host’s IP, chances are that problems may occur with other hosts in the network. • Open the YaST Control Center if it is not already opened. • Choose Network Settings in Network Devices. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 19: Disabling The Firewall

    • Enter IP address 192.168.3.10 and subnet mask 255.255.255.0 2.2.3 Disabling the Firewall To ensure that there are no problems with connections to the target, the host’s firewall should be disabled. • Select the General tab in the upper-left corner. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 20: Set Up Tftp Server

    TFTP server running. In this passage we show you how to configure a TFTP server. • Open the YaST Control Center if it is not already opened. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 21 If the TFTP Server icon does not exist, restart the YaST Control Center. • Switch the selection to Enable. • The path of the boot image directory should be /tftpboot. If there is a different path, change it to /tftpboot. • Click Finish. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 22: Linux-Phycard-M-Kit Setup

    • Eclipse SDK with CDT – the Eclipse SDK is a platform and application framework for building software which can use the GNU C/C++ cross development tool chain. • Microcom – a program for serial communication with the target. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 23 • The path of the cross development tool chain will be added to the $PATH environment variable. • Read and write access to the serial interface will be added to your user account so you use the serial communication program Microcom. • The setup will configure Microcom. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 24: Starting The Setup

    Quick Start Instructions 2.3.1 Starting the Setup • To start with the Linux-PowerPC-Kit Setup enter your PHYTEC Linux- PowerPC-Disc into your CD-ROM drive. The following dialog may appear: • Click Cancel. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 25 Getting Started • From the K menu, select the Applications tab. • Select System ► Terminal ► Terminal Program / Konsole. • Type: cd /media/SO-482 • Enter ./install.sh to launch the setup program. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 26 /media. The mount points can be shown with the command ls /media. Change to the accordant directory if no directory SO-482 should exist. • Enter the root password. • Click Yes to proceed. The welcome screen appears. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 27 Getting Started • Click Next to continue. • Click Next. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 28 If you decide to individually choose different paths, you must consider this for all further file and path statements when working with this Quick Start. We strongly recommend accepting the default destination location. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 29 After the files have been copied, a dialog box for the Eclipse installation will appear. • Click Yes to install Eclipse. If you want to skip the installation of Eclipse, choose No. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 30 Quick Start Instructions We recommend installing Eclipse even if you already have installed Eclipse on your system. The version of Eclipse provided on the setup CD-ROM includes additional plug-ins. • Click Next. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 31 Getting Started • Click Finish to exit the setup. • Close the terminal window. Now you will have to restart the KDE desktop. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 32 You can now use the programs you need to develop your own applications for the target on your host system. The setup program did all necessary configurations. In the following passage you can find some advanced configuration information. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 33: Advanced Configuration Information

    To use a serial communication tool like Microcom with normal user rights, you have to be a member of the group uucp. A user can be added to this group with the following command: groupmod -A username uucp © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 34: Connecting The Host With The Target

    • Connect the AC adapter with the power supply connector PWR (12V) on your board. After connecting the board with the power supply, the target starts booting. When the target has finished loading the system, you should see a screen similar to the following: © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 35 JFFS2 is the successor, and a complete rewrite, of the original JFFS by Red Hat. As its name implies, the JFFS2 implements a journaling file system on the memory technology device (MTD) it manages. JFFS2 does not attempt to provide a © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 36 • Choose User Management. In the line of your user name should be the group uucp. • If the group is missing, select your user name and click the Edit button. • Select the tab Details. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 37 • Click the Telnet for Target icon on your desktop. A new window with a connection to the target opens. If you can see the user login in the opened window, the network configurations were configured correctly. • Close the window. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 38 Information on how to configure your network device can be found in the section Configuring the Host Platform. You have successfully set up all configurations to access your phyCARD- M from your host. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 39: Copying An Example To The Target

    2.6.1 Copying a Program to the Target • First click the phyCARD-M-Kit icon on your KDE desktop. A new window with the contents of the installation directory opens. • Enter the directory HelloWorld. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 40 • Click the HelloWorld program and hold the left mouse button pressed. • Drag the program into the window with the FTP session to the target and release the mouse button. • Choose Copy here in the appearing context menu. • Close the two windows. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 41: Using Telnet To Execute A Program On The Target

    • Click the Telnet for Target icon on your KDE desktop. • Enter root as login and press Enter. • Enter ./HelloWorld and press Enter. The program starts and you should see the following output: Welcome to the World of the phyCARD-M! © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 42: Using Ssh To Execute A Program On The Target

    RSA public key to your ~/.ssh/known_hosts. If you agree to do this, then the host will be able to connect to the target without entering a password. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 43 This is normal if you want to create an SSH connection for the first time. • Enter yes and press Enter to continue. The RSA public key of the target will be permanently added to the list of the known hosts. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 44 The program starts and you should see the following output: Welcome to the World of the phyCARD-M! • Close the SSH window. You have successfully copied and executed an example application on the target. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 45: Advanced Information

    • Type ./HelloWorld to start the application. • Type exit. 2.7.3 Executing a Program directly on the Target using SSH • To start the program, type: ssh root@192.168.3.11 ./HelloWorld After the program has finished, SSH will logout automatically © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 46: Chapter 3 Getting More Involved

    Support Package and to create your own image. After the configuration you will create your own image. The kernel used by PHYTEC is based on a standard kernel available from www.kernel.org. Additionally, the kernel archive in your setup installation directory already includes all necessary patches for the phyCARD-M.
  • Page 47 In the end, you need the following files: • ptxdist-2004.04.1.tgz (Tool from our partner Pengutronix, that configures and compiles BSPs) • ptxdist-2004.04.1-patches.tgz (Patches for the tool) • OSELAS.BSP-Phytec-phyCARD-PD10.1.0.tar.gz (BSP for phyCARD- • arm-1136jfs-linux-gnueabi.OSELAS-1.99.3.2.tgz (ready-to-use toolchain) All files are downloadable from our ftp-server. Please create a temporary directory within your home directory, for example local/, and copy the files into it.
  • Page 48 • Now you can install PTXdist. Because target directory is /usr/local, this must be done as user root: sudo make install [enter root password] [...] • Finally you can delete the temporary directory: rm –rf local © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 49 In order to be able to build an BSP for the i.MX35, you need a toolchain with a suitable crosscompiler for this processor. So please decompress the corresponding archive with root rights. It will be stored in directory /opt automatically. tar xPvf arm-1136jfs-linux-gnueabi.OSELAS-1.99.3.2.tgz © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 50 This rootfs could only be used when mounting it via NFS. Thus, PHYTEC provides the BSP together with a file called a 'collection', that excludes not necessary stuff for you. Please tell ptxdist to...
  • Page 51 Getting More Involved Now it will take some hours. Sometimes it can happen that an attempt to download a source package failes due to dead links. PHYTEC cannot guarantee the accessibility of all the webpages that are needed to build a BSP.
  • Page 52: Writing The Images Into The Target's Flash

    Refer to the chapter “Installing Linux on the phyCARD-M” for detailed information on how to restore your Barebox partition in such a case. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 53 /tftpboot cp root.jffs2 /tftpboot exit • Open Microcom and press the RESET button on the target. You will see the output “Hit any key to stop autoboot.” • Press any key to stop autoboot. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 54 • If you made any changes to the Barebox environment, type save to write these changes to the Barebox environment partition, and then press the target’s RESET button. The phyCARD-M reboots with the new settings applied. Again, press any key to stop autoboot. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 55 • Type update_kernel nand uImage-pca101 to download and write the kernel into the target’s flash. If you ever happen to damage your target’s root file system, you can also find the original root file system in the PHYTEC/PCA101 phyCARD-M/Linux-Kit/BSP/Images © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 56: Opening An Existing Project

    • Right-click the HelloWorld directory and select Copy. • Browse to your home directory. • If the workspace directory doesn’t exist, create a directory workspace in your home directory. • Enter the workspace directory. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 57: Starting Eclipse And Importing The Example Project

    3.2.2 Starting Eclipse and Importing the Example Project • Click the Eclipse icon to start the application. You can find this icon on your desktop. • Confirm the Workspace directory with OK. The Welcome screen will appear. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 58 Quick Start Instructions • Select File ► Import from the menu bar. • Select Existing Projects into Workspace. • Click Next. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 59 Getting More Involved • Select Browse. • Double-click the HelloWorld directory in your home directory. • Click OK. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 60 Quick Start Instructions • Select Finish to import the project. • Close the Welcome screen. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 61 You have successfully passed the first steps with the Eclipse IDE. You are now able to import existing projects into the Eclipse Workspace. You can compile an existing project and execute the program on the target. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 62: Creating A New Project

    • Open Eclipse if it isn’t already opened. • Select File ► New ► Project from the menu bar. A new dialog opens. • Select Managed Make C Project and click Next. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 63 Getting More Involved • Enter the project name myHelloWorld and click Next. • Click Next. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 64 Quick Start Instructions • Click Finish. • Select Yes to open the C/C++ perspective. You will see the C/C++ IDE with the myHelloWorld project. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 65 Getting More Involved • Right-click on HelloWorld.c in the HelloWorld project which we have worked with previously. • Select Copy. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 66 To compile your project for the phyCARD-M instead, you will have to use the GNU C/C++ cross compiler. • Right-click the myHelloWorld project and choose Properties. The Properties dialog appears. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 67 Getting More Involved • Select C/C++ Build. • Enter arm-1136jfs-linux-gnueabi-gcc into the Command input field. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 68 Quick Start Instructions • Select GCC C Linker. • Enter arm-1136jfs-linux-gnueabi-gcc into the Command input field. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 69 Getting More Involved • Select GCC Assembler. • In the Command input field, change the default as to arm-1136jfs- linux-gnueabi-as. • Click Apply. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 70 ./myHelloWorld Be sure to enter the semicolon between ./myHelloWorld and ssh. Be sure the file myHelloWorld on the target will have execution rights, because otherwise ssh will fail. • Click Apply. • Click OK. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 71 If no errors occur while building the project, you will see the following output: You have successfully created your first own project with the Eclipse IDE. You have configured the project to create an application for your target platform. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 72: Changing The Demo Application

    [] = { "Welcome to the World of the phyCARD-M! (serial)\n" }; write_tty (buf, sizeof (buf) - 1); In the next screenshot you can see the complete program. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 73 Getting More Involved • Save your program after changing the code. The application will be compiled, built, copied to the target, and executed. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 74: Executing The Program On The Target Using Microcom

    With the file descriptor you called the function write() to send n bytes to the device /dev/console. After that, the file descriptor was closed with the function close(). This procedure is in principle quite typical for Linux, because Linux treats everything like a file. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 75: Starting A Program Out Of Eclipse On The Target

    In the following section you will learn how to start a program on the target as an external tool. • Select Run ► External Tools ► External Tools from the menu bar. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 76 Quick Start Instructions • Select Program. • Select New. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 77 • Enter root@192.168.3.11 ./myHelloWorld into the Arguments field. • Select Apply. • Select Run. If you want to execute the program the next time, you can use the Run External Programs button from the menu bar. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 78: Automatically Starting The Program When Booting The Target

    /etc/rc.d. These links point to the actual startup scripts in /etc/init.d. First you will have to create a startup script in /etc/init.d. • Click the FTP for Target icon on your KDE desktop. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 79 In the directory /etc/init.d you can see the existing scripts. • Right-click in the opened window and select Create New ► Text File. • Enter myHelloWorld. • Click OK. • Right-click on myHelloWorld and select Open with. • Enter kwrite and click OK. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 80 The text editor KWrite starts with an empty document. • Enter the following two lines: #!/bin/sh /home/myHelloWorld • Select File ► Save. • Close the KWrite window. • Close the FTP window. • Click the Telnet for Target icon on your desktop. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 81 /etc/init.d/myHelloWorld. • In /etc/rc.d, create symbolic link which points /etc/init.d/myHelloWorld. Enter the following command: ln -s ../init.d/myHelloWorld S99myHelloWorld • Type ls -l again to check the newly created link. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 82 Now you can add your own programs to the root file system and start these programs automatically when your phyCARD-M boots. You have successfully passed the “Getting More Involved” part of this Quick Start. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 83: Chapter 4 Debugging An Example Project

    GDB client and GDB server can communicate over a TCP/IP network connection as well as via a serial interface. In this Quick Start we will only describe debugging via TCP/IP. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 84: Starting The Gdb Server On The Target

    • Type root and press Enter. • Start the GDB server: gdbserver 192.168.3.11:10000 myHelloWorld You have started the GDB server on the target. The GDB server is now waiting for connections on TCP port 10000. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 85: Configuring And Starting The Debugger In Eclipse

    • Select myHelloWorld in the Navigator window. • Select Run ► Debug from the menu bar. A dialog to create, manage and run applications will appear. • Select C/C++ Local Application. • Click New. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 86 Quick Start Instructions • Select the Search Project button. Click OK . © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 87 • Click the Browse button right beside the GDB debugger input field. A new dialog opens to choose the GDB executable. • Click on File System. • Navigate to the directory /opt/OSELAS.Toolchain-1.99.3/arm-1136jfs- linux-gnueabi/gcc-4.3.2-glibc-2.8-binutils-2.19-kernel-2.6.27- sanitized/bin. • Select the file arm-1136jfs-linux-gnueabi-gdb. • Click OK. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 88 • Enter 192.168.3.11 (the target’s IP address) in the Host name input field. The host’s GDB will connect to this IP address to communicate with the target’s GDB server. • Click Apply. • Click Debug. A new dialog appears. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 89 You have configured your project for remote debugging. You have started the GNU debugger in Eclipse and connected the host’s GDB with the target’s GDB server. You can now start to debug the project. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 90: Setting A Breakpoint

    If you resume the application, the debugger will stop on this line. • Select the last line in main(). • Right-click into the small grey border on the left-hand side and select Toggle Breakpoint to set a new breakpoint. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 91: Stepping And Watching Variable Contents

    • Expand buf in the Variables window. • Click the Step Over button in the Debug window to step to the next line. You will see the content of the buf variable in the Variables window. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 92 You will see the following variable window: • Click on the variable buffer. You will probably see a different address at the buffer pointer. Remember what address is shown in your case; you will need this address later. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 93: Changing Variable Values

    In this section you will change the value of a variable. At the end of this part you will see the effect of this change. • Select the count variable in the Variables window. • Right-click on count and select Change Value. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 94 “Welcome to the World of the phyCARD-M” string, only the first seven characters of the buffer were written to the screen. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 95: Using The Memory Monitor

    • Select the Memory tab. • Click Add Memory Monitor. • Enter the address of buffer and click OK. Remember that the variable’s address might differ on your system. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 96 Quick Start Instructions • Change the window size. • Click Add Rendering. • Select ASCII and click OK. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 97 Eclipse for remote debugging. You can step through a project, watch and change the content of variables, and you can use the memory monitor to view the content at a memory address. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 98: Chapter 5 Summary

    The Debugging part of this Quick Start gave you information on setting up and using the GNU debugger with the Eclipse IDE. You learned how to set breakpoints, watching and changing variable contents and using the memory monitor. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 99: Chapter 6 Installing Linux On The Phycard-M

    • Insert your PHYTEC Linux-phyCARD-M-Disc, navigate to the PHYTEC\PCA101 phyCARD-M\Linux-Kit\Software\Tools\ ADS_Toolkit directory, and execute Setup.exe to install the AdvancedToolKit. • There are three additional files in the PHYTEC\PCA101 phyCARD- M\Linux-Kit\Software\Tools\ADS_Toolkit directory: One ending with .cfg, the second ending with .bin and the other ending with .txt.
  • Page 100 • Select DDR2 as initial device memory.. • Select the Serial Port which the phyCARD-M is connected to. • Click Next. • In the next window, select Flash Tool. • Click Go to run the selected tool. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 101 Installing Linux on the phyCARD-M • Select Erase in the Operation type section. • Choose NAND PHYTEC from the Flash model drop-down box. • In the Operating settings section, set Address to 00000000 and Size to 40000. A size of 40000 will delete the Barebox flash partition only. If you also want to delete the Barebox environment partition to start over with the default Barebox environment, set Size to 60000.
  • Page 102 • Click the Browse button in the Image section to select the Barebox image you want to write to the target. Navigate to the directory \PHYTEC\PCA101 phyCARD-M\Linux-Kit\BSP\Barebox\bin on your setup CD-ROM and choose the .bin file you find there. • Now click Program. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 103 Installing Linux on the phyCARD-M • When finished, power down the baseboard. • Configure JP1 by closing PIN 1+2 to boot with NAND Flash © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 104: Configure Barebox Environments Variables

    If you want to use a program other than Microcom for serial communication, you will have to setup that program with these settings. • Connect the AC adapter with the power supply connector PWR (12V) on your board. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 105 Installing Linux on the phyCARD-M • Press any key to stop autoboot. • Type edit /env/config to check and edit the configuration file. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 106: Restoring The Barbebox Default Configuration

    • erase /dev/nand0.bareboxenv After pressing the RESET button on your board, the default Barebox configuration will be used. This also means that you will be asked to enter the MAC address of your board again. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 107: Writing The Kernel / Root File System Into Flash

    Finally the kernel or root file system image can be transferred from RAM into flash. In the directory PHYTEC/PCA101 phyCARD-M/Linux-Kit/BSP/Images on your setup CD-ROM you can find a file called uImage-pca101 – this file is the Linux kernel image. There is another file, root-pca101.jffs2; this file contains the Linux root file system.
  • Page 108 The copy process can take quite a while, depending on the speed of your system. • Press the RESET button on the board to restart your target. The target should now start with the kernel and root file system you have written into the flash. © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 109 How would you improve this manual? page Did you find any mistakes in this manual? Submitted by: Customer number: Name: Company: Address: Return to: PHYTEC Messtechnik GmbH Robert-Koch-Str. 39 D-55129 Mainz Fax: +49 (6131) 9221-26 © 2010 PHYTEC Messtechnik GmbH L-746e_1...
  • Page 110 Published by © 2010 PHYTEC Messtechnik GmbH Ordering No. L-746e_1 Printed in Germany...

Table of Contents