Skip to content

Add Xtensa asm!() esp32 target#65

Closed
KerryRJ wants to merge 2 commits intoesp-rs:espfrom
KerryRJ:Add-xtensa-asm!-target
Closed

Add Xtensa asm!() esp32 target#65
KerryRJ wants to merge 2 commits intoesp-rs:espfrom
KerryRJ:Add-xtensa-asm!-target

Conversation

@KerryRJ
Copy link

@KerryRJ KerryRJ commented Aug 4, 2021

Located registers in the IDF source, so this probably needs checking by someone knowledgeable in this area as I am likely missing something. I have only tested using the "xtensa-rust-quickstart" after applying a minor fix to "esp32-hal".

cargo espflash --chip esp32 --example alloc --speed 115200 --tool=cargo --features="xtensa-lx-rt/lx6,xtensa-lx/lx6,esp32-hal" COM3

Edit: Also modified the config.toml file.

@MabezDev
Copy link
Member

MabezDev commented Aug 5, 2021

Thanks! I've also been working on this locally, which I will publish soon - it has support for excluding registers on targets that don't support them (i.e no fpu on esp8266).

@KerryRJ
Copy link
Author

KerryRJ commented Aug 5, 2021

I was just thinking about the register exclusions for other targets earlier today but was unsure how to approach it. Just implemented what I was fiddling with over the last month as global_asm!() is failing with Rust 1.54. I was just busy migrating llvm_asm!() in xtensa-lx-rt.

@MabezDev
Copy link
Member

MabezDev commented Aug 5, 2021

I've just pushed my changes in #68.

I was just busy migrating llvm_asm!() in xtensa-lx-rt

How are you getting on? That's next on my list - perhaps we can work together on it.

@KerryRJ
Copy link
Author

KerryRJ commented Aug 5, 2021

I completed the changes (they'll need checking as I wasn't too sure about what to do with 2/3 of them) and was looking at migrating esp32 to use build.rs, instead of the makefile (not very cross platform), so that I could run the changes in xtensa-lx-rt through the esp32-hal examples. Do you have an idea on improving cross-platform compilation of the esp32 crate?

@KerryRJ
Copy link
Author

KerryRJ commented Aug 5, 2021

Closing in favour of #68

@KerryRJ KerryRJ closed this Aug 5, 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