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

Added Note on loading files from /target #270

Closed
wants to merge 1 commit into from

Conversation

mike2ykme
Copy link

Using Windows the relative path from the cmd prompt was not working:

C:\Program Files (x86)\GNU Arm Embedded Toolchain\9 2020-q2-update\bin\arm-none-eabi-gdb.exe: warning: Couldn't determine a path for the index cache directory.
target/thumbv7em-none-eabihf/debug/led-roulette: No such file or directory.
(gdb) target remote :3333
Remote debugging using :3333
warning: No executable has been specified and target does not support
determining executable automatically. Try using the "file" command.
0x08000c78 in ?? ()
(gdb) quit
A debugging session is active.

    Inferior 1 [Remote target] will be detached.

Quit anyway? (y or n) n
Not confirmed.
(gdb) quit
A debugging session is active.

    Inferior 1 [Remote target] will be detached.

Quit anyway? (y or n) y
Detaching from program: , Remote target
Ending remote debugging.
[Inferior 1 (Remote target) detached]


After going up a couple directories I was able to have it read the target files.


C:\Users\mike2\Documents\proging\Rust\embedded\discovery\src\05-led-roulette>cd ../..

C:\Users\mike2\Documents\proging\Rust\embedded\discovery>arm-none-eabi-gdb.exe -q target/thumbv7em-none-eabihf/debug/led-roulette
C:\Program Files (x86)\GNU Arm Embedded Toolchain\9 2020-q2-update\bin\arm-none-eabi-gdb.exe: warning: Couldn't determine a path for the index cache directory.
Reading symbols from target/thumbv7em-none-eabihf/debug/led-roulette...

Using Windows the relative path from the cmd prompt was not working:
------------------------------------------------------------------------------------------------------
C:\Program Files (x86)\GNU Arm Embedded Toolchain\9 2020-q2-update\bin\arm-none-eabi-gdb.exe: warning: Couldn't determine a path for the index cache directory.     
target/thumbv7em-none-eabihf/debug/led-roulette: No such file or directory.
(gdb) target remote :3333    
Remote debugging using :3333
warning: No executable has been specified and target does not support
determining executable automatically.  Try using the "file" command.
0x08000c78 in ?? ()
(gdb) quit
A debugging session is active.

        Inferior 1 [Remote target] will be detached.

Quit anyway? (y or n) n
Not confirmed.
(gdb) quit
A debugging session is active.

        Inferior 1 [Remote target] will be detached.

Quit anyway? (y or n) y
Detaching from program: , Remote target
Ending remote debugging.
[Inferior 1 (Remote target) detached]

------------------------------------------------------------------------------------------------------

After going up a couple directories I was able to have it read the target files.

------------------------------------------------------------------------------------------------------
C:\Users\mike2\Documents\proging\Rust\embedded\discovery\src\05-led-roulette>cd ../..

C:\Users\mike2\Documents\proging\Rust\embedded\discovery>arm-none-eabi-gdb.exe  -q target/thumbv7em-none-eabihf/debug/led-roulette
C:\Program Files (x86)\GNU Arm Embedded Toolchain\9 2020-q2-update\bin\arm-none-eabi-gdb.exe: warning: Couldn't determine a path for the index cache directory.
Reading symbols from target/thumbv7em-none-eabihf/debug/led-roulette...
------------------------------------------------------------------------------------------------------
@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @adamgreig (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-resources labels Sep 17, 2020
@arr-ee
Copy link
Contributor

arr-ee commented Mar 12, 2023

I’ve hit this issue as well, and it appears others have too: #495

I’m not sure what’s the process is for re-queueing for review, especially since there are conflicts now, but it’d be nice to see this note added.

@arr-ee
Copy link
Contributor

arr-ee commented Mar 12, 2023

@eldruin
Copy link
Member

eldruin commented Mar 27, 2023

If @mike2ykme is not around, @arr-ee could you open a new PR starting with the current state?
A note would need to be added to both the f3 and the microbit books.

@arr-ee
Copy link
Contributor

arr-ee commented Mar 27, 2023

@eldruin opened #519 that re-uses existing (and imo, better) solution. Let me know if you'd like to see a note added about why symlinks are there.

bors bot added a commit that referenced this pull request Mar 28, 2023
519: Add missing symlinks to workspace `target` dir r=eldruin a=arr-ee

Follow-up for #270

Turns out `f3discovery` version (and two last code chapters of `microbit`) already had a solution for `target` being in workspace root — who knew!

This PR creates missing ones.

Co-authored-by: Max Barnash <[email protected]>
@eldruin
Copy link
Member

eldruin commented Mar 28, 2023

@arr-ee Does the symlinks still pose a problem for windows users like OP?

@arr-ee
Copy link
Contributor

arr-ee commented Mar 28, 2023

Good call, I was not paying attention to the OP’s platform.

It does not, in fact, work on Windows due to symlinks being a breaking new feature there apparently. I’ll see if we can solve this somehow without user intervention, or open a PR with a note otherwise.

@arr-ee
Copy link
Contributor

arr-ee commented Mar 28, 2023

@eldruin opened #520 with a note, should be easier than trying to be clever about it.

@bors bors bot closed this in 14d9b6e Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-resources
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants