table of contents · sudo usermod -a -g dialout user_name ubuntu 14.04 or earlier propelleride is...

37

Upload: others

Post on 26-Sep-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take
Page 2: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

0

1

1.1

1.1.1

1.1.2

1.2

1.2.1

1.2.2

1.2.2.1

1.2.3

1.2.4

1.2.5

1.2.6

1.3

1.3.1

1.3.2

1.3.3

1.3.4

1.3.5

1.4

1.4.1

1.4.2

1.4.3

1.5

1.6

2

2.1

TableofContentsIntroduction

UserGuide

GettingStarted

InstallingPropellerIDE

InstallingFTDIDrivers

TheMainWindow

ToolBar

EditorView

CodeCompletion

DocumentationView

ProjectView

KeyboardShortcuts

ProjectArchiveTool

DebuggingTools

Terminal

MemoryMap

HeatMap

Oscilloscope

LogicAnalyzer

LanguageSupport

Spin

PropBASIC

C

Preferences

FrequentlyAskedQuestions

DeveloperGuide

BuildingPropellerIDE

PropellerIDEDocumentation

2

Page 3: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

IntroductionPropellerIDEisafun,easy,beautifuleditorforthePropellermicrocontroller.

Codethewayyoulikewithacolorful,customizableeditor.Digdeeperintoyourapplicationswiththebuilt-inmemorymap.SpeakyourPropeller'slanguagewiththeintegratedserialterminal.Findwhatyouneedfastwithsearchableprojectviewandauto-complete.StartcodingrightawaywiththeincludedSpinStandardLibrary.RunsgreatonWindows,Mac,Linux,andRaspberryPi!

PropellerIDEDocumentation

3Introduction

Page 4: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

UserGuide

PropellerIDEDocumentation

4UserGuide

Page 5: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

GettingStarted

PropellerIDEDocumentation

5GettingStarted

Page 6: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

InstallingPropellerIDEPropellerIDEiscurrentlyofficiallysupportedonWindows,Mac,Debian,andRaspbianOS.

First,downloadPropellerIDEforyourplatform.Thenfollowthecorrespondinginstructionstogetstarted.

WindowsPropellerIDEispackagedasaWindowsinstallerthatwillguidetheuserthroughouttheinstallationprocess.

MacOSXPropellerIDEispackagedasaregularDMGimage,somounttheVolumeanddragtheiconintotheApplicationsfolder.

Linux

Ubuntu

PropellerIDErequiresaminimumofQt5.2whichisonlyavailableonUbuntuasof14.04.

AfterdownloadingtheDebianpackageforyourplatform,installitwithdpkg.

sudodpkg-ipropelleride-(version)-amd64.deb

Itwillcomplainaboutdependenciesatwhichpointyoucanrunapt-gettofixthem.

sudoapt-getinstall-f

MakesureyouinstalltheFTDIdrivers!

sudoapt-getinstalllibftdi1

Addyourselftothedialoutgroupsoyoucanusetheserialport.

PropellerIDEDocumentation

6InstallingPropellerIDE

Page 7: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

sudousermod-a-GdialoutUSER_NAME

Ubuntu14.04orearlier

PropellerIDEisknowntobuildinUbuntuversionsasoldas12.04,butdoingsowilltakesomework.

AddtheUtopicUnicornsourcestoyour/etc/apt/sources.list.

debhttp://cz.archive.ubuntu.com/ubuntuutopicmain

Runanupdatetoensureyouraptrepositoriesareup-to-date.

sudoapt-getupdate

RaspberryPi-RaspbianWheezy

Qt5isnotavailableinthestandardrepository,butyoucanobtainitfromDebianbackports.

Addthefollowingentriesto/etc/apt/sources.list.

debhttp://twolife.be/raspbian/wheezymainbackports

deb-srchttp://twolife.be/raspbian/wheezymainbackports

Addtherepositorykey.

sudoapt-keyadv--keyserverkeyserver.ubuntu.com--recv-key2578B775

UpdateandinstallQt5anditsdependencies.

sudoapt-getupdate

sudoapt-getinstallqt5-defaultqt5-qmakelibegl1-mesalibgles2-mesa

PropellerIDEDocumentation

7InstallingPropellerIDE

Page 8: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

InstallingFTDIDriversInthistutorialwewillwalkyouthroughinstallingtheFTDIUSB-to-Serialdriver.ThisisrequiredtousethePropelleronallwiredplatforms.

WindowsHeadovertotheFTDIwebsite,andscrolldowntothechartunder"VCPDrivers"andselectthedownloadaccordingtoyouroperatingsystem.

Selectthemostrecentversionandstartthedownload(eitherwilldownloadthesamezippedfile).

Afterdownloadfinishes,openthezippedfile.Thisfilewillcontainbothexecutablesfor32-and64-bitprocessors.Selecttheoneyourcomputerruns(dpinst-amd64for64-bitanddpinst-x86for32-bit).

PropellerIDEDocumentation

8InstallingFTDIDrivers

Page 9: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

Click"ExtractAll"whenawindowpopsuptoextractthefiles.

Click"Extract"intoadestination.Anotherwindowwillpopupcontainingfiles.

PropellerIDEDocumentation

9InstallingFTDIDrivers

Page 10: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

Inthispoppedupwindow,doubleclickonthesameexecutablefrombefore.Remembertoclick""Yes"toallowtheprogramtomakechangestoyourcomputer.

PropellerIDEDocumentation

10InstallingFTDIDrivers

Page 11: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

Followtheinstructionsuntilinstallationiscompleted.

LinuxOnDebian,openaterminalandusethe"apt"packagemanagertoinstalltoyoursystem.

PropellerIDEDocumentation

11InstallingFTDIDrivers

Page 12: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

sudoapt-getinstalllibftdi1

OnFedora,usethe"yum"packagemanager.

sudoyuminstalllibftdi

PropellerIDEDocumentation

12InstallingFTDIDrivers

Page 13: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

TheMainWindow

PropellerIDEDocumentation

13TheMainWindow

Page 14: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

ToolBar

File

New

Createsanewfile.

Open

Opensanexistingfile.

Save

Savesthecurrentfiletodisk.

SaveAs

Savesacopyofthecurrentfileunderanewname.Theoriginalfileisnotsaved.

Project

ArchiveProject

Buildsanarchiveofthecurrentproject.

BuildProject

Compilesthecurrentprojectwithoutdownloadingit.

RunProject

Compilesanddownloadsittothecurrentlyselectedboard.

PropellerIDEDocumentation

14ToolBar

Page 15: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

WriteProject

Compilestheproject,downloadsittotheboard,andwritesittotheboard’sfirstEEPROM.

DeviceSelector

Selectsthetargetdownloaddevicefromanyavailabledevicesconnectedtothesystem.

Debugging

MemoryMap

OpenstheMemoryMapwidget.

Terminal

OpenstheTerminalwidget.

PropellerIDEDocumentation

15ToolBar

Page 16: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

EditorView

PropellerIDEDocumentation

16EditorView

Page 17: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

CodeCompletionWithPropellerIDE,youcancompletecodefromthecurrentfileoranotherfileinthepathinthemainfile’sdirectoryoradirectoryinthelibrarypath.

Thefollowingcompletionsaresupported.

Publicfunctions

Constants

CompletingFromTheCurrentFileAsofv0.36.7,PropellerIDEsupportscompletingwithinthecurrentfile.

Typing#bringsupalistofconstants.

Typing.bringsupalistoffunctions.

PressEsctoquitwithoutcompleting.PressEnterorReturntoacceptthecompletion.

Completingaconstantfromthecurrentfile.

CompletingFromAnotherFileYoucanalsocompletecodefromanotherfile.

Typingthealiasofanobject[1],then#opensalistofconstants.

Typingthealiasofanobject,then.opensalistoffunctions.

Aswithbefore,Escquits,EnterorReturnaccepts.

PropellerIDEDocumentation

17EditorView

Page 18: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

Completingafunctionfromanotherfile.

1e.g.wherewedeclareanobjectkbd:"Keyboard",thealiasiskbd.

PropellerIDEDocumentation

18EditorView

Page 19: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

ProjectView

PropellerIDEDocumentation

19ProjectView

Page 20: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

KeyboardShortcuts

BasicShortcuts

EditingShortcuts

Ctrl+Z Undo

Ctrl+Shift+Z Redo

Ctrl+X Cut

Ctrl+C Copy

Ctrl+V Paste

Ctrl+A Selectall

ViewControls

Ctrl++ Increasefontsize

Ctrl+- Reducefontsize

Ctrl+X Cut

Ctrl+C Copy

Ctrl+V Paste

Ctrl+A Selectall

ProjectControls

PropellerIDEDocumentation

20KeyboardShortcuts

Page 21: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

F8 Openmemorymap

F9 Compilecurrentprogram

F10 Runcurrentfile

F11 Writecurrentfile

F12 Openterminaloncurrentdevice

TabControls

Ctrl+T Createanewfile

Ctrl+Shift+T Createanewfilefromatemplate

Ctrl+W Closethecurrenttab

Ctrl+PgUp Gotoprevioustab

Ctrl+PgDn Gotonexttab

PropellerIDEDocumentation

21KeyboardShortcuts

Page 22: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

DebuggingToolsYoujustwroteanawesomeprogram,yousitdowntotestitout,youcrossyourfingers,drippingwithanticipation,and…itdoesn’twork.

Agh!Whatafrustratingmoment!

Luckily,PropellerIDEcanhelp.Ithaslotsofbuilt-intoolstohelpyoupinpointwhereyouwentwrong.

PropellerIDEDocumentation

22DebuggingTools

Page 23: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

TerminalPropellerIDEhasabuilt-inserialterminalyoucanusetodebugyourPropellerprograms.

Therearenorestrictionsonthenumberofterminalsthatcanbeopenatatime,evenonthesamedevice,andsoftwarecanbedownloadedtoattacheddeviceswithoutdisconnectingterminalsfirst.

ToolBar

ActiveLight&Button

WhenthelightisgreenandActiveispressed,thedeviceisconnectedandreadytosendandreceivedata.

PropellerIDEDocumentation

23Terminal

Page 24: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

Whentheterminalisdisconnected,itgoesblackandwillstopreceivingdataandrespondingtokeypresses.

Reset

Sendsahardwareresettotheboard.

Clear

Clearsalltextfromtheconsoleandsetsthecursorbacktothetopleft.

Device

Thenameofthedevicethisterminaliscurrentlyattachedto.Thislistofdevicesvariesdependingonyourplatform,butgenerallyspeaking,theylookasfollows:

Serialdevices:

PropellerIDEDocumentation

24Terminal

Page 25: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

Windows COM1,COM2,…

Linux ttyUSB0,ttyUSB1,…

Mac cu.usbserial-…

Wifidevices:

notyetavailable

BaudRate

Therateoftransmissiontotheboard.Typeinthebaudrateyouwant,orclickthearrowtoselectfromthefollowingbaudrates:

9600,19200,38400,57600,115200,230400,460800,921600

Thedefaultbaudrateis115200.

Echo

Whenechoisenabled,everythingyoutypewillbecopiedtotheconsole,inadditiontobeingsenttothedevice.Somesoftwareexpectsechotobeenabled,whileotherssendthedatabacktotheconsolethemselves,whichwillresultinduplicatedtext.

Trytogglingthisfeatureifyourapplicationisn’tbehavinghowyouwantitto.

Rx/TxLights

Theselightsindicatewhendataisreceivedorsent.Redisreceived,blueissent.

InputTherearetwowaystoinputtext

Throughtheconsoleitself

Throughtheinputlineatthebottomofthewindow

Console

PropellerIDEDocumentation

25Terminal

Page 26: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

Usingtheconsoleisrecommendedwhenthetargetdevicesupportsamoreadvancedcommand-lineinterface,asitwillallowyoutotakeadvantageofthingslikereadlinecapabilities,cursorpositioning,etc.

PressingtheEnterorReturnkeysendsasinglenewline(ASCII10)tothedevice.

InputLine

Forsimplerinterfaces,theinputlineisabetterchoice.

PressingtheEnterorReturnsendsthetextwithoutnewline.PressingtheSendbuttonsendsthetextplusasinglenewline.

ParallaxSerialTerminalCompatibilityThefollowingASCIIcharactersimplementbasicterminalcompatiblewiththeoriginalPropellerTool’sserialterminal.

PropellerIDEDocumentation

26Terminal

Page 27: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

16 ClearScreen

11 CleartoEndofline

1 Homecursor

2 PositionCursorinx,y

14 PositioncursorinX

15 PositioncursorinY

13 NewLine

10 LineFeed

3 MovecursorLeft

4 MovecursorRight

5 MovecursorUp

6 MovecursorDown

9 Tab

8 Backspace

PropellerIDEincludesacorrespondingcom.serial.terminalobjectthatimplementsthesecontrolcharacters.

PropellerIDEDocumentation

27Terminal

Page 28: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

LanguageSupport

PropellerIDEDocumentation

28LanguageSupport

Page 29: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

Spin

PropellerIDEDocumentation

29Spin

Page 30: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

Preferences

AppearancePropellerIDEcanbethemedtosuityourpreferenceintheAppearancetab.Clicktoselectfromadrop-downofthemesormonospacefonts,ordouble-clickononeofthecolorswatchestoopenacolorpicker.

ChangestotheappearancewillpropogateinstantlythroughouttheIDE.

ClassicTheme

PropellerIDEprovidestheClassicthemeforcompatibilitywiththeoriginalPropellerTool.ItsupportsthelegacyParallaxfontwiththeproprietaryPropellercharactermapping.

Warning

TheParallaxfontisdeprecatedTheproprietarycharactermappingisnotportableandisonlyprovidedforlegacysupport.ConsidertheuseofastandalonediagrammingtoolorplainASCIIforcreatingin-sourcediagrams.

PropellerIDEDocumentation

30Preferences

Page 31: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

LanguagesPropellerIDEsupportsmultiplelibrarypathstobesearchedfromtoptobottom.

Note Thisisstillanin-progressfeature.

PropellerIDEDocumentation

31Preferences

Page 32: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

Editor

AutocompletionTogglescodecompletion

PropellerIDEDocumentation

32Preferences

Page 33: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

FrequentlyAskedQuestions1. WhatisPropellerIDE?

AmoderneditorfortheParallaxPropeller.

PropellerIDEDocumentation

33FrequentlyAskedQuestions

Page 34: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

DeveloperGuide

PropellerIDEDocumentation

34DeveloperGuide

Page 35: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

BuildingPropellerIDEThefollowingdependenciesareneededtobuildPropellerIDE:

Qt5.3orlater

PropellerIDEhasbeenbuiltonthefollowingplatforms:

Windows(Vista,7,8)

MacOSX(10.6onward)

Ubuntu(12.04onward)

RaspbianOS

pcDuino

PropellerIDEhasbeenbuiltwiththefollowingcompilertoolchains:

GCC

MinGW-x64

Clang

MSVC

GettingthesourceCheckouttheprojectanditsdependencies.

gitclone--recursivehttps://github.com/parallaxinc/PropellerIDE.git

Buildingtheexecutable

Usingqmake

PropellerIDEcanbebuiltfromthecommand-lineusingqmaketogeneratemakefiles.

PropellerIDEDocumentation

35BuildingPropellerIDE

Page 36: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

cdPropellerIDE

qmake

Ifyouhavemadechangestothe.profiles,remembertouse-rtoupdateallmakefiles,notjustthecurrentone.

qmake-r

UseMaketobuildtheproject.OnmostLinuxes,GNUMakeisubiquitous.PropellerIDEsupportsparallelbuilds,somakesuretospecifythenumberofjobswith-j.

make-j16

Themakefilessupportstandardmakefiletargets:makecleanremovesobjectfiles,makedistcleanremovesobjectfilesandmakefiles.

Windows

YouwillneedtodownloadQt5fromtheQtwebsite.YouwillalsoneedInnoSetuptobuildtheWindowsinstaller.

https://www.qt.io/download/

http://www.jrsoftware.org/isinfo.php

QtisdistributedwitheitheraMinGWorMSVCtoolchainonWindows.BesuretoaddthepathstothetoolchainandInnoSetuptothesystemenvironment.

C:\Qt\Tools\mingw482_32\bin;C:\Qt\5.3\mingw482_32\bin;C:\ProgramFiles(x86)\InnoSetup5

TheMinGWtoolchainispainfullyslow,butyoucanbuildwithmingw32-make,whichsupposedlysupportsparallelbuildsbutisslowasadoganywaysoitmakeslittledifference.

mingw32-make

Ifyou’vedecidedtoinstallVisualStudio,you’llhaveaninstanceofnmake.YoucanenableparallelbuildsbysettingtheCLenvironmentvariable,whichwillspeedthingsupconsiderably.

PropellerIDEDocumentation

36BuildingPropellerIDE

Page 37: Table of Contents · sudo usermod -a -G dialout USER_NAME Ubuntu 14.04 or earlier PropellerIDE is known to build in Ubuntu versions as old as 12.04, but doing so will take

setCL=/MP

Thenstartthebuild.

nmake

UsingQtCreator

PropellerIDEmayalsobebuiltwithQtCreator,butitshouldbenotedthatQtCreatorandqmakebuildsseemtobeincompatiblewitheachother,somakedistcleanshouldbecalledbeforeswitchingbetweenthem.

UsingCMake

InstructionsonCMakebuildsarenotyetavailable.

PackagingForreleasePropellerIDEisdistributedinstandalonepackagesusingpackthing,anopensourcepackagingtoolavailableonGitHubordownloadableviathePythonPackageIndex.

ViaGitHub:

gitclonehttps://github.com/lamestation/packthing

cdpackthing

pipinstall-rrequirements.txt

pythonsetup.pyinstall

ViaPyPI:

pipinstallpackthing

PropellerIDEDocumentation

37BuildingPropellerIDE