Skip to content
This repository was archived by the owner on Dec 9, 2018. It is now read-only.

japaric-archived/photon-quickstart

Repository files navigation

photon-quickstart

Cargo template for developing photon applications

Firmware version: v0.6.2

Dependencies

  • Embedded ARM toolchain. Any recent version should do.
  • Rust nightly toolchain. See https://rustup.rs
  • Xargo. $ rustup run nightly cargo install xargo
  • The rust-src component for nightly: $ rustup default nightly && rustup component add rust-src If you don't want to keep nightly as the default, you can revert the change after installing the rust-src component.
  • crc32 and xxd. Check how your distribution ships these binaries.

How to use

# Instantiate this template
$ git clone https://github.com/japaric/photon-quickstart

$ mv photon-quickstart my-app && cd $_

$ edit Cargo.toml && head $_
authors = ["Jorge Aparicio <jorge@japaric.io>"]
name = "my-app"
version = "0.1.0"

# build an example (or write your application in src/main.rs and build that)
$ xargo build --example blinky --release

$ arm-none-eabi-size target/photon/release/examples/blinky
   text    data     bss     dec     hex filename
   4468       8    1476    5952    1740 target/photon/release/examples/blinky

# convert the output into a flash-able binary
$ sh elf2bin.sh target/photon/release/examples/blinky

# flash the application
$ particle flash $device blinky.bin

License

The Rust code in repository is licensed under either of

at your option.

The binary blobs in this repository were generated from the spark/firmware repository and as such they are licensed according to their terms.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Cargo template for developing photon applications

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages