Skip to content
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

Use verbose keywords in linker fragments #5

Closed
wants to merge 83 commits into from

Conversation

sirhcel
Copy link

@sirhcel sirhcel commented Jun 11, 2021

When using flip-link for stack overflow protection, it parses the linker scripts/fragments for RAM memory addresses and expects the keywords ORIGIN and LENGTH to be used in its verbose form. Allow friction-less integration of flip-link and this crate by using the verbose form.

Otherwise using flip-link would result in an error like the following:

$ cargo build
   Compiling serial-test v0.1.0 ([...])
error: linking with `flip-link` failed: exit code: 1
[...]
  = note: rust-lld: warning: address (0x8001834) of section .rodata is not a multiple of alignment (16)
          Error: MEMORY.RAM not found after scanning linker scripts


error: aborting due to previous error

error: could not compile `serial-test`

Sh3Rm4n and others added 26 commits June 6, 2021 19:49
Accessing the USARTs TDR is safe again with stm32f3 0.13.2.
As this section gets bigger, I moved it into its own README.md in
testsuite/.
Give more prominent information on wiring for test
Clean up unsafe write to USART TDR
Even after unplugging my STM32F3DISCOVERY MB1035D for several hours, I'm
getting a noise error in this test case.
…ariants

Accept different errors in send_receive_wrong_baud
When using flip-link for stack overflow protection, it parses the linker
scripts/fragments for RAM memory addresses and expects the keywords
'ORIGIN' and 'LENGTH' to be used in its verbose form. Allow
friction-less integration of flip-link and this crate by using the
verbose form.
@Sh3Rm4n Sh3Rm4n force-pushed the more-tests branch 2 times, most recently from e123b09 to 95b17fc Compare June 14, 2021 06:29
@Sh3Rm4n
Copy link
Owner

Sh3Rm4n commented Jun 14, 2021

Thanks! This is a good catch. I've just disable flip-link in my case, because it was not building correctly but haven't looked into why that was the case.

I've cleanup the more-tests branch, so this patch is difficult to just merge this way. Instead I've just cherry-picked your commit into stm32-rs#212

@Sh3Rm4n Sh3Rm4n closed this Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants