-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find linker script memory.x #19
Comments
Some HAL crates provide a memory.x file (the nrf HALs do) but some don't. I think most HAL crates don't consistently document whether they provide a memory.x or not (the nrf HALs don't document that they provide a memory.x; the stm32f1xx-hal does document that a memory.x file is required). In terms of this template documentation, we should mention that when using a HAL additional steps maybe required, like writing a memory.x file, and that the HAL documentation should be checked. We could also write a troubleshooting section and mention that "memory.x not found" is a common error and how to fix it (write a memory.x file). Semi-orthogonal to this, it may be possible to generate the memory.x file using probe-rs and the |
👍 I made a PR on the readme ⬆️ Regarding alternative methods - assuming a HAL has a memory.x, maybe it would be possible to use it "in place", without copying it into the project? I was thinking similar to how Cargo looks in several places for config.toml (https://doc.rust-lang.org/cargo/reference/config.html) Edit: there is an open issue about ways to handle this in Cargo: rust-lang/cargo#7984 |
Hi! I'm trying out this template on a Bluepill board with STM32F103C8 and
stm32f1xx-hal
. After following the setup steps (and working around #18) I get a linker error about missingmemory.x
when runningcargo rb hello
.Copying
memory.x
from the HAL's repository into the root of the project as suggested by their readme solves the problem.https://github.com/stm32-rs/stm32f1xx-hal/blob/master/memory.x
Is this expected to be part of step 5 ("5. Import your HAL")? I could make a PR on the readme but I'm not sure if this works differently for other HAL's?
The text was updated successfully, but these errors were encountered: