Table of Contents · Based on Docker container Based on Virtual Machine appliance Native...

72

Transcript of Table of Contents · Based on Docker container Based on Virtual Machine appliance Native...

Page 1: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application
Page 2: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

1.1

1.2

1.3

1.3.1

1.3.1.1

1.3.1.2

1.3.1.3

1.3.2

1.3.3

1.3.4

1.3.4.1

1.3.4.2

1.3.4.3

1.3.4.4

1.3.5

1.3.5.1

1.3.5.2

1.3.5.3

1.4

1.4.1

1.4.2

1.4.2.1

1.4.2.2

1.4.2.3

1.4.2.4

1.4.2.5

1.4.3

1.4.3.1

1.4.3.2

1.4.3.3

1.4.3.4

1.4.4

1.4.4.1

1.4.4.2

1.4.4.3

1.4.4.4

1.4.5

TableofContents

Introduction

Documentrevisions

Part1-GettingStartedforUsers

Installingxds-server

BasedonDockercontainer

BasedonVirtualMachineappliance

Nativeinstallation

Installingxdsclienttools

InstallingAGLSDKs

CreateyourfirstAGLapplication

Setup

Buildusingcommandlinetool

BuildusingXDSDashboard

Buildusingasourcecodeeditor/IDE

DebugyourfirstAGLapplication

Configuration

xds-gdbfromcommandline

xds-gdbwithinanIDE

Part2-XDSinternals

Prerequisites

XDS-server

Configuration

Howtorun

Buildfromscratch

Debugging

Test

XDS-agent

Configuration

Start

Buildfromscratch

Debugging

XDS-cli

Configuration

CLICommands

Buildfromscratch

Debugging

XDS-gdb

Page 3: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

1.4.5.2

1.4.5.3

1.4.5.1Configuration

Buildfromscratch

Debugging

Page 4: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Introduction

X(cross)DevelopmentSystemisatoolthatallowsusertoeasilycrossbuildapplications.

Thisdocumentationisavailable:

online:http://docs.automotivelinux.org/docs/devguides/en/dev/#xcross-development-system-user's-guidePDFfile:http://iot.bzh/download/public/XDS/docs/XDS_UsersGuide.pdf

Meta Data

Title X(cross)DevelopmentSystem

Author SebastienDouheret

Description

Keywords AGL,XDS,cross,Development,Iotbzh

Language English

Published PublishedOctober2018asanelectronicbook

Updated FriOct05201810:28:33GMT+0200(CEST)

Collection Open-source

Website http://iot.bzh

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 4October2018

Page 5: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Documentrevisions

Date Version Designation Author

Sept2017 0.1 Initialrelease S.Douheret[Iot.bzh]

Oct2017 0.2 Variousupdatestomatchnewbehavior S.Douheret[Iot.bzh]

Nov2017

1.0.0-rc1 Updatestomatchv1.0.0-rc1behavior S.Douheret[Iot.bzh]

Jan2018 1.0.0 AddVMapplianceanddocument

newSDKmanagementS.Douheret,R.LeMartret[Iot.bzh]

Jan2018 1.0.1 Removedduplicatedpartsand

splitinsubchaptersS.Douheret,R.LeMartret[Iot.bzh]

Aug2018 5.99.3 Updatestomatch5.99.3behavior C.Legall,C.Benier,S.Douheret[

Iot.bzh]

Oct2018 6.0.0 Clarifyinstallinstructionsandvariousupdateabout

SDKs S.Douheret[Iot.bzh]

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 5October2018

Page 6: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

GettingStartedforUsers

Abstract

X(cross)DevelopmentSystem(XDS)issetoftoolsthatprovideamulti-platformforcrossdevelopmentwithnear-zeroinstallation.

Thisdocumentationisavailable:

online:http://docs.automotivelinux.org/docs/devguides/en/dev/#xcross-development-system-user's-guidePDFfile:http://iot.bzh/download/public/XDS/docs/XDS_UsersGuide.pdf

ThefirstgoalofXDSistoprovideamulti-platformcrossdevelopmenttoolwithnear-zeroinstallation.

The second goal is to keep application sources locally (on user'smachine) tomake it compatiblewith existing IT policies (e.g.corporate backup or SCM), and let user to continue to work as usual (use his favorite editor, keep performance whileediting/browsingsources).

ThetwomainblocksthatcomposeXDS:

Theclientpart( xds-agent)runningontheuser'smachineandTheserverpart( xds-server)runningsomewhereinacontaineroronaservermachine(onlocalnetworkorcloud).

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 6October2018

Page 7: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Theclientpart( xds-agent)isportableandisrunningon:

LinuxWindowsMacOS

Thefollowing3mainconfigurationsaresupported:

standalone(orlocal)configOn-Premise(localnetwork)SaaS(Cloudbased)

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 7October2018

Page 8: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

InstallingXDSserver

Dependingofyourconfiguration,thisstepisnecessaryornot.

Inotherwordsyouareadeveloperandplantouse/connecttoanexisting xds-server runningonyour localnetwork(On-Premiseconfig)orintheCloud(SaaSconfig),youdon'tneedtoinstalltheserverpartandyoucanskipthisstep.

Forothers(standaloneconfigoradministratorsthatwanttoinstallanOn-Premisesolution)xds-servermustbeinstalled.

Severalinstallationtypesaresupported:

Installtype SupportedOS Sectiontorefer

Container LinuxorMacOS seeInstallationbasedonDockercontainer

VirtualMachine Linux,MacOSorWindows seeInstallationbasedonVirtualBoxappliance

Native Linux seeNativeinstallation

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 8October2018

Page 9: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

InstallationbasedonDockercontainer

Dockercontainerprerequisites

Dockerisinstalledonthehostmachine,pleaserefertoDockerdocumentationformoredetails.

Getthecontainer

Loadthepre-buildAGLSDKdockerimageincluding xds-server:

wget-O-http://iot.bzh/download/public/XDS/docker/docker_agl_worker-xds-latest.tar.xz|dockerload

Youshouldget docker.automotivelinux.org/agl/worker-xds:X.Yimage

#Listimagethatwejustload

dockerimages"docker.automotivelinux.org/agl/worker-xds*"

REPOSITORYTAGIMAGEIDCREATEDSIZE

docker.automotivelinux.org/agl/worker-xds5.0877979e534ff3hoursago106MB

Createandstartanewcontainer

Useprovidedscripttocreateanewdockerimageandstartanewcontainer:

#Getscript

wget-Oxds-docker-create-container.sh'https://gerrit.automotivelinux.org/gerrit/gitweb?p=src/xds/xds-server.git;a=blob

_plain;f=scripts/xds-docker-create-container.sh;hb=master'

#CreatenewXDSworkercontainer(-idoptionvalueshouldbechangedwhenyougetportconflicterror)

bash./xds-docker-create-container.sh-id0

#Checkthatnewcontainerisrunning

dockerps|grepworker-xds

f67079db4339docker.automotivelinux.org/agl/worker-xds:5.0"/usr/bin/wait_for..."AboutaminuteagoUp34

seconds0.0.0.0:8000->8000/tcp,0.0.0.0:10809->10809/tcp,0.0.0.0:2222->22/tcpagl-xds-HOSTNAME-0-USERNAME

Thiscontainerexposesfollowingports:

Portnumber Description

8000 xds-server:serveXDSwebappandRESTAPI

2222 ssh

Thiscontaineralsocreatesthefollowingvolumes(sharedfoldersbetweeninsideandoutsidedocker):

Directoryonhost Directoryinsidedocker Comment

$HOME/xds-workspace /home/devel/xds-workspace XDSprojectsworkspacelocation

$HOME/xds-workspace/.xdt_0 /xdt locationtostoreSDKs

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 9October2018

Page 10: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

$USER_VOLUME $USER_VOLUME userpath,see --volumeoptionof xds-docker-create-container.shscript

Note:

Youcanaddanewshareddirectoryusing --volumeoptioninordertouseforexamplewithPath-Mappingfoldertype.

#CreatenewXDSworkercontainerandshareextra'$HOME/my-workspace'directory

bash./xds-docker-create-container.sh--volume/my-workspace:$HOME/my-workspace

Youcanchangedockerusedportwith -idoption

#CreatenewXDSworkercontainerwithadifferentportnumber

bash./xds-docker-create-container.sh-id${ID}

#Checkthatnewcontainerisrunning

dockerps|grepworker-xds

f67079db4339docker.automotivelinux.org/agl/worker-xds:5.0"/usr/bin/wait_for..."AboutaminuteagoUp34

seconds0.0.0.0:(2222+ID)->22/tcp,0.0.0.0:(8000+ID)->8000/tcp,0.0.0.0:(10809+ID)->10809/tcpagl-xds-HOSTNAME-I

D-USERNAME

Manuallysetupdockeruserid

Note:

Ifyouused xds-docker-create-container.sh script tocreateXDSdockercontainer,useruid/gid insidedockerhasalreadybeenchangedbythisscript.

Ifyouplan tousepath-mapping sharing type foryourprojects, youneed tohave the sameuser id andgroup id insideandoutsidedocker.

Bydefaultuserandgroupnameinsidedockerisset devel(id 1664).

Usefollowingcommandstoreplaceid 1664withyouruser/groupid:

#Setdockercontainernametouse(usuallyagl-xds-xxxwherexxxisUSERNAME@MACHINENAME-IDX-NAME)

exportCONTAINER_NAME=agl-xds-seb@laptop-0-seb

dockerps|grep-q${CONTAINER_NAME}||echo"ERROR:Nocontainername\"${CONTAINER_NAME}\"pleasesetavalidCONTAIN

ER_NAMEbeforeyoucontinue"

#Firstkillallprocessesofdeveluser(includingrunningxds-server)

dockerexec${CONTAINER_NAME}bash-c"/bin/loginctlkill-userdevel"

#Changeuserandgroupidinsidedockertomatchyourids

dockerexec${CONTAINER_NAME}bash-c"usermod-u$(id-u)devel"

dockerexec${CONTAINER_NAME}bash-c"groupmod-g$(id-g)devel"

#Updatesomefilesownership

dockerexec${CONTAINER_NAME}bash-c"chown-Rdevel:devel/home/devel/tmp/xds*"

#Restartdevelautologinservice

dockerexec${CONTAINER_NAME}bash-c"systemctlrestartautologin"

#Restartxds-serverasaservice(sshport2222maydependonyourcontainerID)

ssh-p2222devel@localhost--"systemctl--userrestartxds-server"

Checkifxds-serverisrunning(openXDSwebapp)

xds-serverisautomaticallystartedasauserserviceoncontainerstartup.

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 10October2018

Page 11: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Ifthecontainerisrunningonyourlocalhost,youcanaccesstoabasicwebapplication:

xdg-openhttp://localhost:8000

Ifneededyoucanstatus/stop/startitmanuallyusingfollowingcommands:

#StatusXDSserver:

[email protected]

#StopXDSserver

[email protected]

#StartXDSserver

[email protected]

#GetXDSserverlogs

ssh-p2222devel@localhostjournalctl--user--unit=xds-server.service--output=cat

xds-serverisnowupandrunning,youcannowinstallAGLSDKs,pleaserefertonextchapternamedInstallingAGLSDKs

Pleaserefertoxds-serverconfigurationchapterforadditionalinfoaboutxds-serversettings.

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 11October2018

Page 12: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

InstallationbasedonVirtualMachineappliance

VirtualMachineapplianceprerequisites

VirtualBoxisinstalledonthehostmachine

pleaserefertoVirtualBoxdocumentationformoredetails.

GettheapplianceLoadthepre-buildAGLSDKapplianceimageincluding xds-server:

wgethttp://iot.bzh/download/public/XDS/appliance/xds-vm-debian9_latest.ova

CleanoldapplianceYoumusthaveoneandonexdsapplianceonly.

So,firstremovetheoldestxdsapplianceifneeded.

#Getthevirtualmachinename

VDS_VMNAME=$(VBoxManagelistvms|grepxds-vm-debian|cut-d"\""-f2)

echo${VDS_VMNAME}

#RemoveoldXDSappliance

[-n${VDS_VMNAME}]&&VBoxManagecontrolvm${VDS_VMNAME}poweroff

[-n${VDS_VMNAME}]&&VBoxManageunregistervm${VDS_VMNAME}--delete

Createandstartanewappliance

UsedprovidedscripttocreateanewapplianceoryoucanuseVirtualBoxGUI:

#ImportimageintoVirtualBox

VBoxManageimport./xds-vm-debian9_latest.ova

#Checkimportresult

VDS_VMNAME=$(VBoxManagelistvms|grepxds-vm-debian|cut-d"\""-f2)

echo${VDS_VMNAME}

Addsharefoldertoappliance,mandatorytousepath-mappingsharingtypeforprojects:

#Createlocalsharefolder

mkdir-p$HOME/xds-workspace

#Addsharefoldertoappliance

VBoxManagesharedfolderadd${VDS_VMNAME}--nameXDS-workspace--hostpath$HOME/xds-workspace

Startappliance

#StartXDSappliance

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 12October2018

Page 13: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

[-n${VDS_VMNAME}]&&VBoxManagestartvm${VDS_VMNAME}

AppliancesettingsThisimageexposesfollowingnetworkports(NATmode):

8000: xds-servertoserveXDSbasicwebpage2222:ssh

Checkifxds-serverisrunning

xds-serverisautomaticallystartedasaserviceoncontainerstartup.

Tocheckifxds-serveriscorrectlyinstallandrunning,youcanaccessthebasicwebpagethatgivesyousomeinstructions:

#ifcontainer/applianceisrunningonyourlocalhost

#(elsereplacelocalhostbythenameortheipofthemachinerunningthecontainer)

xdg-openhttp://localhost:8000

xds-serverisnowupandrunning,youcannowinstallAGLSDKs,pleaserefertonextchapternamedInstallingAGLSDKs

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 13October2018

Page 14: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Nativeinstallation

Youcanchosetoinstallxds-server'natively'insteadofwithinadockercontainerbutnotethatonlyLinuxhostOSesaresupportedandtestedfornativeinstallation!

Youalsoneedtoinstall python3toallow xds-servertomanageAGLsdks.

Installpackagesfordebiandistrotype

#'DISTRO'canbesetto{xUbuntu_16.04,xUbuntu_16.10,xUbuntu_17.04,Debian_8.0,Debian_9.0}

exportDISTRO="xUbuntu_16.04"

#AGL_RELEASEcanbesetto{AGL_ElectricEel,AGL_FunkyFlounder,AGL_Master}

exportAGL_RELEASE="AGL_Master"

wget-O-http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/${AGL_RELEASE}/${DISTRO}/Release.key|sudoap

t-keyadd-

sudobash-c"cat>>/etc/apt/sources.list.d/AGL.list<<EOF

debhttp://download.opensuse.org/repositories/isv:/LinuxAutomotive:/${AGL_RELEASE}/${DISTRO}/./

EOF"

sudoapt-getupdate

sudoapt-getinstallagl-xds-server

#Installpython3

sudoapt-getinstallpython3

InstallpackagesforopenSUSEdistrotype

#DISTROcanbesetto{openSUSE_Leap_42.3,openSUSE_Leap_15.0,openSUSE_Tumbleweed}

exportDISTRO="openSUSE_Leap_15.0"

#AGL_RELEASEcanbesetto{AGL_ElectricEel,AGL_FunkyFlounder,AGL_Master}

exportAGL_RELEASE="AGL_Master"

sudozypperarhttp://download.opensuse.org/repositories/isv:/LinuxAutomotive:/${AGL_RELEASE}/${DISTRO}/isv:LinuxAutomot

ive:${AGL_RELEASE}.repo

sudozypperref

sudozypperinstallagl-xds-server

#Installpython3

sudozypperinstallpython3

Configurexds-serverOptionalstep:skipthischapterifyouplantousedefaultsettings

PleaserefertoConfigurationchapterofxds-serverdocumentationformoredetailsaboutJSONconfigurationfile.

Start/Stopxds-server

xds-servercanbemanagedasasystemdservicewiththefollowingcommands:

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 14October2018

Page 15: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

#StatusXDSserver:

systemctl--userstatusxds-server.service

#StopXDSserver

systemctl--userstopxds-server.service

#StartXDSserver

systemctl--userstartxds-server.service

#GetXDSserverlogs

systemctl--user--unit=xds-server.service--output=cat

Tocheckifxds-serveriscorrectlyinstallandrunning,youcanaccessthewebinterface,usingawebbrowser:

xdg-openhttp://localhost:8000

orgetthecurrentversionusingthefollowingcurlcommand:

curlhttp://localhost:8000/api/v1/version

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 15October2018

Page 16: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

InstallingXDSclienttools

xds-agentisaclienttoolthatmustrunonyourmachine(user/developerhost)tobeabletouseXDS.

Youshouldestablishthefollowingchain:

XDSClient:( xds-cliorXDSDashboard).XDSAgent:( xds-agent)runningonyourmachine.XDSServer( xds-server)runningonaremoteserverand/orinacontainer.

Exchangesbetweenthese3toolsaredonethoughHTTPandWebsocketprotocols.

Defaulturl/portmentionedinschemabelowcanbechangeusingconfigfiles.

InstallationofotherXDSclienttools,suchas xds-clior xds-gdbisoptionalanddependsofwhatyouwanttodo:

xds-cli:commandlinetooltousedtointeractwithXDS(alsousedbyIDEintegration).xds-gdb:requestedfordebuggingapplication.

Installpackagesfordebiandistrotype

#'DISTRO'canbesetto{xUbuntu_16.04,xUbuntu_16.10,xUbuntu_17.04,Debian_8.0,Debian_9.0}

exportDISTRO="xUbuntu_16.04"

#AGL_RELEASEcanbesetto{AGL_ElectricEel,AGL_FunkyFlounder,AGL_Master}

exportAGL_RELEASE="AGL_Master"

wget-O-http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/${AGL_RELEASE}/${DISTRO}/Release.key|sudoap

t-keyadd-

sudobash-c"cat>>/etc/apt/sources.list.d/AGL.list<<EOF

debhttp://download.opensuse.org/repositories/isv:/LinuxAutomotive:/${AGL_RELEASE}/${DISTRO}/./

EOF"

sudoapt-getupdate

sudoapt-getinstallagl-xds-agent

sudoapt-getinstallagl-xds-cli

sudoapt-getinstallagl-xds-gdb

InstallpackagesforopenSUSEdistrotype

#DISTROcanbesetto{openSUSE_Leap_42.3,openSUSE_Leap_15.0,openSUSE_Tumbleweed}

exportDISTRO="openSUSE_Leap_15.0"

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 16October2018

Page 17: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

#AGL_RELEASEcanbesetto{AGL_ElectricEel,AGL_FunkyFlounder,AGL_Master}

exportAGL_RELEASE="AGL_Master"

sudozypperarhttp://download.opensuse.org/repositories/isv:/LinuxAutomotive:/${AGL_RELEASE}/${DISTRO}/isv:LinuxAutomot

ive:${AGL_RELEASE}.repo

sudozypperref

sudozypperinstallagl-xds-agent

sudozypperinstallagl-xds-cli

sudozypperinstallagl-xds-gdb

Installforotherplatforms(Windows/MacOS)Install xds-agent:

1. Downloadthelatestreleasedtarballfromgithubreleasespage.

2. Thenunzipthetarballanywhereintoyourlocaldisk(forexample: /opt/AGL/xdsor C:\AGL\xds).

3. AddbinarytoPATH:

MacOs:createthe.bash_profile nano.bash_profileandadd exportPATH="/opt/AGL/xds/xds-agent:$PATHWindows:changethesystempathviacontrolpanelorsystemsettingsor setxpath"C:\AGK\xds\xds-agent;%path%"

repeatthepreviousstepstoinstallothertoolsdependingofyourneeds:

xds-cli:requestedforcommandlineandIDEintegration.(releasedtarballlink).xds-gdb:requestedfordebuggingapplication.(releasedtarballlink).

Startxds-agentXDS-agentisaclienttoolthatmustrunonyourlocal/userdevelopmentmachinewhenyouuseXDS.

ForLinuxdistro,ausersystemdserviceisprovided, xds-agent.service.

Tostartitautomaticallyatbootandyoucanenableitusingfollowingcommands:

#Enablexds-agentserviceatboot

systemctl--userenablexds-agent.service

TostarttheXDS-agentservice:

#Manuallystartxds-agentservice

systemctl--userstartxds-agent.service

#Getstatusandlogofxds-agentservice

systemctl--userstatusxds-agent.service

OnMacOS(orLinux),youcanstart-itmanuallyusingfollowingcommands:

/opt/AGL/bin/xds-agent

OnWindows,youcanstart-itmanuallyusingfollowingcommands:

C:\AGL\xds\xds-agent\xds-agent.exe

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 17October2018

Page 18: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

InstallingAGLSDKs

TobuildyourAGLservicesorAGLapplicationsusingXDSyoumustinstallaSDKmatchingthetarget/boardyouwanttouse.

ASDKisapackagethatincludesalltoolsyouneedtocross-buildandcross-debugyourservice/application.

YoucangenerateAGLSDKfortheboardyouwanttouseoryoucandownloadapre-packagedAGLSDK.

InstallanewSDKfromcommandlineUsed sdkscommandof xds-clitooltomanagedSDKs.

#ListallavailableSDKs

xds-clisdksls-a

ListofavailableSDKs:

IDNAMESTATUSVERSIONARCH

ec15afe0AGL-release-eel-4.99.4-raspberrypi3NotInstalled4.99.4armv7vehf-neon-vfpv4

944d2d5aAGL-snapshots-master-latest-intel-corei7-64NotInstalled4.99.3+snapshotcorei7-64

cf3a4365AGL-release-dab-4.0.2-qemux86-64NotInstalled4.0.2corei7-64

d65fe750AGL-release-eel-latest-qemux86-64NotInstalled4.99.3corei7-64

a0ae663dpoky-agl-corei7-64-3.99.1+snapshotInstalled3.99.1+snapshotcorei7-64

87f0400bAGL-release-dab-3.99.3-m3ulcb-nogfxInstalled3.99.3aarch64

8c2f2841AGL-release-dab-4.0.2-dragonboard-410cNotInstalled4.0.2aarch64

...

#InstallaSDK(downloaded+install)

xds-clisdksinstalld65fe750

Installationof'AGL-release-eel-latest-qemux86-64'SDKsuccessfullystarted.

Downloadingpoky-agl-glibc-x86_64-agl-demo-platform-crosssdk-corei7-64-toolchain-4.99.5.sh...

--2018-01-0211:22:23--https://download.automotivelinux.org/AGL/release/eel/latest/qemux86-64/deploy/sdk/poky-agl-glib

c-x86_64-agl-demo-platform-crosssdk-corei7-64-toolchain-4.99.5.sh

Resolvingdownload.automotivelinux.org(download.automotivelinux.org)...199.19.213.77

Connectingtodownload.automotivelinux.org(download.automotivelinux.org)|199.19.213.77|:443...connected.

HTTPrequestsent,awaitingresponse...200OK

Length:665996704(635M)[application/x-sh]

Savingto:‘/tmp/tmp.wuQzLdImCS/poky-agl-glibc-x86_64-agl-demo-platform-crosssdk-corei7-64-toolchain-4.99.5.sh’

0K..................................................0%82,7K2h11m

50K..................................................0%89,1K2h6m

100K..................................................0%82,0K2h8m

...

50300K..................................................99%2,15M0s

650350K.....................................100%4,04M=10m35s

2018-01-0212:17:06(1024KB/s)-‘/tmp/tmp.CWyEj3z76Q/poky-agl-glibc-x86_64-agl-demo-platform-crosssdk-corei7-64-toolch

ain-4.99.5.sh’saved[665996704/665996704]

AutomotiveGradeLinuxSDKinstallerversion4.99.5

===================================================

YouareabouttoinstalltheSDKto"/xdt/sdk/poky-agl/4.99.5/corei7-64".Proceed[Y/n]?Y

ExtractingSDK..........................................................................................................

..........done

Settingitup...done

SDKhasbeensuccessfullysetupandisreadytobeused.

EachtimeyouwishtousetheSDKinanewshellsession,youneedtosourcetheenvironmentsetupscripte.g.

$./xdt/sdk/poky-agl/4.99.5/corei7-64/environment-setup-corei7-64-agl-linux

SDKIDd65fe750-d3a7-38f5-83d8-3d3806054f8dsuccessfullyinstalled.

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 18October2018

Page 19: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

#Abortaninstallationthatisinprogress

xds-clisdksabort-idd65fe750

#InstallaSDK(usingalocalSDKpackage/file)

xds-clisdksinstall--file$HOME/xds-workspace/sdks/poky-agl-glibc-x86_64-agl-demo-platform-crosssdk-corei7-64-toolchai

n-4.99.5.sh

#ListinstalledSDKs

xds-clisdksls

ListofinstalledSDKs:

IDNAMESTATUSVERSIONARCH

e45ac787AGL-corei7-64-4.99.5+snapshotInstalled4.99.5x86_64

d65fe750AGL-release-eel-latest-qemux86-64Installed4.99.3corei7-64

Installation based on a local SDK package is only supported when SDK file package is located in $HOME/xds-workspace/sdksdirectory

InstallanewSDKfromXDSDashboard

OpenXDS-Dashboardinweb-browserandselect SDKsentryinleftsidemenu.

Thenswitchto SDKsMANAGEMENTview:

UsefilterboxestofindtheSDKyouwanttoinstallandthenclickonplusicon(Actionscolumn)tostartinstallation.

SDKdownloadandinstallationprocessmaytakeseveralminutesandoutputofinstallationscript(outputof addscriptmentionedinabovechapter).

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 19October2018

Page 20: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Notethatyoucanabortinstallationbyclickingon CANCELbutton.

Moreinfo

Pleaserefertoxds-serverchapterformoredetailsaboutSDKsmanagement.

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 20October2018

Page 21: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

CreateyourfirstAGLapplication

Prerequisites

xds-agentisrunninglocallyonyourmachine(seepreviouschapter:InstallingXDSclienttools)xds-serverisrunninglocallyinadockercontainerorisaccessibleonyournetwork(seepreviouschapter:InstallingXDSserver)oneormoreSDKhavebeeninstalled(seepreviouschapter:InstallingAGLSDKs)XDSconfigurationiscorrect:inotherwords,connectioniscorrectlyestablishedbetween xds-agentand xds-serverandnoerrormessageisdisplayedwhenyouopenXDSDashboardinawebbrowser.

Linkstosubchapters:

SetupBuildusingcommandlinetoolBuildusingXDSDashboardBuildusingasourcecodeeditor/IDE

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 21October2018

Page 22: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Setup

Let's use helloworld-native-application project as example, so you need first to clone this project into a directory that will beaccessibleby xds-server.

Dependingoftheprojectsharingmethod:

Cloudsync:youcancloneprojectanywhereonyourlocaldisk,Pathmapping:youmustcloneprojectinto $HOME/xds-workspacedirectory.

Note::helloworld-native-applicationprojectisanAGLprojectbasedonapp-templates(includedasagitsubmodule).ThisCMaketemplating, used to develop application with the AGL Application Framework, will automatically generate makefile rules (eg.remote-target-populate)orscripts(eg. build/target/xxxscripts).

Formoreinfoaboutapp-template,pleaserefertothisdocumentation.

Cloneproject

cd$HOME/xds-workspace

gitclone--recursivehttps://github.com/iotbzh/helloworld-native-application.git

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 22October2018

Page 23: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Buildusingcommandlinetool

Declareproject

UseXDS command line tool named xds-cli to declare your project from command line andmore precisely the projectsaddcommand(shortoption: prjadd).

xds-cliprjadd--label="Project_helloworld-native-application"--type=pm--path=/home/seb/xds-workspace/helloworld-nati

ve-application--server-path=/home/devel/xds-workspace/helloworld-native-application

Note:option --url=http://localhost:1234maybeaddedto xds-cliinordertoseturlof xds-agentincaseofagentisnotrunningondefaultport(forexamplehere,1234)

BuildfromcommandlineYouneedtodeterminewhichistheuniqueidofyourproject.YoucanfindthisIDinprojectpageofXDSdashboardoryoucangetitfromcommandlineusing xds-clitooland projectslistcommand(short: prjls):

xds-cliprjls

IDLabelLocalPath

f9904f70-d441-11e7-8c59-3c970e49ad9bProject_helloworld-service/home/seb/xds-workspace/helloworld-serv

ice

4021617e-ced0-11e7-acd2-3c970e49ad9bProject_helloworld-native-application/home/seb/xds-workspace/helloworld-nati

ve-application

XDStools,including xds-cliareinstalledbydefaultin /opt/AGL/bindirectoryandthispathhasbeenaddedintoyourPATHvariable.

Ifitisnotthecase,justadditmanuallyusing exportPATH=${PATH}:/opt/AGL/bincommandline.

Nowtoreferyourproject,justuse--idoptionoruse XDS_PROJECT_IDenvironmentvariable.

Note:

Shortidnotationisalsosupportedassoonasgivenidvalueisnonambiguous.

Forexample,torefertoProject_helloworld-native-applicationprojectlistedinabovecommand,youcansimplyuse--id40insteadof--id4021617e-ced0-11e7-acd2-3c970e49ad9b

YoualsoneedtodeterminetheIDofthecrossSDKyouwanttousetocrossbuildyouapplication.

TolistinstalledSDK,usethefollowingcommand:

xds-clisdksls

ListofinstalledSDKs:

IDNAME

7aa19224-b769-3463-98b1-4c029d721766aarch64(3.99.1+snapshot)

41a1efc4-8443-3fb0-afe5-8313e0c96efdcorei7-64(3.99.2+snapshot)

c226821b-b5c0-386d-94fe-19f807946d03aarch64(3.99.3)

YouarenowreadytouseXDStoforexamplecrossbuildyourproject.

HereisanexampletobuildaprojectbasedonCMakefile:

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 23October2018

Page 24: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

#Gointoyourprojectdirectoryandcreateabuilddirectory

cd$MY_PROJECT_DIR

mkdirbuild

#Generatebuildsystemusingcmake

xds-cliexec--id=4021617e--sdkid=c226821b--"cdbuild&&cmake.."

#Buildtheproject

xds-cliexec--id=4021617e--sdkid=c226821b--"cdbuild&&makeall"

Note:Ifyouuse &&, ||or ;statementintheexecutedcommandline,youneedtodoublequotethecommand,forexample "cdbuild&&make.

Toavoidtosetprojectid,sdksid,url,...foreachcommandline,youcandefinethesesettingsasenvironmentvariableswithinanenvfileandjustset --configoptionorsourcefilebeforeexecutingxds-clicommand.

Note thatXDScreates a filenamed xds-project.conf (only if not alreadyexists)whenyoudeclare anewproject usingXDSDashboard(orusing xds-cliprjadd...).Editthisfileifneededandthenreferitwith --configoption.

Forexample,theequivalenceofabovecommandis:

#MY_PROJECT_DIR=/home/seb/xds-workspace/helloworld-native-application

cd$MY_PROJECT_DIR

#Editandpotentiallyadaptxds-project.conffilethathasbeencreated

#automaticallyonprojectdeclarationusingXDSDashboard

catxds-project.conf

#XDSprojectsettings

exportXDS_AGENT_URL=localhost:8800

exportXDS_PROJECT_ID=4021617e-ced0-11e7-acd2-3c970e49ad9b

exportXDS_SDK_ID=c226821b-b5c0-386d-94fe-19f807946d03

#Createbuilddirectoryandinvokecmakeandthenbuildproject

xds-cliexec--config=./xds-project.conf--"mkdir-pbuild&&cdbuild&&cmake.."

cdbuild&&xds-cliexec--config=../xds-project.conf--"makeall"

#Orequivalentbyfirstsourcingconffile(avoidtoset--configoption)

sourcexds-project.conf

xds-cliexec"mkdir-pbuild&&cdbuild&&cmake.."

cdbuild&&xds-cliexec"makeall"

Note:allparametersafteradoubledash(--)areconsideredasthecommandtoexecute.

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 24October2018

Page 25: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

BuildusingXDSDashboard

Declareproject

UseXDSDashboardtodeclareyourproject.OpenabrowserandconnecttoXDSDashboard.

URLdependsofyourconfig,forexample http://localhost:8800

Opentherightsidebarandselect Projectsentrytoopenprojectpageandthencreate/declareanewprojectbywiththeplusicon:

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 25October2018

Page 26: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Set SharingTypeandpathsaccordingtoyourneeds.

NotethatXDScreates(ifnotalreadyexists)afilenamed xds-project.confwhenyoudeclareanewproject.

ThisfilemaybeveryusefulwhenyouplantouseXDSclienttoolssuchas xds-clior xds-gdb.

Note:

When Pathmappingtypeisselected,youmustcloneyourprojectinto $HOME/xds-workspacedirectory(namedLocalPathinmodalwindow).

IfXDSserverisrunningintheXDSdockercontainer(seeInstallationbasedonDockercontainer),theServerPathmustbesetto/home/devel/xds-workspace/xxxwherexxxisyourprojectdirectoryname.

Ifyouselect CloudSync,youcancloneyourprojectwhereveryouwantonyourlocaldisk.

BuildfromXDSdashboard

Openthebuildpagebuildentryofleftsidebar ,

thenselectyourProjectandtheCrossSDKyouwanttouseandclickonClean/Pre-Build/Build/Populatebuttonstoexecutevariousbuildactions.

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 26October2018

Page 27: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 27October2018

Page 28: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Buildusingasourcecodeeditor/IDE

FirstcreateanXDSconfigfileorreusethepreviousone,forexampleweusehereaarch64SDKtocrossbuildapplicationforaRenesasGen3board.

#createfileatrootdirectoryofyourproject

#forexample:

#MY_PROJECT_DIR=/home/seb/xds-workspace/helloworld-native-application

cat>$MY_PROJECT_DIR/xds-project.conf<<EOF

exportXDS_AGENT_URL=localhost:8800

exportXDS_PROJECT_ID=4021617e-ced0-11e7-acd2-3c970e49ad9b

exportXDS_SDK_ID=c226821b-b5c0-386d-94fe-19f807946d03

EOF

NetBeans

Thischapterwillshowyouhowtocreate2configurations,onetocompileyourprojectnatively(usingnativeGNUgcc)andonetocross-compileyourprojectusingXDS.

YoucaneasilyswitchfromonetootherconfigurationusingmenuRun->SetProjectConfiguration.

Netbeans8.x:

OpenmenuTools->Options

OpenC/C++tab,inBuildToolssub-tab,clickonAddbutton:

Then,youshouldsetMakeCommandandDebuggerCommandtopointtoxdstools:

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 28October2018

Page 29: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

FinallyclickonOKbutton.

NowcreatewefirstdeclareprojectintoNetBeansandcreatefirstanativeconfiguration.Todothat,openmenuFile->NewProject

SelectC/C++ProjectwithExistingSources;ClickonNextbutton

Specifyyourprojectdirectoryand setSelectConfigurationMode toCustom.KeepToolCollection toDefaultGNU inordertocreateanativeconfigurationbasedonnativeGNUGCC.FinallyclickonNextbutton.

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 29October2018

Page 30: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

JustupdateRuninFolderfieldandadd build_nativesuffixsothatresultingbuildfileswillbelocatedinto build_nativesub-directory.KeepallotherssettingstodefaultvalueandclickonNextbutton.

Clickseveral timesonNextbutton (alwayskeepdefaultsettings)andclickonFinishbutton tocompletecreationofnativeconfiguration.

Now we will create a cross configuration based on XDS tools. Edit project properties (using menu File -> ProjectProperties)toaddanewconfigurationthatwilluseXDStocross-compileyourapplicationforexampleforaRenesasGen3board.

inBuildcategory,clickonManageConfigurationsbuttonandthenNewbuttontoaddanewconfigurationnamedforexample"Gen3board"

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 30October2018

Page 31: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

ClickonSetActivebutton

SelectPre-Buildsub-category,andset:

WorkingDirectory: build_gen3CommandLine: xds-cliexec-c../xds-project.conf--cmake-DRSYNC_TARGET=root@renesas-gen3-DRSYNC_PREFIX=/opt..

Pre-buildFirst: tickedSelectMakesub-category,andset:

WorkingDirectory: build_gen3BuildCommand: xds-cliexec-c../xds-project.conf--makeremote-target-populateCleanCommand: xds-cliexec-c../xds-project.conf--makeclean

SelectRunsub-category,andset:

RunCommand: target/[email protected]: build-gen3

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 31October2018

Page 32: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

ClickonOKbuttontosavesettings

By changing configuration from Default toGen3 board, you can now simply compile your helloworld application natively(Defaultconfiguration)orcross-compileyourapplicationthroughXDSfortheRenesasGen3board(Gen3boardconfiguration).

VisualStudioCode

OpenyourprojectinVSCode

cd$MY_PROJECT_DIR

code.&

Add new tasks : press Ctrl+Shift+P and select the Tasks:ConfigureTask command and youwill see a list of task runnertemplates.

Anddefineyourowntasks,hereisanexampletobuildhelloworld-native-applicationAGLhelloworldapplicationbasedoncmaketemplate.

{

"version":"2.0.0",

"type":"shell",

"presentation":{

"reveal":"always"

},

"tasks":[

{

"label":"clean",

"type":"shell",

"command":"/bin/rm-rf${workspaceFolder}/build/*&&mkdir-pbuild&&echoCleanupdone.",

"problemMatcher":[]

},

{

"label":"pre-build",

"type":"shell",

"group":"build",

"command":"/opt/AGL/bin/xds-cliexec--rpathbuild--configxds-project.conf--cmake-DRSYNC_TARGET=root@r

enesas-gen3-DRSYNC_PREFIX=/opt../",

"problemMatcher":[

"$gcc"

]

},

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 32October2018

Page 33: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

{

"label":"build",

"type":"shell",

"group":"build",

"command":"/opt/AGL/bin/xds-cliexec--rpathbuild--configxds-project.conf--makewidget",

"problemMatcher":[

"$gcc"

]

},

{

"label":"populate",

"type":"shell",

"command":"/opt/AGL/bin/xds-cliexec--rpathbuild--configxds-project.conf--makewidget-target-install"

,

"problemMatcher":[]

}

]

}

Torunatask:press Ctrl+Shift+P,selectthe Tasks:Runtaskandthenselectforexample pre-buildtotriggerpre-buildtask.

Note:

Youcanalsoaddyourownkeybindingstotrigabovetasks,forexample:

//Build

{

"key":"alt+f9",

"command":"workbench.action.tasks.runTask",

"args":"clean"

},

{

"key":"alt+f10",

"command":"workbench.action.tasks.runTask",

"args":"pre-build"

},

{

"key":"alt+f11",

"command":"workbench.action.tasks.runTask",

"args":"build"

},

{

"key":"alt+f12",

"command":"workbench.action.tasks.runTask",

"args":"populate"

},

MoredetailsaboutVSCkeybindingshere

MoredetailsaboutVSCtaskshere

QtCreator

Pleaserefertoagl-hello-qmlproject.ThankstoDennisforprovidingthisusefulexample.

OthersIDE

Comingsoon...

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 33October2018

Page 34: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

DebugyourfirstAGLapplication

Debugisbasedongdbandyouneedtouse xds-gdbasawrapperongdbtocross-debugyourapplication.

ThistoolallowsyoutodebuganapplicationbuiltwithXDSwithouttheneedtoinstallgdboranycrosstools.

Twodebuggingmodelsaresupported:

1. nativedebugging2. XDSremotedebuggingrequiringanXDSagent/serversetupandthatallowsyoutocrossdebugyourapplication.

BydefaultXDSdebugmodelisusedandyouneedtodefine XDS_NATIVE_GDBvariabletousenativegdbdebugmodeinstead.

Linkstosubchapters:

Configurationxds-gdbfromcommandlinexds-gdbwithinanIDE

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 34October2018

Page 35: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Configuration

xds-gdbconfigurationisdefinedbyvariables(seelistedbelow).Thesevariablesmaybesetusing:

environmentvariables(inherited),oraconfigfilesetwith XDS_CONFIGenvironmentvariable,forexample: XDS_CONFIG=/tmp/my_xds_gdb_config.envxds-gdborbysettingvariableswithinagdbinifile(seedetailsbelow),ora"user"configfilelocatedinfollowingdirectory(firstfoundistaken):1. $(CURRENT_DIRECTORY)/.xds-gdb.env2. $(CURRENT_DIRECTORY)/../xds-gdb.env3. $(CURRENT_DIRECTORY)/target/xds-gdb.env4. $(HOME)/.config/xds/xds-gdb.env

ConfigurationVariables

XDS_CONFIGConfigfiledefining XDS_xxxconfigurationvariables.

Variablesofthisfilewilloverwriteinheritedenvironmentvariables.

Variablesdefinitionmaybeprefixedornotby"export"keyword.

Hereisanexampleofconfigurationfile:

#forexample:

#MY_PROJECT_DIR=/home/seb/xds-workspace/helloworld-native-application

cat>$MY_PROJECT_DIR/xds-gen3.conf<<EOF

exportXDS_AGENT_URL=localhost:8800

exportXDS_PROJECT_ID=4021617e-ced0-11e7-acd2-3c970e49ad9b

exportXDS_SDK_ID=c226821b-b5c0-386d-94fe-19f807946d03

EOF

XDS_LOGLEVEL

Setlogginglevel(supportedlevels:panic,fatal,error,warn,info,debug)

XDS_LOGFILE

Setloggingfile,default /tmp/xds-gdb.log.

XDS_NATIVE_GDB

UsenativegdbmodeinsteadofremoteXDSmode.

XDS_PROJECT_ID(mandatoryinXDSmode)

ProjectIDyouwanttobuild

XDS_RPATH

Relativepathintoproject

XDS_SDK_ID(mandatoryinXDSmode)

CrossSdkIDtousetobuildproject

XDS_AGENT_URL

LocalXDSagenturl(default http://localhost:8800)

Configurationvariablessetwithingdbinitcommandfile

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 35October2018

Page 36: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Configurationvariablessetwithingdbinitcommandfile

Above XDS_xxxvariablesmayalsobedefinedwithingdbinitcommandfile(see--commandor-xoptionofgenuineGdb).

Youmustrespectthefollowingsyntax:commentedlineincluding :XDS-ENV:tag

ExampleofgdbinitfilewherewedefineprojectandsdkID:

#:XDS-ENV:XDS_PROJECT_ID=4021617e-ced0-11e7-acd2-3c970e49ad9b

#:XDS-ENV:XDS_SDK_ID=c226821b-b5c0-386d-94fe-19f807946d03

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 36October2018

Page 37: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Debugusingxds-gdbfromcommandline

XDSremotedebuggingmode

Firsttheprojectyouwanttodebugmustbedeclaredonanxds-serverandthisprojectmayalsohasbeenbuiltusingusingXDS(seeCreateyourfirstAGLapplicationformoredetails).

SotodebugityouneedtohavetheXDSagent-serverchaininplaceandyoualsoneedtheprojectandsdkuniqueid.

YoucanfindtheseIDsinprojectpageofXDSdashboardoryoucangetthemfromcommandlineusingthe --listoption.

ThisoptionlistsallexistingprojectsID:

xds-gdb--list

Nowtoreferyourproject,justset XDS_PROJECT_IDand XDS_SDK_IDvariables.

Youarenowreadytouse xds-gdbtoforexamplecrossdebugyourproject.

HereisanexampletobuildanddebugaprojectbasedonCMakefileandAGLapp-templates:

#Gointoyourprojectdirectory(forexamplehelloworld-native-application)

cd~/xds-workspace

gitclonehttps://github.com/iotbzh/helloworld-native-application.git

cdhelloworld-service

#Declareyourprojectonxds-server

#<fornow,youcanonlydothisstepusingxdsHTMLdashboard(seexds-serverdoc)>

#DefineXDSconfig

cat<<EOF>./xds-config.env

#optionalifnotdefaultvalue:XDS_AGENT_URL=http://localhost:8800

XDS_PROJECT_ID=IW7B4EE-DBY4Z74_myProject

XDS_SDK_ID=poky-agl_aarch64_4.0.1

EOF

#Telltoxds-cliandxds-gdbwhichisyourconfigfile

exportXDS_CONFIG=../xds-gen3.conf

#Createanewbuilddirectory

mkdirbuild&&cdbuild

#Startremotecrossbuild

xds-cliexec--cmake-DRSYNC_TARGET=root@myTarget..

xds-cliexec--make

xds-cliexec--makeremote-target-populate

#Startdebugging

xds-gdb-xtarget/[email protected]

Note::helloworld-native-applicationprojectisanAGLprojectbasedonapp-templates(includedasagitsubmodule).ThisCMaketemplating, used to develop application with the AGL Application Framework, will automatically generate makefile rules (eg.remote-target-populate)orscripts(eg. build/target/xxxscripts).

Formoreinfoaboutapp-template,pleaserefertothisdocumentation.

Nativedebugging

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 37October2018

Page 38: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Toenablenativedebuggingmode,youneedtodefine XDS_NATIVE_GDBvariable.

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 38October2018

Page 39: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Debugusingxds-gdbwithinanIDE

Firsttheprojectyouwanttodebugmustbedeclaredonanxds-serverandthisprojectmayalsohasbeenbuiltusingusingXDS(seeCreateyourfirstAGLapplicationformoredetails).

Netbeans

Netbeans8.x:

OpenmenuTools->Options

OpenC/C++tab,inBuildToolssub-tab,clickonAddbutton:

Then,youshouldsetMakeCommandandDebuggerCommandtopointtoxdstools:

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 39October2018

Page 40: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

FinallyclickonOKbutton.

Editprojectproperties(usingmenuFile->ProjectProperties)toupdateDebugsettings:

Besurethat"Gen3board"configurationisselected

SelectRuncategory,andset:

RunCommand: target/[email protected](scriptnamemaydependofRSYNC_TARGETvariableyousetinpre-buildcommand)RunDirectory: build_gen3

SelectDebugcategory,andset:

Debugcommand: /bin/trueWorkingDirectory:emptyfieldGdbInitFile: target/[email protected](scriptnamemaydependofRSYNC_TARGETvariableyousetinpre-buildcommand)

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 40October2018

Page 41: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

ClickonApplyandthenOKbuttontosavesettings

YoucannowstartdebuggingyourapplicationwithmenuDebug->DebugProject(orCTRL+F5shortcut)

OthersIDE

Comingsoon...

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 41October2018

Page 42: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

XDSinternals(advanceddocumentation)

Abstract

This2ndpart is the"technical"documentationofallXDSpieces/toolsthatallowsforexampletofinetuneXDSconfigurationorrebuildallXDStoolsfromscratch.

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 42October2018

Page 43: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Prerequisites

XDSiswritteninGoandcurrentlyonlybuildonLinuxhosthasbeenvalidated.

SotobuildXDSbinariesyouneedtoinstallfirstGoversion1.8.1orhigherandsomeothertools.Tobuild xds-serverand xds-agentyoualsoneedtoinstallinaddition nodejsand python3tools.

Ubuntu:

#Installvarioustools

sudoapt-getinstallgitmakenpmcurlgitzipunzipwget

#InstallGo

source/etc/os-release

wget-O-"http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x52B59B1571A79DBC054901C0F6BC817356A3D45E"|sudoapt-k

eyadd-

sudobash-c"cat>>/etc/apt/sources.list.d/golang.list<<EOF

debhttp://ppa.launchpad.net/longsleep/golang-backports/ubuntu${VERSION_CODENAME}main

EOF"

sudoapt-getupdate

sudoapt-getinstallgolang-go

#Installpython3

sudoapt-getinstallpython3

openSUSE:

#Installvarioustools

sudozypperinstallgitmakenpmcurlzipunzip

#InstallGo

#(thevalue'DISTRO'canbesetto{openSUSE_Leap_42.2,openSUSE_Leap_42.3,openSUSE_Tumbleweed})

source/etc/os-release;exportDISTRO="openSUSE_Leap_$VERSION"

sudozypperarhttp://download.opensuse.org/repositories/devel:/languages:/go/${DISTRO}/devel:languages:go.repo

sudozypper--gpg-auto-import-keysref

sudozypperinstallgo1.9

#Installpython3

sudozypperinstallpython3

Don'tforgettoopennewusersessionafterinstallingthesepackages.

AllLinuxdistro:

#InstallnodejsLTSversion(onlymandatoryforxds-serverandxds-agent)

sudonpminstall--globaln

sudonlts

Angulardevelopersthat'splantomodifyXDSDashboardwebapp(partof xds-agentrepo)mayalsoneedangularclitoolnamedng:

#Installangularclitool(ng)

sudonpminstall--globaln@angular/cli

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 43October2018

Page 44: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

XDS-X(cross)DevelopmentSystemServer

xds-serverisawebserverthatallowsusertoremotelycrossbuildapplications.

Thefirstgoalistoprovideamulti-platformcrossdevelopmenttoolwithnear-zeroinstallation.Thesecondgoalistokeepapplicationsourceslocally(onuser'smachine).

MakeitcompatiblewithexistingITpolicies(e.g.corporatebackuporSCM).Letusertocontinuetoworkasusual.

Usehisfavoriteeditor.keepperformancewhileediting/browsingsources.Avoidsmanualoperation

Thispowerfulandportablewebserver(writteninGo)exposesaRESTinterfaceoverHTTP.

xds-serverusesSyncthingtooltosynchronizeprojectsfilesfromusermachinetobuildservermachineorcontainer.

xds-server is commonly running on a build server (within a container or not) and xds-agentmust run on the developer/usermachineinordertosetupthefollowingconnectionchain:

developer/usermachine|buildserverorcontainer

---------------------------|-----------------------------

xds-cli<--->xds-agent<-|->xds-server

SEEALSO:xds-cli,acommand-linetoolthatallowsyoutosendcommandsto xds-agent/xds-serverandforexamplebuildyourapplicationfromcommand-lineorfromyourfavoriteIDE(suchasNetbeansorVisualStudioCode)through xds-agent<=>xds-server.

Linkstosubchapters:

ConfigurationHowtorunBuildfromscratchDebugging

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 44October2018

Page 45: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Configuration

xds-serverconfigurationisdrivenbyaJSONconfigfile( server-config.json).

Hereisthelogictodeterminewhich server-config.jsonfilewillbeused:

1. fromcommandlineoption: --configmyConfig.json2. $HOME/.xds/server/server-config.jsonfile3. /etc/xds/server/server-config.jsonfile4. <xds-serverexecutabledir>/server-config.jsonfile

Supportedfieldsinconfigurationfileare:

httpPort:HTTPportofclientwebapp/RESTAPIwebAppDir:locationofclientwebapplication(default:webapp/dist)shareRootDir:rootdirectorywhereprojectswillbecopiedlogsDir:directorytostorelogs(eg.syncthingoutput)sdkScriptsDir:directorywherescripts,usedtomanagedSDKs,areinstalledsdkDbUpdate:definehowSDKdatabase(s)is(are)updated,supportedvaluesare: disable, startup(default: startup)syncthing.binDir:syncthingbinariesdirectory(default:executabledirectory)syncthing.home":syncthinghomedirectory(usually.../syncthing-config)syncthing.gui-address:syncthingguiurl(defaulthttp://localhost:8385)syncthing.gui-apikey:syncthingapi-keytouse(defaultauto-generated)

Allfieldsareoptionalandexamplebelowcorrespondstothedefaultvalues.

{

"httpPort":8000,

"webAppDir":"webapp/dist",

"shareRootDir":"${HOME}/.xds/server/projects",

"logsDir":"/tmp/logs",

"sdkScriptsDir":"${EXEPATH}/scripts/sdks",

"sdkDbUpdate":"startup",

"syncthing":{

"binDir":"./bin",

"home":"${HOME}/.xds/server/syncthing-config",

"gui-address":"http://localhost:8385",

"gui-apikey":"123456789",

}

}

Notes:

Environmentvariablesaresupportedbyusing ${MY_VAR}syntax.

When xds-serverisstartedasasystemdservice,defaultenvironmentvariablesaresetinto /etc/default/xds-serverfile.

xds-server configuration is also driven by a JSON config file ( server-config.json ), and default JSON config is/etc/xds/server/server-config.json.

Note:Youcanuseyourown JSONconfigby settings APP_CONFIG variableof /etc/default/xds-server file toyour file, forexample /home/MYUSER/.xds/server/server-config.json

Disablesyncthing

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 45October2018

Page 46: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

CloudSyncsynchronizationtypebasedon syncthingtoolcanbedisabledbysimplyremoving(orrenaming) "syncthing"keyinconfigurationfile.HereisaJSONconfigurationfileexamplewheresyncthingkeyasbeenrenamed:

{

"httpPort":8000,

"webAppDir":"webapp/dist",

"shareRootDir":"${HOME}/.xds/server/projects",

"logsDir":"/tmp/logs",

"sdkScriptsDir":"${EXEPATH}/scripts/sdks",

"syncthing_DISABLE":{

"binDir":"./bin",

"home":"${HOME}/.xds/server/syncthing-config",

}

}

OnbenefittodothatistoincreaseXDS-Serverstartuptime.

Note:

CloudSync(AKAsyncthing)synchronizationtypecanalsobedisabledwhen "syncthing"keyisnotdefinedinJSONconfigurationfile.

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 46October2018

Page 47: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Howtorun

xds-serverhasbeendesignedtoeasilycompileanddebugAGLapplications.That'swhy xds-serverhasbeenintegratedintoAGLSDKdockercontainer.

Note:FormoreinfoaboutAGLSDKdockercontainer,pleaserefertoAGLSDKQuickSetup

Startxds-server

Thereareseveralwaytoinstallxds-serverandstart-updependofinstallationtype:

Installationtype

SupportedhostOS Start-up Installinstructions

Dockercontainer LinuxorMacOS Automaticbasedonsystemduser

serviceseeInstallationbasedonDockercontainer

VirtualMachine

Linux,MacOSorWindows

Automaticbasedonsystemduserservice

seeInstallationbasedonVirtualBoxappliance

Native Linux Automaticbasedonsystemduserserviceormanual seeNativeinstallation

Native MacOSorWindows Manually seeNativeinstallation

Automaticstart-upbasedonsystemduserservice

XDSserverisstartedasauserservicebySystemd.

/usr/lib/systemd/user/xds-server.service

Usewell-knownsystemdcommandstocontrol xds-server.serviceservice.

#EnterindockercontainerorVM

#(optional,dependingoninstallationtype)

ssh-p2222devel@localhost

#StatusXDSserver:

systemctl--userstatusxds-server

#RestartXDSserver

systemctl--userrestartxds-server

Ifneededyoucanchangedefaultsettingbydefiningspecificenvironmentvariablesfile

ssh-t-p2222devel@localhostvim/etc/default/xds-server

Forexampletocontrolloglevel,justsetLOG_LEVELenvvariable.

knowingthatsupportedlevelare:

panicfatalerrorwarn

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 47October2018

Page 48: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

infodebug

dockerexec${CONTAINER_NAME}bash-c"echo'LOG_LEVEL=debug'>>/etc/default/xds-server"

ssh-p2222devel@localhost--"systemctl--userrestartxds-server"

Manualstart-up

OnLinuxorMacOS,simplyexecute xds-serverexecutable:

/opt/AGL/bin/xds-server

OnWindows,simplyexecute xds-serverexecutable:

C:\AGL\bin\xds-server.exe

Note:

Invoke xds-server--help to getmore details about possible options that allow for example to change logging level or selectanotherconfigurationfile.

XDSserverRESTAPIandWebapplication

xds-serverexposesaRESTAPIandservesabasicweb-application.

RESTAPI based url is http://localhost:8000/api/v1/ whenXDS server is running on your host (localhost) and basicweb-applicationisavailableathttp://localhost:8000.

Justreplace localhostbythehostnameoripwhen xds-serverisrunningonanotherhost.

#GetversionusingRESTAPI

curlhttp://localhost:8000/api/v1/version

#Openbrowserandlocalxds-serverweb-application

xdg-openhttp://localhost:8000

Thenfollowinstructionsprovidedonthispagetoinstallandstart xds-agentthatmustrunlocallyonyourmachine.

Seealsoxds-agentdocumentationformoredetails.

SDKcross-toolchainManagement

SetuptoaddsupportofanewSDKfamily

Optionalstep:readthischapteronlyifyouplantoaddanewSDKfamily.

xds-server dynamically detects supported SDKs by scanning sub-directories of sdkScriptsDir directory (see Configurationchapter).

Eachsub-directory(usuallynameisthesameastheSDKfamily)of sdkScriptsDirmustcontainasetofscriptsthatwillbecalledby xds-servertomanagedSDKsofaspecificfamily.

Thesescriptsare:

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 48October2018

Page 49: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

add:usedtoadd/installanewSDKdb-dump:returnedthelistofavailableandinstalledSDKs(JSONformat)db-update:updateSDKsdatabaseget-family-config:returnedSDKfamilyconfigurationstructure(JSONformat)get-sdk-info:extractSDKinfo(JSONformat)fromaSDKfile/tarballremove:usedtoremoveanexistingSDK

Forexample,here2SDKsfamily( agland zephyr)aredefined:

#>tree./sdks/

./sdks/

├──agl

│├──add

│├──db-dump

│├──db-update

│├──get-family-config

│├──get-sdk-info

│└──remove

├──README.md

└──zephyr

├──add

│├──db-dump

│├──db-update

│├──get-family-config

│├──get-sdk-info

└──remove

Onstartup xds-serverwillcallinorder:

sdks/*/get-family-configtogetconfigurationofeachSDKfamily.sdks/*/db-updatetoupdatedatabase(onlywhen SdkDbUpdateissetto startup,seeConfigurationchapterformoredetails)sdks/*/db-dumpscriptstogettheinitiallistofavailableandinstalledSDKs.

Pleasereferto sdks/README.mdformoreinformationaboutscriptsdefinitionandtounderstandhowtoaddsupportofanewSDKfamily.

InstallanewSDK

PleaserefertoInstallingAGLSDKschapter.

Un-installaSDKfromcommandline

Used sdkscommandof xds-clitooltomanagedSDKs.

#ListinstalledSDKs

xds-clisdksls

ListofinstalledSDKs:

IDNAMESTATUSVERSIONARCH

c39e5998poky-agl_aarch64_4.0.1Installed4.0.1aarch64

d610bfbfpoky-agl-aarch64.current_on_iotbzh_download-3.99.1+snapshotInstalled3.99.1+snapshotaarch64.

current_on_iotbzh_download

a0ae663dpoky-agl-corei7-64-3.99.1+snapshotInstalled3.99.1+snapshotcorei7-6

4

87f0400bAGL-release-dab-3.99.3-m3ulcb-nogfxInstalled3.99.3aarch64

352c0584poky-agl-corei7-64-3.99.2+snapshotInstalled3.99.2+snapshotcorei7-6

4

d65fe750AGL-release-eel-latest-qemux86-64Installed4.99.5corei7-6

4

#Un-installaSDK

xds-clisdksuninstalld65fe750

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 49October2018

Page 50: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

SDKIDd65fe750-d3a7-38f5-83d8-3d3806054f8dsuccessfullydeleted.

Un-installaSDKfromXDSDashboard

OpenXDS-Dashboardinweb-browserandselect SDKsentryinleftsidemenu.

Ifneeded,switchto BASICSDKSVIEWviewandclickontrashiconlocatedinthetop-rightcornerofSDKcard.

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 50October2018

Page 51: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Buildxds-serverfromscratch

Dependencies

InstallGo,npm,nodejsandsomeothertools.

RefertoPrerequisiteschapterformoredetails.

Building

Nativebuild

Clonesourcesunder $ROOTDIR/src/gerrit.automotivelinux.org/gerrit/src/xds/xds-serverinorderrespectdirectoryhierarchythatmatchGopackageimportlogic(seeHowtoWriteGoCodeformoredetails).

ThenusedeliveredMakefile:

#DeclareROOTDIR,canbeanylocation(forexamplexds-build)

ROOTDIR=$HOME/xds-build

#CreatedirectoryhierarchythatmatchGopackageimportlogic

mkdir-p$ROOTDIR/src/gerrit.automotivelinux.org/gerrit/src/xds

cd$ROOTDIR/src/gerrit.automotivelinux.org/gerrit/src/xds

#Clonesources

gitclonehttps://gerrit.automotivelinux.org/gerrit/src/xds/xds-server

#orgitclonessh://[email protected]:29418/src/xds/xds-server

#Buildxds-server

#(notethatGOPATHwillcorrectlybesetbyMakefile)

cdxds-server

makeall

Generatexds-serverpackage/tarball

makepackage-all

Andtoinstall xds-server(bydefaultin /opt/AGL/xds/server):

makeinstall

Warning:

Makefileinstallruleanddefaultvaluesinconfigurationfilearesettofitthedockersetup.

Soyoumayneedtoadaptsomesettingswhenyouwanttoinstallxds-servernatively.

Note:

Used DESTDIRtospecifyanotherinstalldirectory

makeinstallDESTDIR=$HOME/opt/xds-server

XDSdockerimage

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 51October2018

Page 52: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

XDSdockerimage

Asanalternativetoapre-buildimage,youcanrebuildthecontainerfromscratch.

xds-serverhasbeenintegratedasaflavourofAGLSDKdockerimage.

Sotorebuilddockerimagejustexecutefollowingcommands:

#Clonedocker-worker-generatorgitrepo

gitclonehttps://git.automotivelinux.org/AGL/docker-worker-generator

#Startbuildthatwillcreateadockerimage

cddocker-worker-generator

makebuildFLAVOUR=xds

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 52October2018

Page 53: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Debugging

XDSserverarchitecture

TheserverpartiswritteninGoandwebapp(basicHTML)inAngular4.

|

+--bin/#wherexds-serverbinaryfilewillbebuilt

|

+--conf.d/#Linuxconfigurationandstartupfiles(systemduserservice)

|

+--glide.yaml#Gopackagedependencyfile

|

+--lib/#sourcesofserverpart(Go)

|

+--LICENSE#XDSserverlicense

|

+--main.go#mainentrypointofofWebserver(Go)

|

+--Makefile#makefileincluding

|

+--README.md#readme

|

+--scripts/#holdvariousscriptsusedforinstallationorstartup

|

+--test/#XDStestsuite

|

+--tools/#temporarydirectorytoholddevelopmenttools(likeglide)

|

+--vendor/#temporarydirectorytoholdGodependenciespackages

|

+--webapp/#sourceclientbasicwebapplication

Debugserverpart(Gocode)

InstallfirstVisualStudioCodeandGoplugin( extinstalllukehoban.Go)

VisualStudioCodelaunchersettingscanbefoundinto .vscode/launch.json.

Pleasefollowinstructionsofxds-agentdebuggingchapter,knowingthatyouexecutethesesameinstructionsin xds-serverrepo,inotherwordsbyreplacingxds-agentreferencesbyxds-server.

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 53October2018

Page 54: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

XDSServerTest

XDSServertestarchitecture

Thetestpartiswritteningoandsourcecodeisavailableintestdirectory.

|

+--test/#wherexds-servertestsourcefiles

|

+--test/main_test.go#mainentrypointofxds-servertest

|

+--test/fixtures#fixturesforrunningtest

Thetestexecutionwilllocallylaunchxds-serverandaccesstheapithroughRESTandtestresults,events,...

Dependenciessshd

MakesuresshdisinyouruserPATH.

LaunchtestUsethefollowingcommandtolaunchtestinxds-serverrootdirectory:

maketest

Launchonlyonetest,forexamplelaunchTestSdks:

maketestname=TestSdks

Increasetestverbosity:

maketestVERBOSE=1

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 54October2018

Page 55: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

XDS-X(cross)DevelopmentSystemAgent

XDS-agentisaclientthatshouldrunonyourlocal/userdevelopmentmachinewhenyouuseXDS.

Thisagenttakescare,amongothers,ofstartingSyncthingtooltosynchronizeyourprojectfilesfromyourlocalhosttoXDSbuildservermachineorcontainer(where xds-serverisrunning).

SEEALSO:xds-server,awebserverusedtoremotelycrossbuildapplications.

Linkstosubchapters:

ConfigurationStart-upBuildfromscratchDebugging

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 55October2018

Page 56: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Configuration

xds-agentconfigurationisdrivenbyaJSONconfigfile.

Thetarballmentionedinprevioussectionincludesthisfilewithdefaultsettings.

Hereisthelogictodeterminewhichconffilewillbeused:

1. fromcommandlineoption: --configmyConfig.json2. $HOME/.xds/agent/agent-config.jsonfile3. /etc/xds/agent/agent-config.jsonfile

Supportedfieldsinconfigurationfileare(allfieldsareoptionalandexamplebelowcorrespondstothedefaultvalues):

httpPort:httpportofagentRESTinterfacewebAppDir:locationofclientwebapp/dashboard(default:webapp/dist)logsDir:directorytostorelogs(eg.syncthingoutput)xdsServers:anarrayofxds-serverobject

xdsServers.url:urlofxds-servertoconnecttosyncthing:aobjectdefiningsyncthingsettings

syncthing.binDir:syncthingbinariesdirectory(default:executabledirectory)syncthing.home":syncthinghomedirectory(usually.../syncthing-config)syncthing.gui-address:syncthingguiurl(defaulthttp://localhost:8386)syncthing.gui-apikey:syncthingapi-keytouse(defaultauto-generated)

{

"httpPort":"8800",

"webAppDir":"./www",

"logsDir":"${HOME}/.xds/agent/logs",

"xdsServers":[

{

"url":"http://localhost:8000"

}

],

"syncthing":{

"home":"${HOME}/.xds/agent/syncthing-config",

"gui-address":"http://localhost:8386",

"gui-apikey":"1234abcezam"

}

}

Note:

environmentvariablesaresupportedbyusing ${MY_VAR}syntax.

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 56October2018

Page 57: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Start-up

Start-upbasedonsystemduserservice

ForLinuxdistro,XDSagentcanbestartedasauserservicebySystemd.

/usr/lib/systemd/user/xds-agent.service

Usewell-knownsystemdcommandstocontrol xds-agent.serviceservice.

#StatusXDSagent:

systemctl--userstatusxds-agent

#StartXDSagent

systemctl--userstartxds-agent

#StopXDSagent

systemctl--userstopxds-agent

Default settings are defined in /etc/default/xds-agent file but these settings you canoverwritten by $HOME/.xds/agent/agent-config.jsonfile,seeConfigurationchapterformoredetails.

Manualstart-upOnLinuxorMacOS,simplyexecute xds-agentexecutable:

/opt/AGL/bin/xds-agent

OnWindows, simply execute xds-agent executable (root pathmay changedependingwhereyou installed/unzippedxds-agenttarball):

C:\AGL\bin\xds-agent.exe

Note:

Ifneedbe,youcanincreaseloglevelbysettingoption --log<level>,supportedlevelare:panic,fatal,error,warn,info,debug.

Invoke xds-agent--help to getmoredetails about possible options that allow for example to change logging level or select aspecificconfigurationfile.

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 57October2018

Page 58: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Buildxds-agentfromscratch

Dependencies

InstallGo,npm,nodejsandsomeothertools.

RefertoPrerequisiteschapterformoredetails.

BuildingClonesourcesunder $ROOTDIR/src/gerrit.automotivelinux.org/gerrit/src/xds/xds-agentinorderrespectdirectoryhierarchythatmatchGopackageimportlogic(seeHowtoWriteGoCodeformoredetails).

ThenusedeliveredMakefile:

#DeclareROOTDIR,canbeanylocation(forexamplexds-build)

ROOTDIR=$HOME/xds-build

#CreatedirectoryhierarchythatmatchGopackageimportlogic

mkdir-p$ROOTDIR/src/gerrit.automotivelinux.org/gerrit/src/xds

cd$ROOTDIR/src/gerrit.automotivelinux.org/gerrit/src/xds

#Clonesources

gitclonehttps://gerrit.automotivelinux.org/gerrit/src/xds/xds-agent

#orgitclonessh://[email protected]:29418/src/xds/xds-agent

#Buildxds-agent

#(notethatGOPATHwillcorrectlybesetbyMakefile)

cdxds-agent

makeall

Generatexds-agentpackages/tarballsforLinux,MacOS,Windows

makepackage-all

Andtoinstall xds-agent(bydefaultin /opt/AGL/xds/agent):

makeinstall

Warning:

Makefileinstallruleanddefaultvaluesinconfigurationfilearesettofitthedockersetup.

Soyoumayneedtoadaptsomesettingswhenyouwanttoinstallxds-agentnatively.

Note:

Used DESTDIRtospecifyanotherinstalldirectory

makeinstallDESTDIR=$HOME/opt/xds-agent

Crossbuild

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 58October2018

Page 59: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

ForexampleonaLinuxmachinetocross-buildforWindows,justfollowthesesteps.

Thefirsttimeyouneedtoinstallallthewindows-amd64standardpackagesonyoursystemwith

#ListallsupportedOS/ARCH

gotooldistlist

#InstallallstandardpackagesforanotherOS/ARCH(eg.windowsamd64)

GOOS=windowsGOARCH=amd64goinstall-v-astd

Thencompileandpackagexds-agentusingprovidedmakefile

exportGOOS=windows

exportGOARCH=amd64

makeall

makepackage

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 59October2018

Page 60: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Debugging

XDSagentarchitecture

TheagentpartiswritteninGoandthewebapp/dashboardisintypescript+Angular4.

|

+--bin/wherexds-serverbinaryfilewillbebuilt

|

+--conf.dLinuxconfigurationandstartupfiles(systemduserservice)

|

+--glide.yamlGopackagedependencyfile

|

+--lib/sourcesofserverpart(Go)

|

+--main.gomainentrypointofofWebserver(Go)

|

+--Makefilemakefileincluding

|

+--README.mdreadme

|

+--scripts/holdvariousscriptsusedforinstallationorstartup

|

+--tools/temporarydirectorytoholddevelopmenttools(likeglide)

|

+--vendor/temporarydirectorytoholdGodependenciespackages

|

+--webapp/sourceclientbasicwebapp/dashboard

Debugxds-agent(Gocode)

InstallfirstVisualStudioCodeandGoplugin( extinstalllukehoban.Go)

VisualStudioCodelaunchersettingscanbefoundinto .vscode/launch.json.Theimportantthinkistocorrectlyset GOPATH inlaunch.jsoninordertobuildxds-agentanddebugitwithinVisualStudioCode.

Hereisanexampleoflaunch.json:

{

"version":"0.2.0",

"configurations":[{

"name":"XDS-Agent",

"type":"go",

"request":"launch",

"mode":"debug",

"remotePath":"",

"port":2345,

"host":"127.0.0.1",

"program":"${workspaceRoot}",

"env":{

"GOPATH":"${workspaceRoot}/../../../../../..:${env:GOPATH}",

},

"args":["-log","debug","-c","__agent-config_local_dev.json"],

"showLog":false

}

]

}

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 60October2018

Page 61: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

And __agent-config_local_dev.jsonfilecontentisasfollow:

{

"webAppDir":"./webapp/dist",

"logsDir":"${HOME}/tmp/xds-agent/logs",

"xdsServers":[

{

"url":"http://localhost:8000"

}

],

"syncthing":{

"binDir":"./bin",

"home":"${HOME}/tmp/xds_local_dev/syncthing-config",

"gui-address":"http://localhost:8386",

}

}

Trickstodebugbothxds-agentandxds-server

Todebugboth xds-agentand xds-serverorcommoncode xds-common,itmaybeusefulusethesamelocalsources.

Atricktodothatistoreplace xds-server+ xds-commonin vendordirectorybyasymlinkthatpointstolocalsources.

Soclonefirst xds-server+ xds-commonsourcesnextto xds-agentdirectory.

Youshouldhavethefollowingtree:

tree-L5src/

src/

`--gerrit.automotivelinux.org

`--gerrit

`--src

`--xds

|--xds-agent

|--xds-common

`--xds-server

Theninvoke vendor/debugMakefileruletocreatesymboliclinksinsidevendordirectory:

cdsrc/gerrit.automotivelinux.org/gerrit/src/xds/xds-agent

makevendor/debug

Debugdashboardpart(Typescript/angularcode)

Start xds-agenteitherfromcommandlineorindebugmode(seepreviouschapter)andinanotherterminalstartawatcherdaemonsothattypetypescriptsourcesofwebapp/dashboardareautomatically"transpiled"usingfollowingcommand:

cdwebapp

npmrunwatch

Then open the XDS Dashboard page (http://localhost:8800) and open the developer tool of web browser (for exampleCtrl+Shift+IinChrome).

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 61October2018

Page 62: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

xds-cli:command-linetoolforXDS

xds-cliisacommand-linetoolforX(cross)DevelopmentSystem.

Thistoolcanbeusedinadditionto XDSDashboardtocontrolXDSfromcommandline.

Linkstosubchapters:

ConfigurationStart-upBuildfromscratchDebugging

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 62October2018

Page 63: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Configuration

xds-cliconfigurationisdefinedeitherbyenvironmentvariablesorbysettingcommandlineoptions.

Configurationthroughenvironmentvariablesmayalsobedefinedinafilethatwillbesourcedby xds-clionstart-up.

Use --config|-coptionorset XDS_CONFIGenvironmentvariabletospecifytheconfigfiletouse.

So configuration is driven either by environment variables or by command line options or using a config file knowing that thefollowingpriorityorderisused:

1. useoptionvalue(forexampleuseprojectIDsetby --idoption),2. elseusevariable XDS_xxx(forexample XDS_PROJECT_IDvariable)whenaconfigfileisspecifiedwith --config|-coption,3. elseuse XDS_xxx(forexample XDS_PROJECT_ID)environmentvariable

Note:

Allparametersafteradoubledash(--)areconsideredasthecommandtoexecuteonxds-server.

GlobalOptions/Configurationvariables

Followingisthelistofglobaloptionsacrossallsub-commands.

--config|-coptionor XDS_CONFIGenvvariable

Envconfigfiletosourceonstartup

--log|-loptionor XDS_LOGLEVELenvvariable

Logginglevel,supportedlevelsare:

panicfatalerrorwarninfodebug

Defaultlevelis"error".

--rpathoptionor XDS_PATHenvvariable

Relativepathintoproject

timestamp|-tsoptionor XDS_TIMESTAMPenvvariable

Prefixoutputwithtimestamp

urloptionor XDS_AGENT_URLenvvariable

LocalXDSagenturl(default:"localhost:8800")

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 63October2018

Page 64: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Commands

projects

projects(short prj)commandshouldbeusedtomanagedXDSprojects.

Thiscommandsupportsfollowingsub-commands:

add,aAddanewproject

getGetapropertyofaproject

list,lsListexistingprojects

remove,rmRemoveanexistingproject

syncForcesynchronizationofprojectsources

Herearesomeusageexamples:

#Create/declareanewproject

xds-cliprjadd--label"myProjectName"--typepm-p/home/seb/xds-workspace/myProject-sp/home/devel/xds-workspace/myP

roject

#Listprojects

xds-cliprjls

#Deleteanexistingproject

xds-cliprjrm8e49

sdks

sdks(alias sdk)commandshouldbeusedtomanagedcrossSDKs.

Thiscommandsupportsfollowingsub-commands:

getGetapropertyofaSDK

list,lsListinstalledSDKs

install,iInstallaSDK

uninstall,rmUnInstallanexistingSDK

abort,aAbortaninstallaction

Herearesomeusageexamples:

#ListexistingSDKs

xds-clisdksls

#GetSDKinfo

xds-clisdksgetc64d

Note:

PleasealsorefertoInstallingAGLSDKschapterformoredetailsaboutsdksinstallation.

exec

execcommandshouldbeusedtoexeccommandthroughXDSsystem.

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 64October2018

Page 65: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

ForexampleyoucanusethiscommandtobuildyourprojectinXDSsystem.

Thiscommandsupportsfollowingsub-commands:

execcommandoptionsare:

--idoptionor XDS_PROJECT_IDenvvariable(mandatoryoption)

projectIDyouwanttobuild

--rpath(short -p)or XDS_RPATHenvvariable

relativepathintoproject

--sdkid(alias --sdk)or XDS_SDK_IDenvvariable(mandatoryoption)

CrossSdkIDtousetobuildproject.

Herearesomeusageexamples:

cd$MY_PROJECT_DIR

mkdirbuild

#Generatebuildsystemusingcmake

xds-cliexec--id=4021--sdkid=c226--"cdbuild&&cmake.."

#Buildtheproject

xds-cliexec--id=4021--sdkid=c226--"cdbuild&&makeall"

Incaseof xds-agentisnotrunningondefaulturl:port(thatis localhost:8800)

Youcanspecifytheurlusing --urloption:

xds-cli--url=http://localhost:8800exec--id=4021--sdkid=c226--"cdbuild&&makeall"

miscmisccommandallowstoexecutemiscellaneoussub-commandssuchas:

version,vGetversionofXDSagentandXDSserver

status,stsGetXDSconfigurationstatus(includingXDSserverconnection)

Herearesomeusageexamples:

xds-climiscversion--verbose

xds-climiscsts

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 65October2018

Page 66: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Howtobuild

Dependencies

InstallGoandsomeothertools.

RefertoPrerequisiteschapterformoredetails.

BuildingClone sources under $ROOTDIR/src/gerrit.automotivelinux.org/gerrit/src/xds/xds-cli in order respect directory hierarchy thatmatchGopackageimportlogic(seeHowtoWriteGoCodeformoredetails).

ThenusedeliveredMakefile:

#DeclareROOTDIR,canbeanylocation(forexamplexds-build)

ROOTDIR=$HOME/xds-build

#CreatedirectoryhierarchythatmatchGopackageimportlogic

mkdir-p$ROOTDIR/src/gerrit.automotivelinux.org/gerrit/src/xds

cd$ROOTDIR/src/gerrit.automotivelinux.org/gerrit/src/xds

#Clonesources

gitclonehttps://gerrit.automotivelinux.org/gerrit/src/xds/xds-cli

#orgitclonessh://[email protected]:29418/src/xds/xds-cli

#Buildxds-cli

#(notethatGOPATHwillcorrectlybesetbyMakefile)

cdxds-cli

makeall

Generatexds-clipackage/tarball

makepackage-all

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 66October2018

Page 67: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Debugging

XDScliarchitecture

ThistooliswritteninGo.

|

+--bin/#wherexds-clibinarywillbebuilt

|

+--cmd-XXX.go#GOsourcesofeachsub-commands

|

+--conf.d/#Linuxconfigurationandstartupfiles(systemduserservice)

|

+--glide.yaml#Gopackagedependencyfile

|

+--LICENSE#XDSclilicense

|

+--main.go#mainentrypoint(Go)

|

+--Makefile#makefileincluding

|

+--README.md#readme

|

+--scripts/#holdvariousscriptsusedforinstallation

|

+--vendor/#temporarydirectorytoholdGodependenciespackages

Debug

InstallfirstVisualStudioCodeandGoplugin( extinstalllukehoban.Go)

VisualStudioCodelaunchersettingscanbefoundinto .vscode/launch.json.

Pleasefollowinstructionsofxds-agentdebuggingchapter,knowingthatyouexecutethesesameinstructionsin xds-clirepo,inotherwordsbyreplacingxds-agentreferencesbyxds-cli.

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 67October2018

Page 68: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

xds-gdb:wrapperongdbforXDS

xds-gdbisawrapperongdbdebuggerforX(cross)DevelopmentSystem.

Thistoolallowsyoutodebuganapplicationbuiltwithanxds-serverwithouttheneedtoinstallgdboranycrosstool.

Twodebuggingmodelsaresupported:

1. nativedebugging

2. XDSremotedebuggingrequiringanXDSagent/serversetup.Thatallowsyoutoeasilycrossdebugyourapplication.

BydefaultXDSdebugmodelisusedandyouneedtodefine XDS_NATIVE_GDBvariabletousenativegdbdebugmodeinstead.

Linkstosubchapters:

ConfigurationBuildfromscratchDebugging

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 68October2018

Page 69: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Configuration

xds-gdbconfigurationisdefinedbyvariables(seelistedbelow).

Thesevariablesmaybesetusing:

environmentvariables(inherited),oraconfigfilesetwith XDS_CONFIGenvironmentvariable,forexample: XDS_CONFIG=/tmp/my_xds_gdb_config.envxds-gdborbysettingvariableswithinagdbinifile(seedetailsbelow),ora"user"configfilelocatedinfollowingdirectory(firstfoundistaken):1. $(CURRENT_DIRECTORY)/.xds-gdb.env2. $(CURRENT_DIRECTORY)/../xds-gdb.env3. $(CURRENT_DIRECTORY)/target/xds-gdb.env4. $(HOME)/.config/xds/xds-gdb.env

ConfigurationVariablesXDS_CONFIG

Configfiledefining XDS_xxxconfigurationvariables.

Variablesofthisfilewilloverwriteinheritedenvironmentvariables.

Variablesdefinitionmaybeprefixedornotby"export"keyword.

Hereisanexampleofconfigfile:

cat$HOME/myProject/xds-gdb.env

exportXDS_AGENT_URL=http://localhost:8800

exportXDS_PROJECT_ID=4021617e-ced0-11e7-acd2-3c970e49ad9b

exportXDS_SDK_ID=c226821b-b5c0-386d-94fe-19f807946d03

XDS_LOGLEVEL

Setlogginglevel

Supportedlevels:

panicfatalerrorwarninfodebug

XDS_LOGFILE

Setloggingfile,default /tmp/xds-gdb.log.

XDS_NATIVE_GDB

UsenativegdbmodeinsteadofXDSmode.

XDS_PROJECT_ID(mandatoryinXDSmode)

ProjectIDyouwanttobuild

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 69October2018

Page 70: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

XDS_RPATH

Relativepathintoproject

XDS_SDK_ID(mandatoryinXDSmode)

CrossSdkIDtousetobuildproject

XDS_AGENT_URL

LocalXDSagenturl(default http://localhost:8800)

Configurationvariablessetwithingdbinitcommandfile

Above XDS_xxxvariablesmayalsobedefinedwithingdbinitcommandfile(see--commandor-xoptionofgenuineGdb).

Youmustrespectthefollowingsyntax:commentedlineincluding :XDS-ENV:tag

ExampleofgdbinitfilewherewedefineprojectandsdkID:

#:XDS-ENV:XDS_PROJECT_ID=4021617e-ced0-11e7-acd2-3c970e49ad9b

#:XDS-ENV:XDS_SDK_ID=c226821b-b5c0-386d-94fe-19f807946d03

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 70October2018

Page 71: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Howtobuildxds-gdbfromscratch

Dependencies

InstallGoandsomeothertools.

RefertoPrerequisiteschapterformoredetails.

BuildingClone sources under $ROOTDIR/src/gerrit.automotivelinux.org/gerrit/src/xds/xds-gdb in order respect directory hierarchy thatmatchGopackageimportlogic(seeHowtoWriteGoCodeformoredetails).

ThenusedeliveredMakefile:

#DeclareROOTDIR,canbeanylocation(forexamplexds-build)

ROOTDIR=$HOME/xds-build

#CreatedirectoryhierarchythatmatchGopackageimportlogic

mkdir-p$ROOTDIR/src/gerrit.automotivelinux.org/gerrit/src/xds

cd$ROOTDIR/src/gerrit.automotivelinux.org/gerrit/src/xds

#Clonesources

gitclonehttps://gerrit.automotivelinux.org/gerrit/src/xds/xds-gdb

#orgitclonessh://[email protected]:29418/src/xds/xds-gdb

#Buildxds-gdb

#(notethatGOPATHwillcorrectlybesetbyMakefile)

cdxds-gdb

makeall

Generatexds-gdbpackage/tarball

makepackage-all

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 71October2018

Page 72: Table of Contents · Based on Docker container Based on Virtual Machine appliance Native installation Installing xds client tools Installing AGL SDKs Create your first AGL application

Debugging

XDSgdbarchitecture

ThistooliswritteninGo.

|

+--bin/#wherexds-gdbbinarywillbebuilt

|

+--gdb-XXX.go#xds-gdbGosources

|

+--conf.d/#Linuxconfigurationandstartupfiles(systemduserservice)

|

+--glide.yaml#Gopackagedependencyfile

|

+--LICENSE#XDSgdblicense

|

+--main.go#mainentrypoint(Go)

|

+--Makefile#makefileincluding

|

+--README.md#readme

|

+--scripts/#holdvariousscriptsusedforinstallation

|

+--vendor/#temporarydirectorytoholdGodependenciespackages

Debug

InstallfirstVisualStudioCodeandGoplugin( extinstalllukehoban.Go)

VisualStudioCodelaunchersettingscanbefoundinto .vscode/launch.json.

Pleasefollowinstructionsofxds-agentdebuggingchapter,knowingthatyouexecutethesesameinstructionsin xds-gdbrepo,inotherwordsbyreplacingxds-agentreferencesbyxds-gdb.

IoT.Bzh X(cross)DevelopmentSystem

Version6.0.0 72October2018