Add library with Rust bindings to target_f1 code (#68)
* Move flipper-core into a workspace * Fix target build rules * Add flipper-f1-sys library * Add flipper-f1-sys dependency to flipper-core * Remove apparently useless includes * Build and export HAL statics * Disable Rust dependency detection for target_f1 build * Install libclang-10-dev in docker * Build Rust libs every time * remove duplicate sources from make * clean build different example * wip add example fn * Implement rust_uart_write() * fix rebuild instructions for target_f1 Co-authored-by: aanper <mail@s3f.ru>
This commit is contained in:
20
core-rs/flipper-f1-sys/src/lib.rs
Normal file
20
core-rs/flipper-f1-sys/src/lib.rs
Normal file
@@ -0,0 +1,20 @@
|
||||
#![no_std]
|
||||
|
||||
#![allow(dead_code)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
|
||||
pub mod cmsis_os {
|
||||
#[allow(non_camel_case_types)]
|
||||
pub use core::ffi::c_void;
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
pub type c_char = i8;
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/cmsis_os_bindings.rs"));
|
||||
}
|
||||
|
||||
pub mod hal {
|
||||
include!(concat!(env!("OUT_DIR"), "/stm32_hal_bindings.rs"));
|
||||
include!(concat!(env!("OUT_DIR"), "/stm32_hal_statics.rs"));
|
||||
}
|
Reference in New Issue
Block a user