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

Can you replicate the examples on Windows? #8

Closed
japaric opened this Issue Aug 2, 2018 · 5 comments

Comments

Projects
None yet
3 participants
@japaric
Copy link
Member

japaric commented Aug 2, 2018

Let us know if you had to significantly deviate from the instructions! (Other than using different built-in commands if you were using cmd instead of bash).

@japaric japaric added this to the RC1 milestone Aug 2, 2018

@japaric japaric added Blocks Rust 2018 and removed blocked labels Aug 2, 2018

@japaric japaric self-assigned this Aug 7, 2018

@nateglims

This comment has been minimized.

Copy link

nateglims commented Sep 5, 2018

I have an issue with the windows version of Qemu 3.0.0 but in an Ubuntu VM I could run the exact same binary fine with Qemu 2.5.0. I haven't tried that version on windows yet.

After forwarding the gdb port on the VM back to windows, I could get arm-none-eabi-gdb to work but had issues with the windows version of LLDB.

@LokiFaun

This comment has been minimized.

Copy link

LokiFaun commented Sep 13, 2018

All the tools work with the exception of debugging as mentioned above.
LLDB Version used and output when trying to connect to Qemu:

λ lldb --version
lldb version 6.0.1 
λ lldb target\thumbv7m-none-eabi\debug\app
(lldb) target create "target\\thumbv7m-none-eabi\\debug\\app"
Current executable set to 'target\thumbv7m-none-eabi\debug\app' (arm).
(lldb) gdb-remote 3333
 Process 1 stopped
* thread #1, stop reason = signal SIGTRAP
    frame #0: 0xffffffffffffffff
(lldb)

Qemu used:

λ qemu-system-arm --version                                            
QEMU emulator version 3.0.0 (v3.0.0-11723-ge2ddcc5879-dirty)           
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

Using arm-eabi-gdb downloaded from here: http://gnutoolchains.com/arm-eabi/ debugging is working as shown in the examples.
arm-eabi-gdb output:

λ arm-eabi-gdb.exe target\thumbv7m-none-eabi\debug\app                       
GNU gdb (GDB) 8.0.1                                                          
Copyright (C) 2017 Free Software Foundation, Inc.                            
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.           
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"   
and "show warranty" for details.                                             
This GDB was configured as "--host=i686-w64-mingw32 --target=arm-eabi".      
Type "show configuration" for configuration details.                         
For bug reporting instructions, please see:                                  
<http://www.gnu.org/software/gdb/bugs/>.                                     
Find the GDB manual and other documentation resources online at:             
<http://www.gnu.org/software/gdb/documentation/>.                            
For help, type "help".                                                       
Type "apropos word" to search for commands related to "word"...              
Reading symbols from target\thumbv7m-none-eabi\debug\app...done.             
(gdb) target remote localhost:3333                                           
Remote debugging using localhost:3333                                        
Reset () at D:\rust\embedded\rt\src\lib.rs:12                                
12      pub unsafe extern "C" fn Reset() -> ! {                              
(gdb) b DefaultExceptionHandler                                              
Breakpoint 1 at 0xda: file D:\rust\embedded\rt\src\lib.rs, line 76.          
(gdb) continue                                                               
Continuing.                                                                  
                                                                             
Breakpoint 1, DefaultExceptionHandler () at D:\rust\embedded\rt\src\lib.rs:76
76          loop {}                                                          
(gdb)                                                                        
@japaric

This comment has been minimized.

Copy link
Member Author

japaric commented Sep 14, 2018

@nateglims @LokiFaun Thanks a lot for testing this!

Since you (and some macOS users) are having issues with LLDB I'll change the text to recommend and use GDB.

Also, could you tell me from where you installed qemu-system-arm? I'd like to add a small setup section similar to this one but for Windows.

@nateglims

This comment has been minimized.

Copy link

nateglims commented Sep 14, 2018

This package includes QEMU and qemu-system-arm I found it because it was linked from the qemu website

japaric added a commit that referenced this issue Sep 14, 2018

LLDB -> GDB; +setup instructions for Windows and mac; -cargo-edit
this commit:

- changes the debugger to GDB since Windows and macOS users reported errors with
LLDB

- adds setup instructions for Windows and macOS

- drops the cargo-edit dependency since it's used only once and lets us simplify
  the setup instructions

- adds a note regarding .cargo/config being required in section 3 since some
  people missed it while reading section 2

- removes a note about llvm-objdump not working correctly since the problem was
  fixed in cargo-binutils v0.1.4

closes #8
closes #7
@LokiFaun

This comment has been minimized.

Copy link

LokiFaun commented Sep 15, 2018

I installed from the same link @nateglims mentioned.

@japaric japaric closed this in #20 Sep 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.