stm32-rs / stm32f7xx-hal

A Rust embedded-hal HAL for all MCUs in the STM32 F7 family
Apache License 2.0
117 stars 68 forks source link

Create generation memory.x for different mcu's in family #58

Closed no111u3 closed 4 years ago

no111u3 commented 4 years ago

Than I tried build example for stm32fdisco-scree I got some interested message of compilation:

   Compiling stm32f7xx-hal v0.2.0 (/Users/nis/Develop/stm32f7xx-hal)
error: linking with `rust-lld` failed: exit code: 1
  |
  <skipped by unnecessary> 
  = note: rust-lld: error: section '.bss' will not fit in region 'RAM': overflowed by 130048 bytes
          rust-lld: error: section '.bss' will not fit in region 'RAM': overflowed by 130049 bytes
          rust-lld: error: section '.bss' will not fit in region 'RAM': overflowed by 130050 bytes
          rust-lld: error: section '.bss' will not fit in region 'RAM': overflowed by 130052 bytes
          rust-lld: error: section '.uninit' will not fit in region 'RAM': overflowed by 130052 bytes
          rust-lld: error: section '.uninit' will not fit in region 'RAM': overflowed by 130052 bytes
          rust-lld: error: section '.uninit' will not fit in region 'RAM': overflowed by 130052 bytes

error: aborting due to previous error

error: could not compile `stm32f7xx-hal`.

I think we need to use generation for memory.x

hannobraun commented 4 years ago

There are multiple ways to do this, but here's some example code that could be copied from: https://github.com/lpc-rs/lpc8xx-hal/blob/59b2a9d996570ad1869e172f8d4fed67958ce4c3/build.rs#L42-L63

no111u3 commented 4 years ago

There are multiple ways to do this, but here's some example code that could be copied from: https://github.com/lpc-rs/lpc8xx-hal/blob/59b2a9d996570ad1869e172f8d4fed67958ce4c3/build.rs#L42-L63

Yes, sure. I talked about this solution - so If anybody hasn't concerns to this solution I can create PR for tests.

mvertescher commented 4 years ago

Yeah, this is a great idea. Adopting the lpc8xx-hal implementation sounds good to me.

no111u3 commented 4 years ago

@mvertescher @hannobraun I think this issue can be close by success resolve.