Commit Graph
25 Commits
Author SHA1 Message Date
Johann HemmannandGitHub 5413c2c24b Fix lto option in cargo profile (#64)
Raised in https://github.com/knurling-rs/app-template/pull/61#issuecomment-1166687101.
2022-06-27 14:46:28 +02:00
Jorge AparicioandGitHub b4327d0259 Disable LTO (#61)
to work around rust-lang/rust#90357
2022-01-05 12:36:38 +01:00
Jorge AparicioandGitHub 47277bbf9d add unit tests (#60)
also, flatten the workspace into a single crate. I forget what the original reason for the workspace
was -- I think it was added because `cargo t -p testsuite` is nicer than running
`cargo t --test $filename` N times. However, a single crate removes the need to repeat the list of
dependencies in `testsuite/Cargo.toml`

also, document the two sets of tests included with the template and how to run them in the README
file
2022-01-03 11:29:08 +01:00
Jorge AparicioandGitHub 733a38a272 update defmt deps to v0.3 (#56)
* bump defmt to v0.3

remove Cargo features which are no longer needed

* remove `timestamp!`

it's no longer mandatory and a monotonic counter does not add much value given that `defmt-rtt`
works by disabling interrupts so one won't see logs out of order anyways (which would the case for a
lock-free multi-channel `Logger`)

* use println! in most the examples

so that all examples print something when `DEFMT_LOG` is unset

* make overflow example terminate in less steps

also include an estimate of the stack pointer to show the stack grows downwards towards the RAM
boundary
2021-11-10 04:46:56 +01:00
Johann HemmannandGitHub d0aa56c67d Merge pull request #42 from knurling-rs/update-defmt-0.2.0
Update to defmt 0.2.0
2021-02-26 23:04:48 +01:00
Jorge Aparicio c915534a05 add debuginfo to test --release 2021-02-24 14:58:50 +01:00
Jorge Aparicio 9200fbe95d also enable optimizations in the test profile
Cargo doc says:

> Note that when using the cargo test and cargo bench commands, the test/bench profiles only apply to the final test executable. Dependencies will continue to use the dev/release profiles.

So with the current settings, `cargo test` optimizes all dependencies but not the top level
crate (e.g. `test/foo.rs`)

This commit adds optimizations to the last `rustc` invocation of `cargo test`. This results in a 6%
reduction in binary size when doing `cargo test` on our sample test file.
2021-02-24 14:43:35 +01:00
Urhengulas 1d0750653f Update dependencies 2021-02-22 22:16:41 +01:00
Jorge Aparicio ae0df60ec2 use defmt::assert; add defmt::panic_handler 2020-11-24 17:38:08 +01:00
Jorge Aparicio e5cf89b4eb use defmt-test in the test suite 2020-11-13 15:42:07 +01:00
Jorge Aparicio e4f6307625 explain the commented out Cargo.toml bits 2020-11-12 17:56:36 +01:00
Jorge Aparicio 1aac949a44 document how to switch to the git version of defmt 2020-11-12 13:51:46 +01:00
Jorge AparicioandGitHub ac180e7ecd Merge pull request #22 from knurling-rs/crates-io
use crates.io versions
2020-11-12 11:10:06 +01:00
Jonas SchievinkandGitHub d9e8e49464 Remove proc macro opt-level override
I believe Cargo now does this by default
2020-11-11 22:40:52 +01:00
Jorge Aparicio da11b67bbb use crates.io versions
also enable panic-probe's 'print-defmt' so panic messages are printed
2020-11-11 14:20:46 +01:00
Andres VahterandGitHub 31f28fe119 update cortex-m to 0.6.4 2020-10-29 15:05:07 +02:00
Andres VahterandGitHub fee8afc923 Update cortex-m-rt to 0.6.13 2020-10-24 15:53:13 +03:00
Jonas Schievink a4b0c0966f Remove test = false from lib
`cargo test --all` doesn't work anyways, so this doesn't do anything
useful
2020-08-31 19:16:07 +02:00
Jonas Schievink 01ecb349d0 Add an on-device test suite 2020-08-31 18:20:48 +02:00
Jonas Schievink 2e4c43d908 Use panic-probe instead of a custom panic handler 2020-08-31 16:01:57 +02:00
Jonas Schievink c546adbd4b Don't enable LTO in the dev profile 2020-08-31 13:57:24 +02:00
Jorge AparicioandGitHub e1ec5a6cf3 Merge pull request #2 from knurling-rs/jonas-schievink-patch-1
Avoid opt-level=z
2020-08-28 13:16:21 +00:00
Jorge Aparicio d1d23651f3 increase debug info level 2020-08-28 14:59:32 +02:00
Jonas SchievinkandGitHub 1f09510c74 Avoid opt-level=z
Avoids https://github.com/rust-lang/rust/issues/75045, which you would otherwise hit when using the nRF HAL.
2020-08-27 16:34:24 +02:00
Jorge Aparicio df96204a61 initial commit 2020-08-21 12:02:11 +02:00