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

[RSDK-9855] Repair project template cargo config and remove cruft #401

Merged

Conversation

acmorrow
Copy link
Member

I'll leave some comments to help clarify these changes.

@acmorrow acmorrow requested a review from a team as a code owner January 29, 2025 16:51
@@ -1,24 +1,17 @@
[target.xtensa-esp32-espidf]
linker = "ldproxy"
runner = "espflash --monitor"
rustflags = ["-C", "default-linker-libraries", "-Clink-args=-Wl,-Map=./esp-build.map", "--cfg", "espidf_time32"]

rustflags = ["--cfg", "espidf_time32"]
Copy link
Member Author

Choose a reason for hiding this comment

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

"-C", "default-linker-libraries" was never intended for application on xtensa targets, it was only to work around esp-rs/embuild#16 on riscv, which we don't currently support. If and when we do support it, the upstream issue may be resolved and we won't need it.

Also, the esp-build.map thing doesn't seem to get produced, at least for me. I'm going to double check that in a few different environments before committing to removing it, but if I can't get the file to be emitted I don't think we should have the flag.

Copy link
Member

Choose a reason for hiding this comment

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

doesn't get produced for me either


[target.xtensa-esp32s3-espidf]
linker = "ldproxy"
runner = "espflash --monitor"
rustflags = ["-C", "default-linker-libraries", "--cfg", "espidf_time32"]

[target.riscv32imc-esp-espidf]
Copy link
Member Author

Choose a reason for hiding this comment

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

We don't support riscv right now, so it doesn't make sense to me to carry around the block for configuring it.

@@ -1,20 +0,0 @@
[target.xtensa-esp32-espidf]
Copy link
Member Author

Choose a reason for hiding this comment

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

I removed this file because as far as I know, cargo doesn't consult .cargo/config.toml files from subdirectories of a workspace.

@@ -1,19 +0,0 @@
[target.xtensa-esp32-espidf]
Copy link
Member Author

Choose a reason for hiding this comment

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

Same as above removal.


[target.xtensa-esp32-espidf]
linker = "ldproxy"
runner = "espflash --monitor"
rustflags = ["--cfg", "espidf_time32"]
Copy link
Member Author

Choose a reason for hiding this comment

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

This espidf_time32 thing was needed on all platforms as long as we are on ESP-IDF 4, but in this file it was only being applied for the riscv target. It should be applied everywhere.


[target.xtensa-esp32s3-espidf]
linker = "ldproxy"
runner = "espflash --monitor"

[target.riscv32imc-esp-espidf]
Copy link
Member Author

Choose a reason for hiding this comment

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

Removed because we don't support this target

build-std = ["std", "panic_abort"]
#build-std-features = ["panic_immediate_abort"] # Required for older ESP-IDF versions without a realpath implementation
Copy link
Member Author

Choose a reason for hiding this comment

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

Stale

Copy link
Member

@mattjperez mattjperez left a comment

Choose a reason for hiding this comment

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

LGTM

@acmorrow acmorrow merged commit a0443bd into viamrobotics:main Jan 29, 2025
6 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