If I recall correctly I created a folder named C:\mnt\ with a link (junction) to D:\ named "d" inside. (If the working disk of your IDE is D:\ try to put the junction into D:\mnt\) That allowed Eclipse to parse the file structure when I was testing Nuttx on Ubuntu Bash. Does this work with Visual Studio as well? I don't know. I'm not sure if the above is correct at all, I'm currently using MSYS2, which is slower, but usable.
Johannes > -----Ursprüngliche Nachricht----- > Von: Eduard Niesner [mailto:niesneredu...@gmail.com] > Gesendet: Montag, 6. April 2020 23:33 > An: dev@nuttx.apache.org > Betreff: Re: Debugging Nuttx > > Here are the correct paths. The previous ones were a little bit confusing... > - Ubuntu Bash under Windows 10: > /mnt/d/Work/Development/Git/NuttxH7Ubuntu/Nuttx/arch/arm/src/chip/stm > 32_spi.c:635 > - Cygwin: > D:\Work\Development\Git\NuttxH7Cygwin\Nuttx\arch\arm\src/chip/stm32_sp > i.c:561 > > Edi > > On Tue, Apr 7, 2020 at 12:29 AM Eduard Niesner <niesneredu...@gmail.com> > wrote: > > > Thank you, Alexander! I will try your script in the next few days. > > > > I used objdump to generate the debug information for the libnuttx.a and > > libapps.a and this is how the paths from the debug information look like: > > > > - Ubuntu Bash under Windows 10: > > > /mnt/d/Work/Development/Git/NuttxH7Ubuntu/Nuttx/arch/arm/src/chip/stm > 32_spi.c:635 > > - Cygwin: > > > D:\Work\Development\Git\10NuttxCygwinForF7Upgrade7.26\Nuttx\arch\arm\ > src/chip/stm32_spi.c:561 > > > > Does anybody know if how I can setup Ubuntu Bash to generate the paths > > like Cygwin? > > > > > > > > On Mon, Apr 6, 2020 at 7:03 PM Alexander Oryshchenko < > > a.oryshche...@gmail.com> wrote: > > > >> Hi Eduard, > >> > >> Sure > >> > >> just go to nuttx directory and apply it: > >> git apply 0001-Replace-Linux-symlinks-with-junction-on-WSL.diff > >> > >> I do it right after clone/checkout of Nuttx source > >> > >> -Alexander > >> > >> On Mon, Apr 6, 2020 at 5:39 PM Eduard Niesner > <niesneredu...@gmail.com> > >> wrote: > >> > >>> Hi Alexander, > >>> > >>> Can you share your script and some instructions on how to use it? > >>> > >>> Thank you, > >>> Edi > >>> > >>> On Sun, Apr 5, 2020 at 11:19 PM Alexander Oryshchenko < > >>> a.oryshche...@gmail.com> wrote: > >>> > >>> > path -> patch, I lost characters sometimes :) > >>> > > >>> > вс, 5 апр. 2020 г., 23:17 Alexander Oryshchenko < > >>> a.oryshche...@gmail.com>: > >>> > > >>> > > Hi, > >>> > > > >>> > > For second your question I can little bit help you. I wrote path > >>> which > >>> > > replases "ln" command in link.sh with Windows links. Then both WLS > >>> and > >>> > > Windows understand it fine and you will not need to create directory > >>> and > >>> > > copy. But I have no idea about your first question. > >>> > > > >>> > > -Alexander > >>> > > > >>> > > вс, 5 апр. 2020 г., 23:12 Eduard Niesner <niesneredu...@gmail.com>: > >>> > > > >>> > >> Hi Alexander, > >>> > >> > >>> > >> I debug my application using Visual Studio and when I try to > >>> step-in a > >>> > >> function from Nuttx it looks for the source files in > >>> > >> C:\SysGCC\arm-eabi\mnt\d\work\NuttxH7\Nuttx\arch\arm\src\ > >>> > >> *chip\<filename>.c. *Since the "chip" folder is a simbolic link and > >>> is > >>> > not > >>> > >> accessible from Windows, Visual Studio cannot access it either. > >>> > >> > >>> > >> Since Visual Studio looks for the files in the "chip" folder, I > >>> need to > >>> > >> create it and copy the files from stm32H7 to it. This way, I am > >>> able to > >>> > >> debug my application and step in Nuttx functions as well. > >>> > >> I did not have the two issues from my initial email when I build > >>> Nuttx > >>> > >> with > >>> > >> Cygwin. I remember that the Nuttx/Apps repositories could not > >>> anywhere > >>> > on > >>> > >> my PC and also, the chip folder was always created after a > >>> successful > >>> > >> build > >>> > >> and its content was identical to the stm32H7 folder. So I did not > >>> have > >>> > to > >>> > >> do anything ... I was just doing a build and using the .a library > >>> in my > >>> > >> application and I was able to debug just fine. > >>> > >> > >>> > >> Also, I dont want to go back to Cygwin because in my experience, > >>> Cygwin > >>> > is > >>> > >> very slow compared to Ubuntu Bash. I am looking for a solution so > >>> that I > >>> > >> dont have do the two steps (copy Nuttx and Apps in the " > >>> > >> C:\SysGCC\arm-eabi\mnt\d...." and copy stm32H7 content in chip > >>> folder.) > >>> > >> > >>> > >> Thank you, > >>> > >> Edi > >>> > >> > >>> > >> On Sun, Apr 5, 2020 at 9:46 AM Alexander Oryshchenko < > >>> > >> a.oryshche...@gmail.com> wrote: > >>> > >> > >>> > >> > Hello Eduard, > >>> > >> > > >>> > >> > Regarding you second question. > >>> > >> > arch/arm/source/chip and board are symbolic links. They are > >>> accessible > >>> > >> > under WSL (but at least for me inaccessible in Windows). But why > >>> do > >>> > you > >>> > >> > need to copy something here? > >>> > >> > > >>> > >> > -Alexander > >>> > >> > > >>> > >> > On Sat, Apr 4, 2020 at 11:39 PM Eduard Niesner < > >>> > niesneredu...@gmail.com > >>> > >> > > >>> > >> > wrote: > >>> > >> > > >>> > >> > > Hi all, > >>> > >> > > > >>> > >> > > I am using the Nuttx build as a static library (*.a file) in my > >>> > >> > application > >>> > >> > > and in order to debug Nuttx I have to do some steps that I did > >>> not > >>> > >> have > >>> > >> > to > >>> > >> > > do in the past: > >>> > >> > > > >>> > >> > > 1. Copy Nuttx and Apps folders to the following directory > >>> > >> > > C:\SysGCC\arm-eabi\mnt\d\work\NuttxH7 > >>> > >> > > - I know that in the past the static library had the right > >>> > debug > >>> > >> > > symbols and was always pointing to the right file > >>> location in > >>> > my > >>> > >> > > Nuttx/Apps > >>> > >> > > folders. > >>> > >> > > - I checked the debug symbols from the nuttx static > >>> library > >>> > >> using > >>> > >> > > eabi-objdump and it seems like the paths do not point to > >>> my > >>> > >> > > Nuttx/Apps > >>> > >> > > folders anymore - now, they all point to > >>> > >> > C:\SysGCC\arm-eabi\mnt\d.... > >>> > >> > > - I recently changed from using Cygwin to Ubuntu Bash > >>> under > >>> > >> Windows > >>> > >> > > 10 because it is a lot faster than Cygwin. Can this be the > >>> > >> reason > >>> > >> > > why the > >>> > >> > > paths in the static library have changed to > >>> > >> > > C:\SysGCC\arm-eabi\mnt\d...? > >>> > >> > > - If yes, is there a option in Nuttx or in Ubuntu Bash to > >>> > >> generate > >>> > >> > > the correct paths? > >>> > >> > > 2. Copy the content from > >>> > >> > > > >>> > C:\SysGCC\arm- > eabi\mnt\d\work\NuttxH7\Nuttx\arch\arm\src\*stm32h7* > >>> > >> to > >>> > >> > > > >>> C:\SysGCC\arm-eabi\mnt\d\work\NuttxH7\Nuttx\arch\arm\src\*chip* > >>> > >> > > - I noticed that after a successful build the "chip" > >>> folder is > >>> > >> not > >>> > >> > > created anymore and instead there is a "chip" file. > >>> > >> > > - Now I have to delete the "chip" file, create a "chip" > >>> folder > >>> > >> and > >>> > >> > > copy the source files from "stm32H7" folder. > >>> > >> > > - Can this be related to the Cygwin vs Ubuntu Bash as > >>> well? > >>> > >> > > > >>> > >> > > Also, in my configuration the "Suppress Optimization" and > >>> "Generate > >>> > >> Debug > >>> > >> > > Symbols" are checked. > >>> > >> > > > >>> > >> > > Any suggestions are welcome. > >>> > >> > > > >>> > >> > > Thanks, > >>> > >> > > Edi > >>> > >> > > > >>> > >> > > >>> > >> > >>> > > > >>> > > >>> > >>