diff --git a/embassy-stm32/build.rs b/embassy-stm32/build.rs index 7959cca03..a85d3db6e 100644 --- a/embassy-stm32/build.rs +++ b/embassy-stm32/build.rs @@ -261,7 +261,7 @@ fn main() { .max() .unwrap(); - g.extend(quote! { pub const MAX_ERASE_SIZE: u32 = #max_erase_size }); + g.extend(quote! { pub const MAX_ERASE_SIZE: usize = #max_erase_size as usize; }); g.extend(quote! { pub mod flash_regions { #flash_regions } });