Run Applications
Installing Applications#
Applications can be installed from a local build (which you can do later) or from pre-compiled binaries from the cloud.
note
Pre-compiled binaries are compatible between boards at the instruction set level.
Hello World#
note
You can browse available applications in the web app.
# install from the cloudsl cloud.install:id=Kvp7xXzdO94kyCWAAcmW# Confirm the installsl fs.list:path=device@/app/flash# Run hello worldsl app.run:path=HelloWorld,terminalBlinky#
Blinky requires some command line arguments. You need to specify which pin you want to blink on. You can optionally specify the period in milliseconds.
# install from the cloudsl cloud.install:id=8PtMwYjOghdeUpMxPmyl# Confirm the installsl fs.list:path=device@/app/flash# Run Blinky and show helpsl app.run:path=Blinky,terminal,args='--help'# 1.7 is GPIOB pin 7 (LED on Nucleo144 boards)sl app.run:path=Blinky,terminal,args='--pin=1.7'# hit ctrl+c to exit slsl os.reset# flash slowersl app.run:path=Blinky,terminal,args='--pin=1.7 --period=1000'# hit ctrl+c to exit slsl os.reset# flash fastersl app.run:path=Blinky,terminal,args='--pin=1.7 --period=100'You will need to hit ctrl+c to exit sl. Blinky will keep running until you reset the board.
Run Both#
While Blinky is running, you can install and run HelloWorld. This time HelloWorld will be installed and run in RAM rather than flash.
sl cloud.install:id=Kvp7xXzdO94kyCWAAcmW,ramsl app.run:path=HelloWorld,terminalThe applications will be installed in the MCU internal RAM and ready for execution.
# List the installed applicationssl fs.list:path=device@/app/ramIf you run out of memory, you can delete applications using:
sl os.resetsl app.clean