pub fn generate_modules<P: AsRef<Path>>(
    loadstone_path: P,
    configuration: &Configuration,
) -> Result<()> {
    let autogenerated_folder_path = loadstone_path.as_ref().join(
        format!("src/ports/{}/autogenerated", configuration.port)
    );
    fs::create_dir(&autogenerated_folder_path).ok();
    generate_linker_script(&configuration)?;
    generate_top_level_module(&autogenerated_folder_path, configuration)?;

    if std::env::var("CARGO_FEATURE_ECDSA_VERIFY").is_ok() {
        generate_key(loadstone_path, configuration)?;
    }
    memory_map::generate(
        &autogenerated_folder_path,
        &configuration.memory_configuration,
        &configuration.port,
    )?;
    pins::generate(&autogenerated_folder_path, &configuration)?;
    devices::generate(&autogenerated_folder_path, &configuration)?;
    Ok(())
}
/// Transforms a `Configuration` struct into a set of source code files
/// that will be compiled into `Loadstone`. The resulting source is written
/// to src/ports/<port>/autogenerated.
Transforms a `Configuration` struct into a set of source code files
that will be compiled into `Loadstone`. The resulting source is written
to src/ports//autogenerated.
Transforms a ` Configuration ` struct into a set of source code files that will be compiled into ` Loadstone ` . The resulting source is written to src / ports // autogenerated .
pub fn generate_modules<P: AsRef<Path>>(
    loadstone_path: P,
    configuration: &Configuration,
) -> Result<()> {
    let autogenerated_folder_path = loadstone_path.as_ref().join(
        format!("src/ports/{}/autogenerated", configuration.port)
    );
    fs::create_dir(&autogenerated_folder_path).ok();
    generate_linker_script(&configuration)?;
    generate_top_level_module(&autogenerated_folder_path, configuration)?;
    if std::env::var("CARGO_FEATURE_ECDSA_VERIFY").is_ok() {
        generate_key(loadstone_path, configuration)?;
    }
    memory_map::generate(
        &autogenerated_folder_path,
        &configuration.memory_configuration,
        &configuration.port,
    )?;
    pins::generate(&autogenerated_folder_path, &configuration)?;
    devices::generate(&autogenerated_folder_path, &configuration)?;
    Ok(())
}
pub fn generate_modules < P : AsRef < Path > > ( loadstone_path : P , configuration : & Configuration , ) -> Result < ( ) > { let autogenerated_folder_path = loadstone_path . as_ref ( ) . join ( format ! ( " " configuration port ) ) ; fs :: create_dir ( & autogenerated_folder_path ) . ok ( ) ; generate_linker_script ( & configuration ) ? ; generate_top_level_module ( & autogenerated_folder_path , configuration ) ? ; if std :: env :: var ( " " ) . is_ok ( ) { generate_key ( loadstone_path , configuration ) ? ; } memory_map :: generate ( & autogenerated_folder_path , & configuration . memory_configuration , & configuration . port , ) ? ; pins :: generate ( & autogenerated_folder_path , & configuration ) ? ; devices :: generate ( & autogenerated_folder_path , & configuration ) ? ; Ok ( ( ) ) }
Transforms a `Configuration` struct into a set of source code files
that will be compiled into `Loadstone`.
Transforms a ` Configuration ` struct into a set of source code files that will be compiled into ` Loadstone ` .
loadstone_path
P
configuration
&Configuration
loadstone_path
P
configuration
&Configuration