Support for STM32L1

* Add RCC
* Fix more issues with dash in chip names
* Update stm32-data version
* Add blinky and spi example
This commit is contained in:
Ulf Lilleengen
2021-09-21 13:42:27 +02:00
parent 14aa4265db
commit c79485c286
19 changed files with 560 additions and 12 deletions

View File

@ -9,6 +9,17 @@ fn main() {
.unwrap()
.to_ascii_lowercase();
let mut s = chip_name.split('_');
let mut chip_name: String = s.next().unwrap().to_string();
if let Some(c) = s.next() {
if !c.starts_with("CM") {
chip_name.push('-');
} else {
chip_name.push('_');
}
chip_name.push_str(c);
}
#[cfg(feature = "memory-x")]
println!("cargo:rustc-link-search=src/chips/{}/memory_x/", _chip_name);

View File

@ -218,7 +218,7 @@ pub fn gen(options: Options) {
let core_name: Option<&str> = if let Some(c) = s.next() {
if !c.starts_with("CM") {
println!("Core not detected, adding as variant");
chip_name.push_str("-");
chip_name.push('-');
chip_name.push_str(c);
None
} else {