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
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -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-esp32s2-espidf]
linker = "ldproxy"
runner = "espflash --monitor"
rustflags = ["-C", "default-linker-libraries", "--cfg", "espidf_time32"]
rustflags = ["--cfg", "espidf_time32"]

[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.

linker = "ldproxy"
runner = "espflash --monitor"
rustflags = ["-C", "default-linker-libraries", "--cfg", "espidf_time32"]

rustflags = ["--cfg", "espidf_time32"]

[env]
CARGO_WORKSPACE_DIR = { value = "", relative = true }
Expand Down
20 changes: 0 additions & 20 deletions micro-rdk-server/.cargo/config.toml

This file was deleted.

19 changes: 0 additions & 19 deletions micro-rdk/.cargo/config.toml

This file was deleted.

15 changes: 3 additions & 12 deletions templates/project/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,21 @@
{% if mcu != "esp32" %}#{% endif %}target = "xtensa-esp32-espidf"
{% if mcu != "esp32s2" %}#{% endif %}target = "xtensa-esp32s2-espidf"
{% if mcu != "esp32s3" %}#{% endif %}target = "xtensa-esp32s3-espidf"
{% if mcu != "esp32c3" %}#{% endif %}target = "riscv32imc-esp-espidf"

[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-esp32s2-espidf]
linker = "ldproxy"
runner = "espflash --monitor"
rustflags = ["--cfg", "espidf_time32"]

[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

linker = "ldproxy"
runner = "espflash --monitor"

# Future - necessary for the experimental "native build" of esp-idf-sys with ESP32C3
# See also https://github.com/ivmarkov/embuild/issues/16 [build]

rustflags = ["-C", "default-linker-libraries", "--cfg", "espidf_time32"]
rustflags = ["--cfg", "espidf_time32"]

[unstable]

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