Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ rustflags = [
"-C", "link-arg=-Tlink.x",
"-C", "link-arg=--gc-sections",
"-C", "linker=arm-none-eabi-ld",
"-Z", "linker-flavor=ld",
]

[target.thumbv7m-none-eabi]
Expand All @@ -18,7 +17,6 @@ rustflags = [
"-C", "link-arg=-Tlink.x",
"-C", "link-arg=--gc-sections",
"-C", "linker=arm-none-eabi-ld",
"-Z", "linker-flavor=ld",
]

[target.thumbv7em-none-eabi]
Expand All @@ -29,5 +27,4 @@ rustflags = [
"-C", "link-arg=-Tlink.x",
"-C", "link-arg=--gc-sections",
"-C", "linker=arm-none-eabi-ld",
"-Z", "linker-flavor=ld",
]
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "ChibiOS"]
path = ChibiOS
url = https://github.com/ChibiOS/ChibiOS.git
url = https://github.com/ChibiOS/ChibiOS
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[package]
name = "chibi-os-rust"
version = "0.3.0"
authors = ["Brandon Matthews <[email protected]>"]
version = "0.5.0"
authors = ["Brandon Matthews <[email protected]>", "Philippe Boutin <[email protected]>"]
build = "build.rs"

[build-dependencies]
gcc = "0.3"
bindgen = "0.26.3"
cc = "^1.0"
bindgen = "^0.26"

[dependencies]
cty = "0.1"
cty = "0.1.5"

[dependencies.cortex-m-rt]
features = ["abort-on-panic"]
version = "0.3.0"
version = "^0.3"

[features]
# The features you specify will control the particular port devince and chip
Expand Down
2 changes: 1 addition & 1 deletion ChibiOS
Submodule ChibiOS updated 4668 files
26 changes: 14 additions & 12 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::env;
use std::path::PathBuf;

extern crate bindgen;
extern crate gcc;
extern crate cc;

/// In order to build ChibiOS and generate bindings, ChibiOS must know about its chip type,
/// its device type, and its port. Each of these things controls slightly different aspects
Expand All @@ -26,7 +26,7 @@ fn main() {

let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());

let mut builder = gcc::Config::new();
let mut builder = cc::Build::new();

let bindings = bindgen::Builder::default()
.header("./ChibiOS/os/common/abstractions/cmsis_os/cmsis_os.h")
Expand All @@ -53,10 +53,11 @@ fn main() {
"./ChibiOS/os/rt/src/chevents.c",
"./ChibiOS/os/rt/src/chmsg.c",
"./ChibiOS/os/rt/src/chdynamic.c",
"./ChibiOS/os/common/oslib/src/chmboxes.c",
"./ChibiOS/os/common/oslib/src/chmemcore.c",
"./ChibiOS/os/common/oslib/src/chheap.c",
"./ChibiOS/os/common/oslib/src/chmempools.c",
"./ChibiOS/os/oslib/src/chmboxes.c",
"./ChibiOS/os/oslib/src/chfactory.c",
"./ChibiOS/os/oslib/src/chmemheaps.c",
"./ChibiOS/os/oslib/src/chmemcore.c",
"./ChibiOS/os/oslib/src/chmempools.c",
];

for os_src_file in os_src_files.iter() {
Expand Down Expand Up @@ -101,10 +102,11 @@ fn main() {
"./ChibiOS/os/license",
"./ChibiOS/os/various",
"./ChibiOS/os/rt/include", // KERNINC, from os/rt/rt.mk
"./ChibiOS/os/common/oslib/include", // KERNINC, from os/rt/rt.mk
"ChibiOS/os/common/ports/ARMCMx", // PORTINC, from os/common/ports/ARMCMx/compilers/GCC/mk/port_v?m.mk
"ChibiOS/os/common/ports/ARMCMx/compilers/GCC", // PORTINC, from os/common/ports/ARMCMx/compilers/GCC/mk/port_v?m.mk
"ChibiOS/os/common/ext/CMSIS/include", // STARTUPINC, from os/common/startup/ARMCMx/compilers/GCC/mk/startup_*.mk
"./ChibiOS/os/oslib/include", // KERNINC, from os/rt/rt.mk
"./ChibiOS/os/common/ports/ARMCMx", // PORTINC, from os/common/ports/ARMCMx/compilers/GCC/mk/port_v?m.mk
"./ChibiOS/os/common/ports/ARMCMx/compilers/GCC", // PORTINC, from os/common/ports/ARMCMx/compilers/GCC/mk/port_v?m.mk
"./ChibiOS/os/common/ext/CMSIS/include", // STARTUPINC, from os/common/startup/ARMCMx/compilers/GCC/mk/startup_*.mk
"./ChibiOS/os/common/ext/ARM/CMSIS/Core/Include"
];

for include_dir in include_dirs.iter() {
Expand All @@ -115,8 +117,8 @@ fn main() {

#[cfg(feature="device_stm32f4xx")]
let device_include_dirs = [
"ChibiOS/os/common/startup/ARMCMx/devices/STM32F4xx", // STARTUPINC, from os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk
"ChibiOS/os/common/ext/CMSIS/ST/STM32F4xx", // STARTUPINC, from os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk
"./ChibiOS/os/common/startup/ARMCMx/devices/STM32F4xx", // STARTUPINC, from os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk
"./ChibiOS/os/common/ext/ST/STM32F4xx", // STARTUPINC, from os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk
];

#[cfg(feature="device_stm32f0xx")]
Expand Down
Loading