Skip to content

Commit

Permalink
rename nrf52dk_base to nrf52_base
Browse files Browse the repository at this point in the history
This clarifies the actual intent of that heirarchy. Also add some
documentation explaining the naming scheme.
  • Loading branch information
ppannuto committed Apr 22, 2020
1 parent 022ff06 commit 82549fc
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 16 deletions.
2 changes: 1 addition & 1 deletion boards/acd52832/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ cortexm4 = { path = "../../arch/cortex-m4" }
capsules = { path = "../../capsules" }
kernel = { path = "../../kernel" }
nrf52832 = { path = "../../chips/nrf52832" }
nrf52dk_base = { path = "../nordic/nrf52dk_base" }
nrf52_base = { path = "../nordic/nrf52_base" }
2 changes: 1 addition & 1 deletion boards/acd52832/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use kernel::{create_capability, debug, debug_gpio, static_init};
use nrf52832::gpio::Pin;
use nrf52832::rtc::Rtc;

use nrf52dk_base::nrf52_components::ble::BLEComponent;
use nrf52_base::nrf52_components::ble::BLEComponent;

const LED1_PIN: Pin = Pin::P0_26;
const LED2_PIN: Pin = Pin::P0_22;
Expand Down
20 changes: 16 additions & 4 deletions boards/nordic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,25 @@ so two notions get conflated:
- The `nrf52xxx` family of chips, specifically for Tock the nrf52832 and nrf52840, is often referred to as the "nrf52" family of chips.
- The development kit for the nrf52840 is called the nrf52840dk; the development kit for the nrf52832 is called nrf52dk.

The result is that similarities are:
The result is:

- "nrf52" => nrf52832 chip or nrf52840 chip, which are on the nrf52dk and nrf52840dk respectively
- "nrf52dk" => board with exclusively the nrf52832 chip
- "nrf52840dk" => board with exclusively the nrf52840 chip
- "nrf52dk" => development board with the nrf52832 chip
- "nrf52840dk" => development board with the nrf52840 chip
- "nrf52840_dongle" => minimalist board with the nrf52840 chip

This naming matches the products released by Nordic, but users should be careful
This naming matches the products released by Nordic, but users should be careful.

Additionally, the acd52832 board is a platform developed by Aconno that
features a nrf52832.


Tock heirarchy
--------------

As much is shared across these platforms, Tock adds to the mix "nrf52_base",
this is a library crate that contains code shared by boards that include any
chips from the nrf52 family.


Legacy Boards
Expand Down
2 changes: 1 addition & 1 deletion boards/nordic/nrf52840_dongle/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ cortexm4 = { path = "../../../arch/cortex-m4" }
capsules = { path = "../../../capsules" }
kernel = { path = "../../../kernel" }
nrf52840 = { path = "../../../chips/nrf52840" }
nrf52dk_base = { path = "../nrf52dk_base" }
nrf52_base = { path = "../nrf52_base" }
4 changes: 2 additions & 2 deletions boards/nordic/nrf52840_dongle/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use kernel::component::Component;
#[allow(unused_imports)]
use kernel::{debug, debug_gpio, debug_verbose, static_init};
use nrf52840::gpio::Pin;
use nrf52dk_base::{SpiPins, UartChannel, UartPins};
use nrf52_base::{SpiPins, UartChannel, UartPins};

// The nRF52840 Dongle LEDs
const LED1_PIN: Pin = Pin::P0_06;
Expand Down Expand Up @@ -125,7 +125,7 @@ pub unsafe fn reset_handler() {
let chip = static_init!(nrf52840::chip::Chip, nrf52840::chip::new());
CHIP = Some(chip);

nrf52dk_base::setup_board(
nrf52_base::setup_board(
board_kernel,
BUTTON_RST_PIN,
&nrf52840::gpio::PORT,
Expand Down
2 changes: 1 addition & 1 deletion boards/nordic/nrf52840dk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ cortexm4 = { path = "../../../arch/cortex-m4" }
capsules = { path = "../../../capsules" }
kernel = { path = "../../../kernel" }
nrf52840 = { path = "../../../chips/nrf52840" }
nrf52dk_base = { path = "../nrf52dk_base" }
nrf52_base = { path = "../nrf52_base" }
4 changes: 2 additions & 2 deletions boards/nordic/nrf52840dk/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ use kernel::component::Component;
#[allow(unused_imports)]
use kernel::{debug, debug_gpio, debug_verbose, static_init};
use nrf52840::gpio::Pin;
use nrf52dk_base::{SpiMX25R6435FPins, SpiPins, UartChannel, UartPins};
use nrf52_base::{SpiMX25R6435FPins, SpiPins, UartChannel, UartPins};

// The nRF52840DK LEDs (see back of board)
const LED1_PIN: Pin = Pin::P0_13;
Expand Down Expand Up @@ -213,7 +213,7 @@ pub unsafe fn reset_handler() {
let chip = static_init!(nrf52840::chip::Chip, nrf52840::chip::new());
CHIP = Some(chip);

nrf52dk_base::setup_board(
nrf52_base::setup_board(
board_kernel,
BUTTON_RST_PIN,
&nrf52840::gpio::PORT,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "nrf52dk_base"
name = "nrf52_base"
version = "0.1.0"
authors = ["Tock Project Developers <tock-dev@googlegroups.com>"]
edition = "2018"
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion boards/nordic/nrf52dk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ cortexm4 = { path = "../../../arch/cortex-m4" }
capsules = { path = "../../../capsules" }
kernel = { path = "../../../kernel" }
nrf52832 = { path = "../../../chips/nrf52832" }
nrf52dk_base = { path = "../nrf52dk_base" }
nrf52_base = { path = "../nrf52_base" }
4 changes: 2 additions & 2 deletions boards/nordic/nrf52dk/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ use kernel::component::Component;
#[allow(unused_imports)]
use kernel::{debug, debug_gpio, debug_verbose, static_init};
use nrf52832::gpio::Pin;
use nrf52dk_base::{SpiPins, UartChannel, UartPins};
use nrf52_base::{SpiPins, UartChannel, UartPins};

// The nRF52 DK LEDs (see back of board)
const LED1_PIN: Pin = Pin::P0_17;
Expand Down Expand Up @@ -194,7 +194,7 @@ pub unsafe fn reset_handler() {
let chip = static_init!(nrf52832::chip::Chip, nrf52832::chip::new());
CHIP = Some(chip);

nrf52dk_base::setup_board(
nrf52_base::setup_board(
board_kernel,
BUTTON_RST_PIN,
&nrf52832::gpio::PORT,
Expand Down

0 comments on commit 82549fc

Please sign in to comment.