Altera SoC Embedded Design Suite Manuale Utente

Navigare online o scaricare Manuale Utente per Strumenti di misura Altera SoC Embedded Design Suite. Altera SoC Embedded Design Suite User Manual Manuale Utente

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 207
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti

Sommario

Pagina 1 - San Jose, CA 95134

Altera SoC Embedded Design Suite UserGuideSubscribeSend Feedbackug-11372014.12.15101 Innovation DriveSan Jose, CA 95134www.altera.com

Pagina 2 - Contents

Hardware – Software Development FlowThe Altera hardware-to-software handoff utilities allow hardware and software teams to work independ‐ently and fol

Pagina 3

Figure 4-54: Select Imported File5. Click Finish. The project is imported. The project files are displayed in the Project Explorer panel.The following

Pagina 4

Compiling the Linux Application Debugging Sample Application1. To compile the application, select the project in Project Explorer.2. Select Project &g

Pagina 5

Figure 4-56: Create New Connection4. In the first page of the New Connection wizard, named Remote System Type view, select SSH onlyand click Next.ug-1

Pagina 6 - Overview

Figure 4-57: New Connection window5. Enter the IP address of the board in the Host Name field. Click Finish to create the connection.4-84Setting up Re

Pagina 7 - Device Tree Binary

Figure 4-58: Enter Target IP Address6. In the Remote Systems panel, click the Target IP > Sftp Files > Root. This opens a dialog box to enterthe

Pagina 8

Figure 4-59: Browse Target7.Assign root to User ID and assign the password you selected in the Configuring Linux section toPassword. Select the Save U

Pagina 9

Figure 4-60: Target Username and Password8. Eclipse asks for confirmation of authenticity of the board. Click Yes.9. Remote System Explorer shows the

Pagina 10 - Related Information

Figure 4-61: Target FilesRunning the Linux Application Debugging Sample ApplicationAt this stage, we have a compiled Linux application and a properly

Pagina 11 - Installing the SoC EDS

Figure 4-62: Connection Settings6. Go to Files tab, and set the Target Configuration parameters:a. Select the Application on host to download to be th

Pagina 12

Figure 4-63: Target Configuration7. Click the Debug button. A dialog window appears asking to switch to Debug perspective. Click Yes.8. Eclipse downlo

Pagina 13 - Licensing

Installing the Altera SoC Embedded DesignSuite22014.12.15ug-1137SubscribeSend FeedbackYou must install the Altera SoC Embedded Design Suite (EDS) and

Pagina 14 - Activating the License

Figure 4-64: Program DownloadedNote: At this stage, all the usual debugging features of DS-5 can be used, such as breakpoints, viewvariables, register

Pagina 15

Figure 4-65: Hello MessageGetting Started with TracingARM DS-5 provides powerful tracing features, allowing PTM and STM tracing. It allows different t

Pagina 16

Figure 4-66: Edit DTSL Options Button5. In the DTSL windowDTSL dialog box, click Trace Buffer tab and select On Chip Trace Buffer (ETF)for the Trace c

Pagina 17 - 5. Click Next

Figure 4-68: Enable PTM Tracing7. In the ETF tab, select the ETF to be enabled; and a buffer size of 0x8000, to match the ETF size on theCyclone V SoC

Pagina 18

Figure 4-70: Trace WindowThe tracing window shows:• Core instructions as they were executed• Percentage occupied by each function• Histogram with func

Pagina 19

Getting Started with Cross TriggeringThe Altera SoC offers powerful cross-triggering capability between the HPS and the FPGA fabric. TheHPS can trigge

Pagina 20

6. In SignalTap II, on the JTAG Chain Configuration > Device, select the FPGA device.Figure 4-72: Select FPGA device7. In SignalTap II, under SOF M

Pagina 21 - Jumper Settings

Figure 4-75: Signal Tap Ready to AcquireRelated InformationGetting Started with Running Linux on page 4-2For more information, refer to the Getting St

Pagina 22

Figure 4-76: Debug Configuration - Connection2. The Cross-Trigger tab of the DTSL Configuration Editor allows Cross-trigger configuration.Figure 4-77:

Pagina 23

In order to allow HPS cross triggers to trigger FPGA, you need to:• Check the Enable HPS > FPGA Cross Triggering check box• Check the Assume Cross

Pagina 24

5. Select All the components to be installed, and click Next. The installer displays a summary of theinstallation.6. Click Next to start the installat

Pagina 25 - Create New Project

Figure 4-79: Enable Trigger Out to HPS6. In Signal Tap II, configure the Trigger in to be disabled by setting its pattern to Don't Care. In thiss

Pagina 26

9. SignalTap II will run the analysis and wait for the trigger from the DIP switch:Figure 4-82: Acquisition in Progress10.Change the state of the FPGA

Pagina 27

Enabling Cross-triggering on FPGAFor this getting started scenario, we are using Quartus SignalTap II utility to control FPGA cross-triggering.Figure

Pagina 28 - Set the Linker Script

Quartus SignalTap II GUI has the above depicted Trigger panel that controls cross-triggering:• The Trigger In panel determines whether HPS can trigger

Pagina 29

Figure 4-86: Trigger Signals Disabled5. In Signal Tap II, configure the Trigger in to be sensitive to both edges, so that the SignalTap II sendsthe tr

Pagina 30

Figure 4-88: Run Analysis8. SignalTap II will run the analysis and wait for the trigger from HPS:Figure 4-89: Acquisition in Progress9. In Eclipse deb

Pagina 31 - Write Application Source Code

ARM DS-5 Altera Edition52014.12.15ug-1137SubscribeSend FeedbackThe ARM DS-5 AE is based on the ARM Development Studio 5 (DS-5) Toolkit and is a device

Pagina 32

The advantage of starting Eclipse from the Embedded Command Shell is that all the utilities are added tothe search path, and they can be used directly

Pagina 33

Figure 5-1: Creating a Project with Existing Code3. Type the folder name in the Existing Code Location edit box and then click Finish.ug-11372014.12.1

Pagina 34 - Build Application

Figure 5-2: Import Existing Code window4. Create a Makefile in that folder, and define the rules required for compiling the code. Make sure it hasthe

Pagina 35 - TestProject.axf executable

Licensing32014.12.15ug-1137SubscribeSend FeedbackThe SoC EDS is available with three different licensing options:• Subscription edition• Free web edit

Pagina 36 - Debug Application

Figure 5-3: Eclipse IDE - build process invoked6. If the compilation tools issue errors, Eclipse parses and formats them for you.GCC-Based Bare-Metal

Pagina 37

Figure 5-4: Create a New Project2. Select C/C++ > C Project and click Next.5-6Creating Projectug-11372014.12.15Altera CorporationARM DS-5 Altera Ed

Pagina 38

Figure 5-5: New C Project Created3. Determine if you want to create a Bare-metal executable empty project or a Bare-metal library emptyproject.a. Bare

Pagina 39

Figure 5-6: Bare-metal Executable Project Typeb. Bare-metal librarySelect Bare-metal Library > Empty Project and click Finish.5-8Creating Projectug

Pagina 40

Figure 5-7: Bare-metal Library Project TypeBuild SettingsOnce the project is created, the project properties can be accessed by going to Project >

Pagina 41

Figure 5-8: Project PropertiesThen, in the Project Properites window, the Compilation settings can be accessed by selecting C/C++Build > Settings5-

Pagina 42

Figure 5-9: Project SettingsThe Build Settings incldue detailed settings for all tools:• Compiler• Assembler• LinkerThe Getting Started Guides chapter

Pagina 43

Figure 5-10: New Project3. Select C/C++ > C Project and click Next.5-12Creating a Projectug-11372014.12.15Altera CorporationARM DS-5 Altera Edition

Pagina 44

Figure 5-11: Create a New C Project4. Continue with one of the following options:1. Select "Project Type" as Executable > Empty Project a

Pagina 45 - Create a New Project

Figure 5-12: Create an Empty Project with a Toolchain Selected2. Select Static Library > Empty Project and click Finish.5-14Creating a Projectug-11

Pagina 46 - Figure 4-6: New Project

the Altera website (http://dl.altera.com/soceds) and then activate your license in DS-5, as shown in theActivating the License section.Related Informa

Pagina 47

Figure 5-13: Create an Empty Project Without a ToolchainLinker ScriptARM DS-5 AE offers a visual tool to help create linker scripts.1. Go to File >

Pagina 48 - Create a Linker Script

Figure 5-14: Creating a Linker Script2. Select Scatter File Editor > Scatter File and press Next.5-16Linker Scriptug-11372014.12.15Altera Corporati

Pagina 49

Figure 5-15: Creating a Scatter File3. Select the location of the new file, type in the file name and press Finish.ug-11372014.12.15Linker Script5-17A

Pagina 50

Figure 5-16: Create a New Scatter File Resource4. The linker script file can be edited directly as shown in the example below.5-18Linker Scriptug-1137

Pagina 51

Figure 5-17: Linker Script Example5. The file can also be edited by using the tools on the Outline view for the file.ug-11372014.12.15Linker Script5-1

Pagina 52

Figure 5-18: Editing "Scatter.scat" File Using Tools on the Outline ViewBuild Settings1. Once the project is created, the project properties

Pagina 53

Figure 5-19: Project Properties2. Then, in the Project Properties window, the "Compilation" settings can be accessed by selecting C/C++ Buil

Pagina 54

Figure 5-20: Project SettingsThe build settings include detailed settings for all tools:• Compiler• Assembler• LinkerThe "Getting Started with AR

Pagina 55 - Figure 4-14: Settings

The settings for a debugging session are stored in a Debug Configuration. The Debug Configurationswindow is accessible from the Run > Debug Configu

Pagina 56

Figure 5-22: Create New Debug ConfigurationThe Eclipse IDE will assign a default name to the configuration, which can then be edited by you.5-24Creati

Pagina 57 - Figure 4-16: New Source File

Figure 3-2: Accessing ARM License Manager3. The License Manager - View and edit licenses dialog box opens and shows that a license is notavailable. Cl

Pagina 58 - Figure 4-17: New Source File

Figure 5-23: Rename Debug ConfigurationDebug Configuration OptionsThis section lists the Debug Configuration options, which allows you to specify the

Pagina 59

Connection OptionsThe Connection tab allows the user to select the desired target. The following targets are available for theAltera platforms:Arria V

Pagina 60 - Figure 4-19: Build Project

• Bare Metal Debug• Debug HPS0 Cortex-A9_0• Debug HPS0 Cortex-A9_1• Debug HPS0 Cortex-A9x2_SMP• Debug HPS1 Cortex-A9_0• Debug HPS1 Cortex-A9_1• Debug

Pagina 61

• Application Debug• Connections via gdbserver• Connect to already running gdbserver• Download and debug application• Start dbgserver and debug target

Pagina 62

For the Linux Application Debug targets, the connection parameters will be different depending onwhich type of connection was selected. The following

Pagina 63

Figure 5-26: Linux Application Debugging – Download And Debug ApplicationNote: For the Linux Application Debug, the Connection needs to be configured

Pagina 64

Files OptionsThe Files tab allows the following settings to be configured:• Application on host to download – the file name of the application to be d

Pagina 65

Figure 5-28: Debugger SettingsRTOS AwarenessThe RTOS Awareness tab allows the user to enable Keil CMSIS-RTOS RTX awareness for the debuggerin case tha

Pagina 66

Figure 5-29: RTOS Awareness SettingsRelated InformationKeil WebsiteFor more information about RTOS Awareness, refer to the Embedded Development Tools

Pagina 67

Figure 5-31: Environment SettingsDTSL OptionsThe Debug and Trace Services Layer (DTSL) provides tracing features. To configure trace options, in yourp

Pagina 68

Figure 3-3: ARM License Manager4. In the Add License - Obtain a new licenses dialog box, select the type of license to enter. In thisexample, select t

Pagina 69

Figure 5-32: Debug Configurations - DTSL Options - EditCross Trigger SettingsThe Cross Trigger tab allows the configuration of the cross triggering op

Pagina 70

Figure 5-33: DTSL Configuration Editor - Cross TriggerTrace Buffer SettingsThe Trace Buffer tab allows the selection of the destination of the trace i

Pagina 71 - Starting the Eclipse IDE

Figure 5-35: DTSL Configuration Editor - Trace Buffer > Timestamp FrequencyCortex-A9 SettingsThe Cortex-A9 tab allows the selection of the desired

Pagina 72

• Cycle Accurate – check to create cycle accurate tracing• Trace capture range – check to enable tracing only a certain address interval• Start Addres

Pagina 73

ETF SettingsThe ETF tab allows the configuration of the Embedded Trace FIFO(ETF) settings.The Embedded Trace FIFO is a 32KB buffer residing on HPS tha

Pagina 74

Embedded Command Shell62014.12.15ug-1137SubscribeSend FeedbackThe purpose of the embedded command shell is to provide an option for you to invoke the

Pagina 75

HPS Preloader User Guide72013.05.03ug-1137SubscribeSend FeedbackThere are four stages of the hard processor system (HPS) booting process; the preloade

Pagina 76 - Application Console

1. Configures the HPS pins I/O configuration shift register (IOCSR) and pin multiplexing2. Configures the HPS phase-locked loops (PLLs) and clocking3.

Pagina 77

Figure 7-2: Preloader Support Package Generator FlowQsysQuartusHardwareHandoff FilesGeneratePreloaderSupportPackageGeneratorUser Inputs(Qsys Settings,

Pagina 78

• On a Windows-based system, run the batch file<SoC EDS installation directory>\Embedded_Command_Shell.bat• On a Linux-based system, run the she

Pagina 79

Figure 3-4: Add License - Obtain a New License5. Click Next.6. In the Add License - Choose Host ID dialog box, select the Host ID (Network Adapter MAC

Pagina 80

Figure 7-3: PSP Directorysettings.bspMakefilegeneratedbsp_directoryThe BSP files include:• settings.bsp – the settings file containing all BSP setting

Pagina 81

Table 7-1: User Parameters: bsp-create-settingsOption Required Description--type <bsp-type> YesThis option specifies the type of BSP."spl&q

Pagina 82

Table 7-2: User Parameters: bsp-update-settingsOption Required Description--settings <settings-file> YesThis option specifies the path to an exi

Pagina 83

Option Required Description--get-all NoThis option shows all the BSP settings values.When using --get-all,you must also use --show-names.--show-names

Pagina 84

Table 7-4: User Parameters: bsp-generate-filesOption Required Description--settings <settings-file> YesThis option specifies the path to an exis

Pagina 85 - Description

BSP Setting Type Default Value Descriptionspl.CROSS_COMPILE Stringarm-altera-eabiThis setting specifies the crosscompilation tool chain for use.spl.bo

Pagina 86

BSP Setting Type Default Value Descriptionspl.boot.FAT_BOOT_PARTITION Decimal 1When FAT partition support isenabled, this specifies the FATpartition w

Pagina 87

BSP Setting Type Default Value Descriptionspl.boot.WARMRST_SKIP_CFGIO Boolean TrueThis setting enables thepreloader to skip IOCSR and pinmultiplexing

Pagina 88

BSP Setting Type Default Value Descriptionspl.debug.HARDWARE_DIAGNOSTIC Boolean FalseThis setting enables hardwarediagnostic support, enablinghardware

Pagina 89

BSP Setting Type Default Value Descriptionspl.warm_reset_handshake.SDRAM Boolean True This setting enables the resetmanager to request that theSDRAM c

Pagina 90

Figure 3-5: Add License - Choose host ID7. In the Add License - Developer account details dialog box, enter an ARM developer (Silver) account.If you d

Pagina 91

BSP Setting Default Valuespl.reset_assert.GPIO1 Falsespl.reset_assert.GPIO2 Falsespl.reset_assert.L4WD1 Falsespl.reset_assert.OSC1TIMER1 Falsespl.rese

Pagina 92 - Debugging the Kernel

Note: The options for generating the RBF file need to match the MSEL settings on the board.RBF File Stored in QSPI Flash MemoryThe following steps are

Pagina 93

The preloader image tool makes the following assumptions:1. The input file format is raw binary. You must use the objcopy utility provided with the GN

Pagina 94

Figure 7-5: Header FormatSimple ChecksumProgram LengthReserved (0x0)Flags VersionValidation Word (0x31305341)0x480x440x40Tool UsageThe preloader image

Pagina 95

Output Image LayoutBase AddressYou must place the preloader image at 0x0 for NAND and QSPI flash. The SD/MMC flash has a MBR thatpoints to a specific

Pagina 96

Serial NOR FlashEach QSPI boot image occupies an integer number of sectors unless subsector erase is supported; thisensures that updating one image do

Pagina 97 - Configuring Linux

The preloader reads the following information from mkimage header:1. Image magic number - determines if the image is a valid boot image2. Image data s

Pagina 98

Example 7-8: Creating a Bare-metal Application Imagemkimage -A arm -O u-boot -T standalone -C none -a 0x02100000 -e 0 -n "baremetal image" -

Pagina 99

Hardware Library82014.12.15ug-1137SubscribeSend FeedbackThe Altera SoC FPGA Hardware Library (HWLIB) was created to address the needs of low-level sof

Pagina 100 - File Name Description

In general, the HWLIB assumes to be part of the system software that is executing on the Hard ProcessorSystem (HPS) in privileged supervisor mode and

Pagina 101 - Send Feedback

address and generate the license directly from the ARM Self-Service web page on the ARMwebsite (silver.arm.com), then select the "Already have a

Pagina 102

implemented by the compound application of other functions in the HW Manager API to build morecomplex operations (for example, software controlled con

Pagina 103

HPS Flash Programmer User Guide92014.12.15ug-1137SubscribeSend FeedbackThe Altera Quartus II software and Quartus II Programmer include the HPS flash

Pagina 104

The target portion is the HPS in the SoC. The target accepts the programming data flash content andrequired information about the target flash memory

Pagina 105 - Figure 4-59: Browse Target

Table 9-1: HPS Flash Programmer ParametersOption ShortOptionRequired Description--cable -cYes This option specifies what download cable touse.To obtai

Pagina 106

Option ShortOptionRequired Description--operation -oYes This option specifies the operation to beperformed. The following operations aresupported:• I:

Pagina 107

Example 9-1: Program File to Address 0 of Flashquartus_hps –c 1 –o P input.bin programs the input file (input.bin) into the flash, startingat flash ad

Pagina 108 - 2014.12.15

Supported Memory DevicesTable 9-2: QSPI FlashManufacturer Device ID DIE # Density (Mb)Micron 0x18BA20 1 128Micron 0x19BA20 1 256Micron 0x20BA20 2 512M

Pagina 109

Note: Starting with version 14.1, the HPS Flash Programmer supports all ONFI compliant NAND flashdevices that are supported by the HPS QSPI Flash Cont

Pagina 110

Bare-Metal Compiler102014.12.15ug-1137SubscribeSend FeedbackThe bare-metal compiler that is shipped with the SoC EDS is the Mentor Graphics Sourcery™

Pagina 111 - Getting Started with Tracing

SD Card Boot Utility112014.12.15ug-1137SubscribeSend FeedbackThe SoC EDS SD card boot utility is a tool for updating the boot software on an SD card.T

Pagina 112 - Figure 4-67: Trace Into ETF

ContentsIntroduction to SoC Embedded Design Suite... 1-1Overview...

Pagina 113

Getting Started Guides42014.12.15ug-1137SubscribeSend FeedbackThis chapter presents a series of getting started guides aimed at enabling you to quickl

Pagina 114

Warning: The users of this tool need administrative or root access to their computer to use this tool towrite to physical SD cards. These rights are n

Pagina 115

Figure 11-1: Sample Output from Utilityug-11372014.12.15Tool Options11-3SD Card Boot UtilityAltera CorporationSend Feedback

Pagina 116

Linux Software Development Tools122014.12.15ug-1137SubscribeSend FeedbackThe following list contains the Linux software development tools:• Linux comp

Pagina 117

SD Card Boot UtilityThe SoC EDS SD card boot utility is a tool for updating the boot software on an SD card.The Preloader is typically stored in a cus

Pagina 118

Table 12-1: Command Line OptionsCommand line Argument Required? Description-p filename Required Specifies Preloader file to write-b filename Required

Pagina 119 - FPGA Triggering HPS Example

Figure 12-1: Sample Output from UtilityDevice Tree GeneratorA Device Tree is a data structure that describes the underlying hardware to an operating s

Pagina 120

Yocto PluginThe Yocto Linux Source Package available on the Yocto Project website allows the entire Linux softwarestack (kernel, drivers, device tree,

Pagina 121

Support and Feedback132014.12.15ug-1137SubscribeSend FeedbackAltera values your feedback. Please contact your Altera TSFAE or submit a service request

Pagina 122

Dual in-line package (DIP) Switch Settings• SW1 = all switches OFF• SW2 = all switches OFF• SW3 = ON-OFF-OFF-OFF-ON-ON. This selects the proper FPGA c

Pagina 123 - HPS Triggering FPGA Example

The steps are:1. Setup the board as described in Board Setup section.2. Extract the SD card image from the archive <SoC EDS installation directory&

Pagina 124

The Preloader is an essential tool for SoC software. It performs the low-level initialization, brings upSDRAM memory, loads the next boot stage from f

Pagina 125

Figure 4-3: Default Options in the BSP Editor window7. Click Generate in the BSP Editor dialog box to generate the Preloader files.8. Click Exit in th

Pagina 126 - ARM DS-5 Altera Edition

• Cyclone V Device Handbook: Booting and ConfigurationFor more information about Booting and Configuration with regards to Preloader, refer to the Boo

Pagina 127 - Bare-metal Project Management

2. Select C/C++ > C Project and click Next.ug-11372014.12.15Create New Project4-7Getting Started GuidesAltera CorporationSend Feedback

Pagina 128

3.Edit Project Name to be TestProject, select Project Type to be Bare-metal Executable > EmptyProject, and select Toolchains to be Altera Baremetal

Pagina 129

Set the Linker Script1. Go to Project > Propertiesug-11372014.12.15Set the Linker Script4-9Getting Started GuidesAltera CorporationSend Feedback

Pagina 130 - Creating Project

2. Go to C/C++ Build > Settings > GCC Linker > Image and then click Linker Script.4-10Set the Linker Scriptug-11372014.12.15Altera Corporatio

Pagina 131

Importing the Bare-Metal Debugging Sample Application...4-52Compiling the Bare-Metal Debugging Sampl

Pagina 132

3. Browse to <SoC EDS installation directory>\host_tools\mentor\gnu\arm\baremetal\arm-altera-eabi\lib\cycloneV-dk-oc-ram-hosted.ld, select cyclo

Pagina 133

4. Click OK to close the Project Properties window.Write Application Source Code1. Go to File > New > Source File4-12Write Application Source Co

Pagina 134 - Build Settings

2.Edit the filename in Source File to be test.c and click Finish.ug-11372014.12.15Write Application Source Code4-13Getting Started GuidesAltera Corpor

Pagina 135 - Build > Settings

3.Edit the test.c file to contain the text shown in the following image.Note:The __auto_semihosting symbol is a convenient way to let Debugger know th

Pagina 136 - Creating a Project

Build Application1. Build the application by going to Project > Build Project.ug-11372014.12.15Build Application4-15Getting Started GuidesAltera Co

Pagina 137 - Figure 5-10: New Project

2. After the project is built, the Console shows the commands and the Project shows the createdTestProject.axf executable.4-16Build Applicationug-1137

Pagina 138 - Baremetal GCC. Click Finish

Debug Application1. Setup board.2. Go to Run > Debug Configurationsug-11372014.12.15Debug Application4-17Getting Started GuidesAltera CorporationSe

Pagina 139

3. Right-click DS-5 Debugger and click New.4-18Debug Applicationug-11372014.12.15Altera CorporationGetting Started GuidesSend Feedback

Pagina 140 - Linker Script

4. Select target to be Altera > Cyclone V SoC (Dual Core) > Bare Metal Debug > Debug Cortex-A9_0and Target Connection to be USB-Blaster.ug-11

Pagina 141

5. Click the Connection > Browse Button to select the connection to the target board.6. Select the desired target and click Select.4-20Debug Applic

Pagina 142

Hardware Handoff Files...7-3Using the P

Pagina 143

7. Go to Files tab > Target Configuration > Application on host to download and click the Workspacebutton to browse for the executable in the cu

Pagina 144

9. Click the Debug button to download the application and start the debug session.4-22Debug Applicationug-11372014.12.15Altera CorporationGetting Star

Pagina 145

10.When Eclipse asks you if you want to switch to Debug perspective, accept by clicking Yes.11.Application will be downloaded and stopped at entry to

Pagina 146 - + Build > Settings

12.Click the Continue button or press F8. The application runs to completion and exits. The Applicationconsole shows the message printed by applicatio

Pagina 147 - Debugging

Getting Started with ARM Compiler Bare-Metal Project ManagementThis section presents a complete bare-metal example demonstrating the ARM Compiler bare

Pagina 148

Figure 4-5: Select a WorkspaceCreate a New Project1. Go to File > New > Project...4-26Create a New Projectug-11372014.12.15Altera CorporationGet

Pagina 149

Figure 4-6: New Project2. Select C/C++ > C Project and click Next.ug-11372014.12.15Create a New Project4-27Getting Started GuidesAltera Corporation

Pagina 150 - Debug Configuration Options

Figure 4-7: Create a New C Project3.Edit Project Name to be TestProject. Select Project Type to be Executable > Empty Project; thenToolchains to be

Pagina 151 - Connection Options

Figure 4-8: Create C ProjectCreate a Linker Script1. Go to File > New > Other...ug-11372014.12.15Create a Linker Script4-29Getting Started Guid

Pagina 152

2. Select Scatter File Editor > Scatter File and press Next.4-30Create a Linker Scriptug-11372014.12.15Altera CorporationGetting Started GuidesSend

Pagina 153

Support and Feedback...13-1TOC-5Altera Corporation

Pagina 154

Figure 4-9: Create a Scatter File3.Select the Test Project, edit the file name to be scatter.scat and click Finish.ug-11372014.12.15Create a Linker Sc

Pagina 155

Figure 4-10: Scatter File Resource4. Edit the file "scatter.scat" to contain the following:4-32Create a Linker Scriptug-11372014.12.15Altera

Pagina 156 - Debugger Options

Figure 4-11: Contents of "scatter.scat"The above linker script instructs the linker on how to link the application:• Defines OCRAM base addr

Pagina 157 - RTOS Awareness

Figure 4-12: Graphical View of the Linker ScriptSet the Linker Script1. Go to Project > Properties.4-34Set the Linker Scriptug-11372014.12.15Altera

Pagina 158 - Environment

Figure 4-13: Test Project Properties2. Go to C/C++ Build > Settings > ARM Linker 5 > Image Layout and then click Browse:ug-11372014.12.15Set

Pagina 159 - DTSL Options

Figure 4-14: Settings3. Select the newly created file "scatter.scat" and click Open.4-36Set the Linker Scriptug-11372014.12.15Altera Corpora

Pagina 160 - Cross Trigger Settings

Figure 4-15: Opening the Newly Created File4. Click OK to close the Project Properties window.Write Application Source Code1. Go to File > New >

Pagina 161 - Trace Buffer Settings

Figure 4-16: New Source File2. Edit the file name to be "test.c" and click Finish.4-38Write Application Source Codeug-11372014.12.15Altera C

Pagina 162 - Cortex-A9 Settings

Figure 4-17: New Source File3. Edit the "test.c" file to contain the text shown in the following image:ug-11372014.12.15Write Application So

Pagina 163 - ETR Settings

Figure 4-18: Text for Test .cBuild Application1. Build the application by going to Project > Build Project.4-40Build Applicationug-11372014.12.15Al

Pagina 164 - ETF Settings

Introduction to SoC Embedded Design Suite12014.12.15ug-1137SubscribeSend FeedbackThe Altera® system on a chip (SoC) Embedded Design Suite (EDS) provid

Pagina 165 - Embedded Command Shell

Figure 4-19: Build Project2. The project is built. The console shows the commands, and the project shows the "TestProject.axf"executable tha

Pagina 166 - HPS Preloader User Guide

Figure 4-20: Console and Project Views CreatedDebug Application1. Setup board.2. Go to Run > Debug Configurations4-42Debug Applicationug-11372014.1

Pagina 167

Figure 4-21: Debug Configurations3. Right-click DS-5 Debugger and click New.ug-11372014.12.15Debug Application4-43Getting Started GuidesAltera Corpora

Pagina 168 - Hardware Handoff Files

Figure 4-22: New DS-5 Debugger4. Select the "Target" to be Altera > Cyclone V SoC (Dual Core) > Bare Metal Debug > Debug Cortex-A9_

Pagina 169 - Using .tcl Scripts

Figure 4-23: Debug Configuration - Connection Tab5. Click the Connection > Browse button to select the connection to the target board.6. Select the

Pagina 170

Figure 4-24: Target Connection7. Go to Files tab > Target Configuration > Application on the host to download and click theWorkspace buton to br

Pagina 171 - Option Required Description

Figure 4-25: Target Configuration8. Browse to the executable and click OK.ug-11372014.12.15Debug Application4-47Getting Started GuidesAltera Corporati

Pagina 172

Figure 4-26: Open "TestProject.axf"9. Click the Debug button to download the application and start the debug session.4-48Debug Applicationug

Pagina 173

Figure 4-27: Debug Session Started10.Eclipse will ask whether to switch to the "Debug" perspective. Accept by clicking Yes.Figure 4-28: Conf

Pagina 174 - BSP Settings

Figure 4-29: DS-5 Debug Window12.Click the Continue button or press F8. The application will run to completion and exit. The applica‐tion console will

Pagina 175 - 2013.05.03

The major components of the SoC EDS include:• ARM® Development Studio 5 (DS-5™) Altera Edition (AE) Toolkit• Compiler tool chains:• Bare-metal GNU Com

Pagina 176

Figure 4-30: Application ConsoleGetting Started with Bare-Metal DebuggingThe ARM DS-5 Altera Edition provides very powerful bare metal debugging capab

Pagina 177

The provided sample application prints a “Hello” message on the debugger console, by using semihosting.This way no pins are used and all communication

Pagina 178

Figure 4-31: Import Existing Project3. In the Import Projects dialog box, select the Select Archive File option.4. Click Browse, then navigate to <

Pagina 179 - Reset Assert Settings

Compiling the Bare-Metal Debugging Sample ApplicationThe sample application is compiled using the Mentor bare-metal GCC tool chain invoked by theMakef

Pagina 180 - Preloader Compilation

The Target is already pre-configured to be Altera > Cyclone VSoC > Bare Metal Debug > Debug Cortex-A9_0via Altera USB-Blaster.3. Click Browse

Pagina 181 - Preloader Image Tool

Figure 4-34: Select Debug Hardware5. Click the Debug button from the bottom of the Debug Configurations dialog box.6. Eclipse ask whether to switch to

Pagina 182

Figure 4-35: Program Downloaded7. Click Continue green button (or press F8) to run the application. It displays the hello message in theApplication Co

Pagina 183 - Tool Usage

Figure 4-36: Debugging Session window8. Click Disconnect from Target button to close the debugging session.Getting Started with the Hardware LibraryTh

Pagina 184 - Output Image Layout

The sample application is built with a makefile that performs the following steps:1. Copies Hardware Libraries source code from installation folder to

Pagina 185

Figure 4-37: Import Existing Project3. In the Import Projects dialog box, select the Select Archive File option.4. Click Browse, then navigate to <

Pagina 186

• The socfpga_cyclone5.dtb file is a generic DTB file which does not have any dependency on soft IP.FPGA programming and bridge releasing are not requ

Pagina 187

Figure 4-38: Select Imported File5. Click Finish. The project will be imported. The project files will be displayed in the Project Explorerpanel. The

Pagina 188 - Hardware Library

File Name Descriptionaltera-socfpga-hosted.ld Linker scriptdebug-hosted.ds Debugger script use to load the sample applicationMakefile Makefile used to

Pagina 189 - Feature Description

To run the sample application, perform the following steps:1. In the Eclipse IDE, click Run > Debug Configurations... to open the Debug Configurati

Pagina 190

Figure 4-41: Select USB Blaster5. Click the Debug button from the bottom of the Debug Configurations dialog box.6. Eclipse ask whether to switch to De

Pagina 191 - Subscribe

Figure 4-42: Application Downloaded7. Click Continue green button (or press F8) to run the application. It displays a log of activities itperforms in

Pagina 192 - HPS Flash Programmer

Figure 4-43: Application Completed8. Click Disconnect from Target button to close the debugging session.Sequence Sample ApplicationFunctionUsed Hardwa

Pagina 193 - Required Description

Sequence Sample ApplicationFunctionUsed HardwareLibraries APIsDescription12 socfpga_bridge_cleanupalt_bridge_uninit Deinitialize bridges13socfpga_fpga

Pagina 194

Figure 4-44: Configue Peripheral Register Visibility4. Click the Debug button to download the application to the target board.5. Select the Registers

Pagina 195

Figure 4-45: Peripheral Registers6. Put a breakpoint in the source code file named hwlib.c at the line where the soft IP GPIO module dataregister is w

Pagina 196 - Supported Memory Devices

Figure 4-46: Breakpoint Added7. Let the program run by clicking the green Continue button or by pressing F8. The code will stop at thebreakpoint.Note:

Pagina 197

This table lists typical tool usage, but your actual requirements depend on your specific project andorganization.Hardware EngineerAs a hardware engin

Pagina 198 - Bare-Metal Compiler

Figure 4-47: Soft IP Registers11.You can resume the code several times by pressing F8, and you will see how the DATA registerchanges and the HPS LEDs

Pagina 199 - SD Card Boot Utility

• Online ARM DS-5 DocumentationThe ARM DS-5 Altera Edition reference material can be accessed online on the documentation page ofthe ARM website (www.

Pagina 200 - Tool Options

1. Start Embedded Command Shell by running <SoC EDS installation directory>/embedded_command_shell.sh2. Run the following command: cd <SoC ED

Pagina 201

Figure 4-48: Configure Connection4. Click on the Debugger and perform the following steps:a. Select option Connect Only for Run Controlb. Check Execut

Pagina 202 - Linux Compiler

Figure 4-49: Debugger Settings5. Click the Debug button. The debugger connects to the board, stops the cores as instructed and loadsthe kernel symbols

Pagina 203

Figure 4-50: Linux Kernel Stopped6. To view the running threads, maximize the top left panel. It shows Active Threads with the twocurrently executing

Pagina 204

Figure 4-51: Linux Threads7. Minimize the Debug Control panel and maximize the Functions panel from top right. All of thefunctions in the kernel are d

Pagina 205 - Device Tree Generator

Figure 4-52: Kernel Debugger BreakpointsGetting Started with Linux Application DebuggingThe ARM DS-5 Altera Edition provides very powerful Linux appli

Pagina 206 - Yocto Plugin

The required steps are:1. Setup the board as described in the Getting Started with Board Setup section; and connect the HPSEthernet Connector J2 to th

Pagina 207 - Support and Feedback

Figure 4-53: Import Existing Project3. In the Import Projects dialog box, select the Select Archive File option.4. Click Browse, then navigate to <

Commenti su questo manuale

Nessun commento