From 7ae724595629f70c3b373d3f0b6b8486b23f4cd0 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sun, 13 May 2018 12:02:37 +0200 Subject: [PATCH] document the no #![no_main] issue --- src/lib.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 89dcc23..b311b7e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -135,13 +135,28 @@ //! //! # Examples //! -//! Check the [examples module](./examples/index.html) +//! Check the [examples module][examples] +//! +//! [examples]: ./examples/index.html //! //! # Troubleshooting //! //! This section contains fixes for common errors encountered when the //! `cortex-m-quickstart` template is misused. //! +//! ## Used the standard `main` interface +//! +//! Error message: +//! +//! ``` text +//! $ cargo build +//! Compiling demo v0.1.0 (file:///home/japaric/tmp/demo) +//! +//! error: requires `start` lang_item +//! ``` +//! +//! Solution: Use `#![no_main]` and `entry!` as shown in the [examples]. +//! //! ## Forgot to launch an OpenOCD instance //! //! Error message: