+ All Categories
Home > Documents > Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1...

Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1...

Date post: 02-Jul-2018
Category:
Upload: lamlien
View: 265 times
Download: 0 times
Share this document with a friend
38
Sitara Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training List Introduction This lab is going to walk you through the process of using CCSv5 to debug U-Boot and the Linux kernel on the AM335x EVM. For more information on the overall debug flow please refer to the accompanying debug presentation. Before you Begin ...... Just a reminder of directory notation, when seeing the ~/ti-sdk.... the ~ represents that user's home directory. In effort to make this article future proof in terms of SDK version numbers future proof please note the following method to be used to substitute the current SDK version numbers. There is a version number for the Sitara Linux SDK as well as a version number for the underlying PSP. For example in this article Sitara Linux SDK and PSP versions will be displayed like this: ti-sdk-am335x-evm-xx.xx.xx.xx/board-support/u-boot-2011.09-pspxx.xx.xx.xx At the time this article was written, the version numbers translated to this ti-sdk-am335x-evm-05.05.00.00/board-support/u-boot-2011.09-psp04.06.00.08 Please note that the "tab" key can be used to auto-complete a version number NOTE: In this guide commands to be executed for each step will be marked in BOLD Lab Configuration The following are the hardware and software configurations for this lab. The steps in this lab are written against this configuration. The concepts of the lab will apply to other configurations but will need to be adapted accordingly. Hardware 1. AM335x EVM-SK (https://estore.ti.com/TMDSSK3358-AM335x-Starter-Kit-P3110.aspx [1] ) You can also use a beaglebone for this lab (http://beagleboard.org/buy [2] ) 2. 5V power supply 3. USB cable to connect the board to you Linux Host 4. An XDS100 V2 emulator. For EVM-SK and Beaglebone this is built into the device and provided over the same USB connection as your serial console. NOTE Through trial and error it was found that XDS100 based emulators do not perform well under a VM environment. This is due to the base VMWare driver for these devices and the low throughput they provide. An XDS560 V2 was found to have the best performance under VMWare
Transcript
Page 1: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 1

Sitara Linux Training: uboot linux debug withccsv5Return to the Sitara Linux Training List

Introduction

This lab is going to walk you through the process of using CCSv5 to debug U-Boot and the Linux kernel on theAM335x EVM. For more information on the overall debug flow please refer to the accompanying debugpresentation.

Before you Begin ......Just a reminder of directory notation, when seeing the ~/ti-sdk.... the ~ represents that user's home directory.In effort to make this article future proof in terms of SDK version numbers future proof please note the followingmethod to be used to substitute the current SDK version numbers. There is a version number for the Sitara LinuxSDK as well as a version number for the underlying PSP.

For example in this article Sitara Linux SDK and PSP versions will be displayed like this:• ti-sdk-am335x-evm-xx.xx.xx.xx/board-support/u-boot-2011.09-pspxx.xx.xx.xxAt the time this article was written, the version numbers translated to this• ti-sdk-am335x-evm-05.05.00.00/board-support/u-boot-2011.09-psp04.06.00.08Please note that the "tab" key can be used to auto-complete a version number

NOTE: In this guide commands to be executed for each step will be marked in BOLD

Lab ConfigurationThe following are the hardware and software configurations for this lab. The steps in this lab are written against thisconfiguration. The concepts of the lab will apply to other configurations but will need to be adapted accordingly.

Hardware1. AM335x EVM-SK (https:/ / estore. ti. com/ TMDSSK3358-AM335x-Starter-Kit-P3110. aspx [1])

• You can also use a beaglebone for this lab (http:/ / beagleboard. org/ buy [2])2. 5V power supply3. USB cable to connect the board to you Linux Host4. An XDS100 V2 emulator. For EVM-SK and Beaglebone this is built into the device and provided over the same

USB connection as your serial console.NOTEThrough trial and error it was found that XDS100 based emulators do not perform well under a VMenvironment. This is due to the base VMWare driver for these devices and the low throughput they provide.An XDS560 V2 was found to have the best performance under VMWare

Page 2: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 2

Software1. A Linux host system configured as per the Linux Host Configuration page

• Make sure you have installed the version of CCSv5 provided with the Sitara SDK installed under sudo modeso the JTAG drivers are installed (with either temporary license or permanent license)

• Sitara Linux SDK installed. This lab assumes the SDK is installed in /home/sitara. If you use a differentlocation please modify the below steps accordingly.

2. setup.sh script in the SDK run to configure the target device for NFS and TFTP.• For help configuring the NFS and TFTP setup see Sitara Linux Training: Hands on with the SDK

3. SD card with Sitara Linux SDK installed.• For help creating a 2 partition SD card with the SDK conent see the create_sdcard.sh script page

IMPORTANTFor this lab you should either remove the uImage file on the boot partition of the SD card, or rename the fileuImage-pre-built. This is to prevent the board from booting automatically from the SD card when the card isinstalled

Configure your Development Environment

DescriptionThis section is going to walk you through the steps to make sure your development environment is properlyconfigured.

Key Points• Setting up the system for Debug• Verifying your console connection

Lab Steps1. Remove the SD card from board2. Setup USB cable connection between the board and your Linux Host

1. The following steps will help you validate that you have a valid serial connection with your target boardIMPORTANTThese steps are written for boards like the EVM-SK and Beaglebone which use an FTDI USB-to-Serialadapter. For boards with a straight UART connection you can ignore the steps for /dev/ttyUSBx and insteadjust use the serial port on your Linux host that is connected to the board

• Connect the USB cable between your Linux host and your target boardIMPORTANTOn the AM335x EVM-SK, the USB cable enables a USB-to-serial interface to the Linux host PC. If using avirtual machine, please insure the AM335x EVM-SK is a selected USB device.NOTEIf you are running your VMWare image with Windows 7 some USB-to-Serial adapters do not properly workwith Windows 7. Make sure that your adapter specifically says that it supports Windows 7. You may also needto install an additional driver for your adapter.

• Open a terminal and run the following command to find the USB serial adapters available on the system. TheFTDI chip used on the board presents two serial interfaces to the Linux host. The first interface is the JTAGinterface and the second one is the serial console interface.

Page 3: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 3

ls /dev/ttyUSB*

You should see output like:/dev/ttyUSB0/dev/ttyUSB1

NOTEIf using VMWare you may need to pass the "Future Technology Devices" device into the VMWare image• As mentioned above since the board's serial interface is the second interface you will want to open a serial

console to the second device node. In this case that is /dev/ttyUSB1. This can be done by doing:• minicom -w -s• Select Serial port setup and press ENTER• Press A to modify the Serial Device and change the device to /dev/ttyUSB1. Press ENTER• Press ENTER to exit the serial setup• Select Exit and press ENTER

• You should now see a minicom window.• Power on the board, you should see "ccccc" being printed in the window, if so the serial connection is working

as expected. Go ahead and leave this console RUNNING in the background.NOTEFor the EVM-SK board the power button is under the board in the upper-right hand corner. You must pressand hold this button to power on the board.NOTEFor the Beaglebone the board will power on as soon as the USB cable is connected. you can reset the board bypressing the reset button which should provide you with the expected output

Setup a U-Boot Debug Project

DescriptionThis lab will step you through the steps necessary to create a CCS project. Here a project for U-Boot will be created.

Key Points• A CCS project is set up and assigned a source tree that is indexed, this speeds up source level debug.

Lab Steps1. Start CCS by double clicking the Code Composer Studio v5 icon on the desktop

2. You will see the CCSv5 splash screen appear while CCS loads

Page 4: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 4

3. The next window will be the Workspace Launcher window which will ask you where you want to locate yourCCSv5 workspace. Take the default value.

4. CCS will load the workspace and then launch to the default TI Resource Explorer screen

Page 5: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 5

5. Close the TI Resource Explorer screen. This screen is useful when making TI CCS projects which use TI tools.The Sitara Linux SDK uses open source tools with the standard Eclipse features and therefore does not use the TIResource Explorer. You will be left in the Project Explorer default view.

6. Create New User Project

Page 6: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 6

• Select File -> New -> Project• Expand the C/C++ category• Select Makefile Project with Existing Code

• Click Next to enter the Import Existing Code dialog7. Import the U-Boot code using the following steps

• Click the Browse button.• Navigate the the U-Boot source directory. This is by default located at

/home/sitara/ti-sdk-am335x-evm-xx.xx.xx.xx/board-support/u-boot-xx.xx.xx.xx• Click OK to select this as the root of the existing code

IMPORTANTYou should see the the Project Name has been filled in for you. You should take this default value because itallows easy association between the binaries being loaded later and the sources for the project. Changing thisvalue can break that association.

• Your project configuration should look something like

Page 7: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 7

• Click Finish8. You should now be back at the main CCS screen. You should see your project listed in the Project Explorer tab

and the code indexer running at the bottom right

Page 8: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 8

Setup Linux Kernel Debug Project

DescriptionThis lab will step you through the steps necessary to create a CCS project. Here a project for the Linux kernel iscreated.

Key Points• A CCS project is set up and assigned a source tree that is indexed, this speeds up source level debug.

Lab Steps1. With CCS still running from

Sitara_Linux_Training:_uboot_linux_debug_with_ccsv5#Setup_a_U-Boot_Debug_Project Setup a U-BootDebug Project re-run the steps with the following change• Instead of browsing to the u-boot sources browse to the

/home/sitara/ti-sdk-am335x-evm-xx.xx.xx.xx/board-support/linux-xx.xx.xx directory.2. Once you have finished importing this project you should now see both the u-boot and Linux kernel projects in

your Project Explorer tab.

Page 9: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 9

Setup Target Configuration

DescriptionThis section is going to walk you through the steps to set up a CCS target configuration. This is necessary to connectto a target for debugging both U-Boot and Linux.

Key Points• How to create a new target connection• Selecting the JTAG emulator and board type

Lab Steps1. Select File -> New -> Target Configuration File2. In the New Target Configuration dialog box give the configuration a name. For this lab we will use

AM335x-TC

3. Click Use shared location, then Click Finish4. The AM335x-TC configuration you created will now be opened for editing. Perform the following steps to finish

the target configuration.• In the Connection drop-down box select Texas Instruments XDS100v2 USB Emulator

NOTEIf you are using a different emulator please select that one instead. You will only see emulators for which youhave installed the drivers

• In the Board or Device selection list check the AM335x device• You screen should look like

Page 10: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 10

• Click the Save button at the right of the screen5. You can now test your target connection by pressing the Test Connection button at the right of the screen.

• You should see a dialog box open. Scroll to the bottom of the output and look for the The JTAG DR Integrityscan-test has succeeded

Page 11: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 11

NOTEThere are other tests run during the connection test and the status of these tests is also displayed in the dialogboxNOTEThe JTAG scan test may take a few seconds to complete on slower laptops.

6. Close the Test Connection dialog box7. The target connection is now created

Build U-Boot for Debug

DescriptionThis section is going to walk you through the steps to build SPL and U-Boot for debugging.

Key Points• The ELF images from a build of U-Boot contains the debug information necessary.• Which images are used for debugging

Lab Steps1. Open a console terminal2. Change Directories to the Sitara SDK Board Support U-Boot Source tree

• ti-sdk-am335x-evm-xx.xx.xx.xx/board-support/u-boot-2011.09-pspxx.xx.xx.xx3. Add the build tools from the SDK into your PATH

NOTEYou can also call the build tools with the absolute path, but this step will make it easier to type the followingcommandsMake sure the build tools from the SDK are in the Path

• echo $PATH• If you see something like this for the PATH, which contains the linux-devkit/bin directory then the tools are

already in your PATH./usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/sitara/ti-sdk-am335x-evm-05.04.01.00/linux-devkit/bin/

• If the tools are not in the PATH then add them with this command (hint:use the Tab key to complete directorypaths)export PATH=$PATH:/home/sitara/ti-sdk-am335x-evm-xx.xx.xx.xx/linux-devkit/bin

4. Clean the U-Boot sources to start with a known good setupNOTEIn the following commands there should always be a space after the arm-arago-linux-gnueabi- entry

• make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- distclean5. Perform configuration to default for the AM335x device

NOTEThe same configuration is used for the EVM, EVM-SK, and Beaglebone

• make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- am335x_evm_config6. Compile SPL and U-Boot

• make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-7. When the build finishes you should have the following files created

Page 12: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 12

• u-boot - ELF image that contains debug symbols• spl/u-boot-spl.bin - stripped binary SPL image that can fit into the internal memory• spl/u-boot-spl - Full SPL image containing all debug symbols. Too big for internal memory but can be used to

load the symbols8. Go ahead to the next lab step to build the kernel while U-Boot finishes building

Build The Linux Kernel for Debug

DescriptionThis section is going to walk you through the steps to build a Kernel Image with debug information.

Key Points• Debug information needs to be stored in the vmlinux image.• Using the kernel configuration utility kernel debug information can be enabled.

Lab Steps1. Open another console terminal2. Change Directories to the Sitara SDK Board Support Linux Source tree

• ti-sdk-am335x-evm-xx.xx.xx.xx/board-support/linux-xx.xx.xx-pspxx.xx.xx.xx• This directory is where all commands below are referenced from

3. Add the build tools from the SDK into your PATHNOTEYou can also call the build tools with the absolute path, but this step will make it easier to type the followingcommandsMake sure the build tools from the SDK are in the Path

• echo $PATH• If you see something like this for the PATH, which contains the linux-devkit/bin directory then the tools are

already in your PATH./usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/sitara/ti-sdk-am335x-evm-05.04.01.00/linux-devkit/bin/

• If the tools are not in the PATH then add them with this command (hint:use the Tab key to complete directorypaths)export PATH=$PATH:/home/sitara/ti-sdk-am335x-evm-xx.xx.xx.xx/linux-devkit/bin

4. Clean the kernel sourcesNOTEIn the following commands there should always be a space after the arm-arago-linux-gnueabi- entry

• make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- mrproper

NOTEThe make target of mrproper is used to reset the build configuration to a default state. This is done prior toconfiguring the kernel for a processor configuration.

5. Start with the default Sitara Linux SDK configurationNOTEThere are two config files for the AM335x in the kernel tree. This lab uses the tisdk_am335x-evm_config filewhich matches the configuration used for the Sitara Linux SDK build

• make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- tisdk_am335x-evm_defconfig

Page 13: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 13

6. Modify the Kernel configuration for debug• make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- menuconfig

NOTEAll the debug configuration information is enabled in the kernel hacking choice of kernel configuration. Aquick note about navigating within menuconfig. The up/down move the cursor vertically on the menu choices.Use the left/right arrows to move the cursor between select and exit. Use the the space bar to select a kernelconfiguration choice. To navigate up from a submenu, use the right arrow to select exit and press enter.

• Navigate into the Kernel Hacking submenu. Use the down arrow to select the Kernel Hacking submenu andpress enter. This will navigate into the submenu.

• Enable Kernel debug info under Kernel Hacking submenu by using the SPACE bar

Page 14: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 14

• Enable Compile Kernel with Debug info under Kernel Hacking submenu. Using the up/down to navigate thesubmenu, use the space bar to select.

• Enable Stack Unwinding support under the Kernel Hacking submenu

Page 15: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 15

• Have to change submenus, use the right arrow to select exit and press enter.• Navigate to General Setup at the top of the menuconfig and enter that submenu• Enable Prompt for development and/or incomplete code/drivers support under General Support. If you do

not see this option then you do not have the correct kernel defconfig.

• Navigate up to top menu by selecting exit

Page 16: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 16

• Select exit again to leave the configuration utility• Save the kernel configuration

IMPORTANTBe sure to save the kernel configuration. (Note this is where to put cursor on exit using the right arrow andpressing enter to navigate up the kernel configuration tree.

7. Build the kernel• make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- uImage

8. When the build is finished, copy the kernel into the tftp directory• cp arch/arm/boot/uImage /tftpboot

9. Go ahead and continue with the next lab step while the kernel finishes building.

Change ARM mode

DescriptionThis section will walk you through how to change the ARM core mode from THUMB-2 to ARM which is requiredto run the SPL and U-Boot binaries. This is normally done by the ROM code but since we are bypassing the ROMcode load of the SPL we will need to do it ourselves.

Key Points• Changing the ARM core mode from THUMB-2 to ARM

Lab Steps1. Switch back to your CCS window2. Launch your target configuration

• Click View -> Target Configurations

This should open a tab on the right side of your screen called Target Configurations• Expand the User Defined list• Right-Click the AM335x-TC configuration and select Launch Selected Configuration

3. You view should have changed to now show a Debug tab and the scan chain for the AM335x

Page 17: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 17

NOTEYou can close the AM335x-TC file. You may also want to re-arrange the windows to make viewing easier

4. Right-Click the CortxA8 line item and select Connect Target

• This will connect to the target and halt the processor.

Page 18: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 18

NOTEYou will likely see a message about no source available for some memory address. This is not important

5. Now that you have connected you can set the processor in ARM Mode with CCSIMPORTANTThe ROM code runs in Thumb2 Mode and before the SPL code can be run the processor must be set to ARMmode. This would normally be done by the ROM code, but since we are bypassing the ROM load of the SPLwe must do it ourselves

• Select the Registers tab

• Expand the Core Registers• Inside of Core Registers expand the CPSR list

Page 19: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 19

• Scroll down in the CPSR register list and change the T register from 1 to 0. This is done by• Clicking the the Value box for the T register where the 1 located• Pressing delete to remove the value• Entering 0• Pressing Enter

• You should see the CPSR value change to reflect the new value

Page 20: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 20

IMPORTANTYou need to do this each time the board is powered completely off or reset. If you use the JTAG to do a SWreset this value will be preserved as well. Likewise, if you attach to a board that was already running a bootedsystem this value will be configured properly but you should always go ahead and check it just to be safe

Perform SPL Debug

DescriptionThis section will walk you through how to do source level debugging of the SPL code. This section is requiredbefore debugging U-Boot to make sure that the processor is set into the right mode and that the SPL has initializeddevice.

Key Points• Loading the SPL binary• Loading the SPL symbols• Setting break points• Stepping through code

Page 21: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 21

Lab Steps1. Assuming that the processor is now in ARM mode from the previous lab you can now load the SPL binary into

the internal chip memory. This is done using the following steps• Click Tools -> Load Memory

IMPORTANTThe Load Memory tool is used here because we are loading the SPL binary and not and ELF image. Thereason for this is that the binary is sized to be able to fit into the internal RAM of the SoC

• Click the Browse button and browse to the following directory/home/sitara/ti-sdk-am335x-evm-xx.xx.xx.xx/board-support/u-boot-xx.xx.xx/spl

• Change the filter in the lower-right corner to All (*)

• Select the u-boot-spl.bin file and click OK• You should now be back at the Load Memory dialog. Select Next• In the next screen change the following settings

• Start Address: 0x402F0400

IMPORTANTThis is the start address of the SPL binary as defined in the u-boot sources• Type-size: 32 bits

Page 22: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 22

• Click Finish• You should see a box pop up showing the memory load operation

NOTEThis may take a bit of time since the XDS100v2 is a slower JTAG emulator than some other devices. Just bepatient and allow the process to finish

Page 23: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 23

2. Now that the SPL binary is loaded you can use the following commands to load the symbols for that binary toallow source level debugging• Click Run -> Load -> Load Symbols...• In the dialog box click the Browse button• Like before browse to the spl directory and change the filter to All• Select the u-boot-spl file which is the ELF executable that also contains the symbols and click OK• Click OK

3. Now that the binary and symbols are loaded we need to set the program counter to the beginning of the SPL code.To do this go back to your Registers Tab and in the Core Registers list change the PC value to the start addressyou entered before (0x402F0400)

4. Click View -> Disassembly to open the Disassembly view and see that the program counter is now at0x402F0400 and that there appears to be valid content in the memory.

Page 24: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 24

5. Now open the source file so we can set a breakpoint in the spl_board_init function• Click File -> Open File• Browse to /home/sitara/ti-sdk-am335x-evm-xx.xx.xx.xx/board-support/u-boot-xx.xx.xx/board/ti/am335x/• select the evm.c file and click OK• Use CTRL+F to search for spl_board_init

6. Set a hardware breakpoint by doing the following• Right-Click the line number on the left side that you want to set a breakpoint at• Select Breakpoint (Code Composer Studio) -> Hardware Breakpoint. For this lab select line 582• You should now see a Breakpoints tab opened listing your new breakpoint

Page 25: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 25

7. You can now click the green run arrow to start execution of the SPL code. You should notice the execution stopat your breakpoint.

8. You can now use the step operations to step over and into functions. You can also double-click on variable namesto see their values.

Page 26: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 26

• For example click the header variable on line 584 and you can see the value of that structure

• Go ahead and click the Step Into operation to step into the board_init function

NOTEThe yellow arrows are for source step operations, the green arrows are for assembly step operationsIMPORTANTBecause of compiler optimizations the source level step operations may not be 100% accurate, but they aregenerally close enough to give you an idea of what is going on

9. Go ahead and click the green run button to let SPL finish running to completion10. After a second or two press the yellow pause symbol to suspend execution#

Page 27: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 27

11. You should either see output on the console window of ### ERROR ### Please RESET the board ### or theequivalent line in C code

IMPORTANTYou will only see the console output on your minicom window.

12. This means that SPL has run and tried to read the U-Boot image from the SD card, the default boot setting forthe EVM. The processor now has the SPL context which means means the board is ready for U-Boot.

IMPORTANTDO NOT RESET YOUR BOARD. If you reset your board at this point you will need to re-run these steps andre-load SPL to go on to the debugging U-Boot lab

Perform U-Boot Debug

DescriptionThis section is going to walk you through the steps to debug a U-Boot Image. In the previous step SPL was run toenable the SoC to be ready for the U-Boot image. A HW break point will be set in an intialization function. After thebreak point is triggered, CCS will be used to step in and over functions and a memory location will be accessed.

Key Points• Loading an ELF image into the processor memory instead of a raw binary• Setting break points

Page 28: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 28

Lab Steps1. Assuming that you have executed SPL you can now perform the following steps to load the U-Boot ELF image.

• Click Run -> Load -> Load Program...• Click the Browse button and this time select the u-boot file in the

/ti-sdk-am335x-evm-xx.xx.xx.xx/board-support/u-boot-xxxx.xx-pspxx.xx.xx.xx directory

NOTEAs always you will need to change the filter to All

• Click OK to load the programIMPORTANTAs with the SPL load this may take some time and you may see your screen gray out periodically. This is OK.Be patient and allow the operation to finish. This is again due to the slower speed of the XDS100v2 emulator

2. Notice that this time because an ELF image was loaded the PC was automatically set for you because CCS hadenough information in the image to do so.

Page 29: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 29

3. Determine the U-Boot relocation offset.• Now that U-Boot is loaded go ahead and run the executable by clicking the green run arrow

NOTEIn the minicom window you should see U-Boot start running and timeout after three seconds. It will end withan error about being unable to get the kernel image. This is OK

• In your minicom terminal use the command bdinfo to find the relocaddr.You should see output like the following which shows the relocation address to be 0x8FF88000

Page 30: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 30

IMPORTANTYou want to get the relocaddr value, NOT the 'reloc off value.

IMPORTANTThe values shown here are for a beaglebone. The relocaddr value can change depending on how muchmemory your target board has

4. Re-load U-Boot now that we have the relocation information so we can be ready to debug• Click Run -> Load -> Reload Program and allow the load to finish

5. Now the U-Boot is loaded again we need to reload the symbols based on the relocation offset we determinedbefore. This way the hardware breakpoints we set next will actually work.• Click Run -> Load -> Load Symbols...

• Make sure that the Program file entry is still set to your u-boot file. If not then browse to the proper file.• In the Code offset field enter the offset value you found before. i.e. 0x8FF88000• In the Data offset field enter the offset value you found before. i.e. 0x8FF88000

Page 31: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 31

IMPORTANTAs was discussed in the presentation that accompanies this lab u-boot initially loads into low memory. U-Bootthen relocates itself into high memory later to make room for the Linux kernel.This relocation is done by the relocate_code function which is called very early in the U-Boot process,generally in areas that should not need modification.In this lab we will be setting a breakpoint AFTER the code has been relocated, so you will have to reload thesymbols as instructed below. However, if you truly did want to debug that early code you would not want toreload these symbols

6. The following steps will look familiar from the SPL debug lab and will cover setting breakpoints in U-Boot.• If you do not already have the evm.c file open then do File -> Open File and navigate to the

ti-sdk-am335x-evm-xx.xx.xx.xx/board-support/u-boot-2011.09-pspxx.xx.xx.xx/board/ti/am335x dirctoryand select evm.c

• Search for the definition of the board_evm_init function (around line 766)• Set A HW Break Point at the start of function int board_evm_init(void) (around line 767)

NOTEThis is done the same way as with SPL, by right-clicking the line number and selecting the HW breakpoint

7. Click the green run arrow to resume execution. You should see you hardware breakpoint be hit and the minicomoutput should stop at the line:

• No daughter card present8. You can now do single step and step over operations in the same way you did for SPL.9. CCS also has be ability to show you the contents of memory, which can be useful when debugging register

values. To view a memory location do:• Click View -> Memory Browser• In the text box enter the following address and press ENTER

• 0x44E10600• You should see output like the following

Page 32: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 32

10. The value read above matches the Device ID value defined in the TRMNOTEYou can find the Device ID value in the TRM in section 9.3.2 as well as its offset. Adding that offset to thebase address for the CONTROL_MODULE registers found in table 2-2 of section 2.1 gives the address usedof 0x44E10600

Perform Linux Kernel Debug

DescriptionThis lab will show how to set debug the kernel. Here MLO and U-Boot are being loaded from the SD card. Next thevmlinux image is loaded that contains the debug information. A HW break point will be set and then using the bootcommand from a U-Boot prompt the kernel will be tftp'd from the host machine and the bootm command issued. Asthe kernel boots this particular break point should be hit as it is set in an initialization in the target board file which isexecuted on kernel boot.

Page 33: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 33

Key Points• Using vmlinux image to source level debug of the linux kernel• Virtual to Physical location access

Lab Steps1. If CCS is still connected click the red square icon to Terminate the connection2. Make sure your SD card is not in the board3. Re-launch the target configuration by

• Right-clicking on the AM335x-TC file and selecting Launch Selected Configuration• Right-clicking on the CortxA8 line and selecting Connect Target

IMPORTANTWhen using the XDS100v2 on a Beaglebone connecting to the target causes the system to reset and the bootsequence to start over. In this case you should perform the following steps# In CCS click the green run arrow# In minicom press any key to stop the autoboot

4. Put the SD card with the MLO and U-Boot image into the board5. Go to your minicom window6. Press the reset button on the EVM-SK and stop the autoboot7. After stopping the auto boot sequence this is the output that should be seen on the serial console.8. Click the yellow pause icon to Suspend the processor9. From CCS load symbols from the vmlinux image from the debug configured kernel build

• Click Run -> Load -> Load Symbols...• Click the Browse button and navigate to the linux source directory

/home/sitara/ti-sdk-am335x-evm-xx.xx.xx.xx/board-support/linux-xx.xx.xx/• Change the filter to All as usual and select the vmlinux file

Page 34: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 34

• If you still have offsets configured from the U-Boot lab delete them

• Click OK10. Set a hardware breakpoint

• Click File -> Open File• Navigate to the

/home/sitara/ti-sdk-am335x-evm-xx.xx.xx.xx/board-support/linux-xx.xx.xx/arch/arm/mach-omap2directory

• Select the board-am335xevm.c file• Set the hardware breakpoint at the entry to the am335x_evm_setup function• The break point will now be displayed in the break point window.

11. Resume the target by clicking the green run arrow12. After resuming from the serial console press the enter key a few times, the u-boot prompt should be printed on

each key press. This shows that the processor is executing U-Boot.13. Boot the kernel uImage to the board by tftp'ing the kernel image into DDR and running the bootm command

Page 35: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 35

• On a HOST console run• ifconfig to find out the ip address, this will be the u-boot serverip

• On the minicom console to the target run• setenv serverip <host machine ip address>• setenv bootfile uImage• dhcp

NOTEIn U-Boot autoload is defaulted to y, this command will get both the ip address for the board and load thekernel.

• From the minicom console bootm 0x82000000

NOTEThe kernel is told to boot from memory address 0x82000000, this is the location where tftp put the kernel, thisis an environment variable in U-Boot.

14. The kernel should now start to boot and stop at the HW break point• In the minicom window the processor is halted at the daughter card detection output• In the CCS window the processor is halted at the break point

NOTEAlways pause the execution before setting a breakpoint.NOTEA general note on pause and stop. Pause stops the execution so breakpoints, memory location etc. can beexamined. The stop command terminates the debug session.

15. Like in the U-Boot portion of the lab the processor can be single stepped and step over functions.IMPORTANTBecause the kernel is compiled with optimizations enabled the step functions do not always corresponddirectly to the lines of code. i.e. it may take multiple clicks to move one line.

16. Open a Memory Browser and see how to look at a physical location through a virtual address• The CCS memory browser is only able to use the virtual addresses that the Kernel has setup. To view a

physical location an offset has to be added to the physical address that is in the TRM. For the AM335x thatoffset is 0xb5000000. This value is found here in the linux kernel source:• linux-3.2-pspxx.xx.xx.xx.sdk/arch/arm/plat-omap/include/plat/io.h• AM33XX_L4_WK_IO_OFFSET 0xb5000000

• Enter the address 0xF9E10600, this is the Device ID, the actual physical location 0x44E10600

Page 36: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Sitara Linux Training: uboot linux debug with ccsv5 36

• Enter the address 0xF9E10630, this is the MAC IDs for the AM335x, the actual physical location 0x44E10630

17. Once done examining memory resume the target and let the kernel finish booting.

References[1] https:/ / estore. ti. com/ TMDSSK3358-AM335x-Starter-Kit-P3110. aspx[2] http:/ / beagleboard. org/ buy

Page 37: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

Article Sources and Contributors 37

Article Sources and ContributorsSitara Linux Training: uboot linux debug with ccsv5  Source: http://processors.wiki.ti.com/index.php?oldid=122617  Contributors: Cem8101, Fcooper, Kevinsc, SchuylerPatton

Image Sources, Licenses and ContributorsImage:TIBanner.png  Source: http://processors.wiki.ti.com/index.php?title=File:TIBanner.png  License: unknown  Contributors: NsnehaprabhaImage:Sitara-Linux-CCS-icon.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-Linux-CCS-icon.png  License: unknown  Contributors: Cem8101Image:Sitara-Linux-CCS-splash-screen.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-Linux-CCS-splash-screen.png  License: unknown  Contributors: Cem8101Image:Sitara-Linux-CCS-workspace.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-Linux-CCS-workspace.png  License: unknown  Contributors: Cem8101Image:Sitara-Linux-CCS-resource-explorer.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-Linux-CCS-resource-explorer.png  License: unknown  Contributors:Cem8101Image:Sitara-Linux-CCS-project-explorer.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-Linux-CCS-project-explorer.png  License: unknown  Contributors: Cem8101Image:Sitara linux training new project create u.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara_linux_training_new_project_create_u.png  License: unknown Contributors: SchuylerPattonImage:Sitara-linux-training-import-code.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-import-code.png  License: unknown  Contributors: Cem8101Image:Sitara-linux-training-code-indexer.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-code-indexer.png  License: unknown  Contributors: Cem8101Image:Sitara-linux-training-projects-imported.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-projects-imported.png  License: unknown  Contributors:Cem8101Image:Sitara-linux-training-new-target-config.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-new-target-config.png  License: unknown  Contributors:Cem8101Image:Sitara-linux-training-am335x-tc.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-am335x-tc.png  License: unknown  Contributors: Cem8101Image:Sitara-linux-training-test-connection.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-test-connection.png  License: unknown  Contributors:Cem8101Image:Sitara linux training kernel config 1.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara_linux_training_kernel_config_1.png  License: unknown  Contributors:SchuylerPattonImage:Sitara linux training kernel debugging 1.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara_linux_training_kernel_debugging_1.png  License: unknown Contributors: SchuylerPattonImage:Sitara linux training kernel debug enable 9.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara_linux_training_kernel_debug_enable_9.png  License: unknown Contributors: SchuylerPattonImage:Sitara linux training kernel hack 2.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara_linux_training_kernel_hack_2.png  License: unknown  Contributors:SchuylerPattonImage:Sitara linux training kernel hack 3.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara_linux_training_kernel_hack_3.png  License: unknown  Contributors:SchuylerPattonImage:Sitara-linux-training-scan-chain.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-scan-chain.png  License: unknown  Contributors: Cem8101Image:Sitara-linux-training-connect-target.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-connect-target.png  License: unknown  Contributors: Cem8101Image:Sitara-linux-training-registers-tab.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-registers-tab.png  License: unknown  Contributors: Cem8101Image:Sitara-linux-training-cpsr-regs.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-cpsr-regs.png  License: unknown  Contributors: Cem8101Image:Sitara-linux-training-setting-arm-mode.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-setting-arm-mode.png  License: unknown  Contributors:Cem8101Image:Sitara-linux-training-spl-binary.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-spl-binary.png  License: unknown  Contributors: Cem8101Image:Sitara-linux-training-load-memory.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-load-memory.png  License: unknown  Contributors: Cem8101Image:Sitara-linux-training-memory-load.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-memory-load.png  License: unknown  Contributors: Cem8101Image:Sitara-linux-training-set-PC.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-set-PC.png  License: unknown  Contributors: Cem8101Image:Sitara-linux-training-spl-loaded.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-spl-loaded.png  License: unknown  Contributors: Cem8101Image:Sitara-linux-training-spl-breakpoint.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-spl-breakpoint.png  License: unknown  Contributors: Cem8101Image:Sitara-linux-training-run-arrow.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-run-arrow.png  License: unknown  Contributors: Cem8101Image:Sitara-linux-training-header-value.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-header-value.png  License: unknown  Contributors: Cem8101Image:Sitara-linux-training-step-into.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-step-into.png  License: unknown  Contributors: Cem8101Image:Sitara-linux-training-select-uboot.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-select-uboot.png  License: unknown  Contributors: Cem8101Image:Sitara-linux-training-PC-auto-set.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-PC-auto-set.png  License: unknown  Contributors: Cem8101Image:Sitara-linux-training-relocaddr.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-relocaddr.png  License: unknown  Contributors: Cem8101Image:Sitara-linux-training-uboot-offset.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-uboot-offset.png  License: unknown  Contributors: Cem8101Image:Sitara-linux-training-memory-view.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-memory-view.png  License: unknown  Contributors: Cem8101Image: Sitara-linux-training-select-vmlinux.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-select-vmlinux.png  License: unknown  Contributors:Cem8101Image:Sitara-linux-training-vmlinux-offset.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara-linux-training-vmlinux-offset.png  License: unknown  Contributors: Cem8101Image:Sitara linux training linux contxt device id.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara_linux_training_linux_contxt_device_id.png  License: unknown Contributors: SchuylerPattonImage:Sitara linux training linux context mac id.png  Source: http://processors.wiki.ti.com/index.php?title=File:Sitara_linux_training_linux_context_mac_id.png  License: unknown Contributors: SchuylerPatton

LicenseTHE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHERAPPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BEA CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.License1. Definitions

Page 38: Sitara Linux Training: uboot linux debug with ccsv5 Linux Training: uboot linux debug with ccsv5 1 Sitara Linux Training: uboot linux debug with ccsv5 Return to the Sitara Linux Training

License 38

a. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, orphonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a workthat constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work intimed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License.

b. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below,which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constitutingseparate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined below) for the purposes of this License.

c. "Creative Commons Compatible License" means a license that is listed at http:/ / creativecommons. org/ compatiblelicenses that has been approved by Creative Commons as being essentially equivalent to this License,including, at a minimum, because that license: (i) contains terms that have the same purpose, meaning and effect as the License Elements of this License; and, (ii) explicitly permits the relicensing of adaptations of works madeavailable under that license under this License or a Creative Commons jurisdiction license with the same License Elements as this License.

d. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership.e. "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike.f. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.g. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a

performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram theproducer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast.

h. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expressionincluding digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; amusical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving orlithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography,topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is nototherwise considered a literary or artistic work.

i. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exerciserights under this License despite a previous violation.

j. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; tomake available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and thecommunication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images.

k. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protectedperformance or phonogram in digital form or other electronic medium.

2. Fair Dealing RightsNothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or otherapplicable laws.3. License GrantSubject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as statedbelow:a. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections;b. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original

Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified.";c. to Distribute and Publicly Perform the Work including as incorporated in Collections; and,d. to Distribute and Publicly Perform Adaptations.e. For the avoidance of doubt:

i. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive rightto collect such royalties for any exercise by You of the rights granted under this License;

ii. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collectsuch royalties for any exercise by You of the rights granted under this License; and,

iii. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, viathat society, from any exercise by You of the rights granted under this License.

The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media andformats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved.4. RestrictionsThe license granted in Section 3 above is expressly made subject to and limited by the following restrictions:a. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or

Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License.You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or PubliclyPerform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License.This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice fromany Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable,remove from the Adaptation any credit as required by Section 4(c), as requested.

b. You may Distribute or Publicly Perform an Adaptation only under the terms of: (i) this License; (ii) a later version of this License with the same License Elements as this License; (iii) a Creative Commons jurisdiction license(either this or a later license version) that contains the same License Elements as this License (e.g., Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible License. If you license the Adaptation under one of thelicenses mentioned in (iv), you must comply with the terms of that license. If you license the Adaptation under the terms of any of the licenses mentioned in (i), (ii) or (iii) (the "Applicable License"), you must comply with theterms of the Applicable License generally and the following provisions: (I) You must include a copy of, or the URI for, the Applicable License with every copy of each Adaptation You Distribute or Publicly Perform; (II) Youmay not offer or impose any terms on the Adaptation that restrict the terms of the Applicable License or the ability of the recipient of the Adaptation to exercise the rights granted to that recipient under the terms of the ApplicableLicense; (III) You must keep intact all notices that refer to the Applicable License and to the disclaimer of warranties with every copy of the Work as included in the Adaptation You Distribute or Publicly Perform; (IV) whenYou Distribute or Publicly Perform the Adaptation, You may not impose any effective technological measures on the Adaptation that restrict the ability of a recipient of the Adaptation from You to exercise the rights granted tothat recipient under the terms of the Applicable License. This Section 4(b) applies to the Adaptation as incorporated in a Collection, but this does not require the Collection apart from the Adaptation itself to be made subject tothe terms of the Applicable License.

c. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to themedium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute,publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to theextent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent withSsection 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Thecredit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors ofthe Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by thisSection for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by theOriginal Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties.

d. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections,You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), inwhich any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author'shonor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of thisLicense (right to make Adaptations) but not otherwise.

5. Representations, Warranties and DisclaimerUNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNINGTHE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE,NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOTALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.6. Limitation on LiabilityEXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVEOR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.7. Terminationa. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License,

however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different

license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of thisLicense), and this License will continue in full force and effect unless terminated as stated above.

8. Miscellaneousa. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.b. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this

agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not

be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.f. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979),

the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subjectmatter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If thestandard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict thelicense of any rights under applicable law.


Recommended