Skip to content

Conversation

@dcz-self
Copy link
Contributor

Uses inline assemly instead of a precompiled binary.

The LED is blinking next to me, so I'm almost sure I'm not imagining it.

I used the suggestion to define symbol tables in Rust from #55 (comment)

Original MR #55 . I skipped proper attribution because I'm tired, so let me know if I should attribute you as the commit author @rmsyn .

Tested using the sleep binary in https://codeberg.org/dcz/busbang/src/branch/intr/bb-longan . Yes, it's a mess. I will clean up if anyone actually wants to test.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, but it still works with PAC 0.4.0.
This is the 0.5.0 upgrade: #72
and I'd like for this to come in first: riscv-rust/gd32vf103-pac#13 so I don't have to update the same code multiple times.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I remember, storing multiple files with the same name to different output directories leads to a situation when linker chooses a random one, so it works as expected only with a bit of luck. I would not rely on it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PAC 0.4.0 doesn't have device.x at all.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see. Update to 0.5.0 should fix the issue then.

Copy link
Contributor Author

@dcz-self dcz-self Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, there's no issue with this MR. It can be merged now, and later we can upgrade to pac 0.5.0 and remove the unnecessary linker script.

@dcz-self dcz-self mentioned this pull request Sep 26, 2025
@dcz-self dcz-self merged commit 12a3108 into riscv-rust:master Oct 23, 2025
4 checks passed
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