Skip to content

Commit

Permalink
Fix minor issue with configuration and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
PMunch committed May 6, 2022
1 parent 6934b07 commit 2d2cc1a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ this process is pretty much the same no matter the board. Simply create a `confi
import boardConf
board "unor3"
avr.any.gcc.path = "/usr/bin"
avr.any.gcc.exe = "avr-gcc"
avr.any.gcc.linkerexe = "avr-gcc"
--avr.any.gcc.path: "/usr/bin"
```

This does a couple of things, starting with including the `boardConf` module from Ratel. Then it calls `board` which tells
Expand All @@ -38,8 +36,7 @@ as they will only be applied when compiling for these platforms.

## Writing our code
Now that our project is all set up we need to write some code, the sample from the front page is a good start. Simply save the following code in
a file with the `.nim` extension named the same as the folder it's in. If you're using Nim on the devel branch you can leave out the `main` proc and simply
have everything in the global scope.
a file with the `.nim` extension named the same as the folder it's in.

```nim
import board
Expand Down
2 changes: 1 addition & 1 deletion ratel.nimble
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package

version = "0.2.0"
version = "0.2.1"
author = "Peter Munch-Ellingsen"
description = "Nim for microcontrollers"
license = "MIT"
Expand Down
2 changes: 0 additions & 2 deletions src/private/boards/helpers/avrBoardConf.nim
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
--opt:size
--exceptions:goto

--noMain

--cc:gcc
--avr.any.gcc.exe:"avr-gcc"
--avr.any.gcc.linkerexe:"avr-gcc"
Expand Down
4 changes: 1 addition & 3 deletions website/gettingstarted.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ <h2>Getting started</h2>
<pre><code><span class="Keyword">import</span> <span class="Identifier">boardConf</span>
<span class="Identifier">board</span> <span class="StringLit">&quot;unor3&quot;</span>

<span class="Identifier">avr</span><span class="Operator">.</span><span class="Identifier">any</span><span class="Operator">.</span><span class="Identifier">gcc</span><span class="Operator">.</span><span class="Identifier">path</span> <span class="Operator">=</span> <span class="StringLit">&quot;/usr/bin&quot;</span>
<span class="Identifier">avr</span><span class="Operator">.</span><span class="Identifier">any</span><span class="Operator">.</span><span class="Identifier">gcc</span><span class="Operator">.</span><span class="Identifier">exe</span> <span class="Operator">=</span> <span class="StringLit">&quot;avr-gcc&quot;</span>
<span class="Identifier">avr</span><span class="Operator">.</span><span class="Identifier">any</span><span class="Operator">.</span><span class="Identifier">gcc</span><span class="Operator">.</span><span class="Identifier">linkerexe</span> <span class="Operator">=</span> <span class="StringLit">&quot;avr-gcc&quot;</span></code></pre>
<span class="Operator">--</span><span class="Identifier">avr</span><span class="Operator">.</span><span class="Identifier">any</span><span class="Operator">.</span><span class="Identifier">gcc</span><span class="Operator">.</span><span class="Identifier">path</span><span class="Operator">:</span> <span class="StringLit">&quot;/usr/bin&quot;</span>

<p>This does a couple of things, starting with including the <code>boardConf</code> module from Ratel. Then it calls <code>board</code> which tells
Ratel that the board we want to build for is the Arduino Uno rev. 3. This will automatically include a set of sane defaults for compiling for this
Expand Down

0 comments on commit 2d2cc1a

Please sign in to comment.