This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: TMDXIDK5728
Tool/software: Linux
Support,
I am working with the AM5728 IDK; I am running Linux directly on the board with the SD Card u-boot. I am using the SDK release from mid-December, v5.2.00.10.
I am trying to use "make menuconfig" and I get the following:
make: *** No rule to make target 'menuconfig'. Stop.
I haven't found any recent, related, or relevant help topics / links for U-boot debugging on the AM5728.
I simply don't have a grasp on the file structure within the SD card. From the root directory, the only things I see are a .log file, ipc-example, and ipc-starter; which I created when implementing the IPC examples. When I use the "cat" command with directory links, there are other files and directories that show up. Where do I access this? Or where can I learn more about how to access these "hidden" folders?
On a most basic level, where does one get started with learning about debugging the Linux SDK? There's so much information for the AM335x and Beaglebone, but nothing for Sitara AM5728, as far as I can tell. While a lot of the information is target agnostic, a lot of it also is target specific.
There should be a separate Linux U-Boot section, as this is one method of development available to the user. The SD Card Boot method is promoted as the fastest and best "out of the box" method to begin debugging. If there aren't instructions on how to get started, how does the new user begin? Also to assume that all developers using Linux on the ARM core are running Linux OS on their host computer is inaccurate. You can see where my frustration is coming from; I am developing in Windows using Linux on the IDK. This is clearly possible, but the explanation of methods for development using this route are non-existent. I have access to a Linux laptop but my primary workstation is a Windows laptop; so if I can debug simply on the board, this makes my life a lot easier. Any assistance you can provide would be helpful.
Additionally, I am watching the following TI Training series:
Thank you in advance.
Alec
Hello Alec,
Alec Phillips said:make: *** No rule to make target 'menuconfig'. Stop.
Alec Phillips said:Or where can I learn more about how to access these "hidden" folders?
Alec Phillips said:The SD Card Boot method is promoted as the fastest and best "out of the box" method to begin debugging. If there aren't instructions on how to get started, how does the new user begin?
Hi Alec,
Can you give a general description of what you're trying to develop and debug? The process can look quite a bit different depending on whether you're talking u-boot, kernel, Linux user space, graphical application, etc.
Alec Phillips said:Also to assume that all developers using Linux on the ARM core are running Linux OS on their host computer is inaccurate.
You can open tera term or putty from your Windows PC and log into a console. You can also use CCS from Windows or Linux. However, to build u-boot, kernel, file system, etc. you need a Linux host PC. That's more of a requirement than an assumption.
Alec Phillips said:I am developing in Windows using Linux on the IDK.
My main PC is a Windows PC too. I usually have a Tera Term window for my target console as well as a putty window where I SSH into my Linux PC. You might want to consider exporting an NFS or samba share from your Linux PC and then mounting it from the ARM. That allows you to easily build programs from your Linux box (e.g. putty console) and then run them from the ARM (e.g. Tera Term).
Normally I use JTAG debug for u-boot and printf for just about everything else. For heavy duty app development you may want to consider gdb as well.
Alec Phillips said:I have access to a Linux laptop but my primary workstation is a Windows laptop; so if I can debug simply on the board, this makes my life a lot easier.
To some degree it depends on your expectations for debug. If it is console prints, then yes, you can absolutely do that directly on the board.
I'm sure I didn't fully answer your question in my reply. My intent is mostly to get the conversation moving in a productive direction.
Best regards,
Brad
Hi Brad,
Thanks for the reply. I will answer your questions as best I can.
Brad Griffis said:Can you give a general description of what you're trying to develop and debug? The process can look quite a bit different depending on whether you're talking u-boot, kernel, Linux user space, graphical application, etc.
I am trying to develop a Controller for a Power Plant. We have various communication protocols, CAN, TCP/IP, etc. We are using the DSP on the Sitara for our control loops, and the ARM for other processes, such as the Human-Machine Interface, and other, less process-intensive, controls. I have very little experience using Linux, but I understand the Linux kernel on the ARM core is the preferred/best method for development.
Brad Griffis said:You can open tera term or putty from your Windows PC and log into a console. You can also use CCS from Windows or Linux. However, to build u-boot, kernel, file system, etc. you need a Linux host PC. That's more of a requirement than an assumption.
This is what I am currently doing to access the board through the root login. It is confusing for me in the TI material, whether the Linux instructions are for inside the Linux OS, or for root debugging.
Brad Griffis said:My main PC is a Windows PC too. I usually have a Tera Term window for my target console as well as a putty window where I SSH into my Linux PC. You might want to consider exporting an NFS or samba share from your Linux PC and then mounting it from the ARM. That allows you to easily build programs from your Linux box (e.g. putty console) and then run them from the ARM (e.g. Tera Term).
Normally I use JTAG debug for u-boot and printf for just about everything else. For heavy duty app development you may want to consider gdb as well.
I'm not sure about exporting the NFS or samba share, but it seems like what I'm trying to do. Can you provide more details on this please?
Brad Griffis said:To some degree it depends on your expectations for debug. If it is console prints, then yes, you can absolutely do that directly on the board.
I'm sure I didn't fully answer your question in my reply. My intent is mostly to get the conversation moving in a productive direction.
I guess my expectations are similar to CCS, because that's what I have experience using. But I am noticing a lot of the intricacies of the console debugging, and am interested in learning more about it. Am I able to develop programs in the root? I am guessing no, and that the root is used to check that all is working properly within the board. Please correct me.
I greatly appreciate the response; this is exactly what I need to help me move forward. Thank you again, Brad.
Regards,
Alec Phillips
Alec Phillips said:We have various communication protocols, CAN, TCP/IP, etc. We are using the DSP on the Sitara for our control loops, and the ARM for other processes, such as the Human-Machine Interface, and other, less process-intensive, controls. I have very little experience using Linux, but I understand the Linux kernel on the ARM core is the preferred/best method for development.
HMI is better-suited to the ARM. There are rich graphical frameworks/utilities available (Qt, Chrome, etc.).
Alec Phillips said:I'm not sure about exporting the NFS or samba share, but it seems like what I'm trying to do. Can you provide more details on this please?
First, you should make sure anything you're doing with respect to network shares complies with your IT requirements, regulations, etc.
Personally, I like using Samba shares because they are visible everywhere (Windows, Linux Host, Embedded Linux Target). If you're not dealing with super sensitive stuff (for starters), you can just use a simple "guest" share. This is open access to anyone on your network, so this is likely not the best solution for all cases, but it's certainly the easiest solution to get started. There are lots of tutorials on the creation of shared folders, so I'm going to leave that as a separate item for you to get started. Once you have a shared folder you can mount that drive from the Linux target with a command along these lines:
mkdir -p /mnt/samba
mount -t cifs -o guest,vers=3.0 //<machine>/<dir> /mnt/samba
Alec Phillips said:It is confusing for me in the TI material, whether the Linux instructions are for inside the Linux OS, or for root debugging.
Any materials pertaining to building code are from the Host PC perspective. We don't generally build anything from the target. When we execute the programs, that's done from the target.
Alec Phillips said:I guess my expectations are similar to CCS, because that's what I have experience using.
In order to have IDE debug you would likely need to transition entirely to your Linux PC for development. You would then configure CCS for gdb debug (i.e. via Ethernet not JTAG). There are some more details here:
Alec Phillips said:Am I able to develop programs in the root?
The examples provided with the SDK are generally run from a "root" login. For your initial development you will likely want to keep it that way.
Hi Brad,
Thank you for the reply.
Brad Griffis said:First, you should make sure anything you're doing with respect to network shares complies with your IT requirements, regulations, etc.
Personally, I like using Samba shares because they are visible everywhere (Windows, Linux Host, Embedded Linux Target). If you're not dealing with super sensitive stuff (for starters), you can just use a simple "guest" share. This is open access to anyone on your network, so this is likely not the best solution for all cases, but it's certainly the easiest solution to get started. There are lots of tutorials on the creation of shared folders, so I'm going to leave that as a separate item for you to get started. Once you have a shared folder you can mount that drive from the Linux target with a command along these lines:
mkdir -p /mnt/samba
mount -t cifs -o guest,vers=3.0 //<machine>/<dir> /mnt/samba
I am not sure if this will go over. So as an alternative to this networked method, what would you suggest? Rewriting onto the SD card with each change I make?
Brad Griffis said:Alec PhillipsIt is confusing for me in the TI material, whether the Linux instructions are for inside the Linux OS, or for root debugging.Any materials pertaining to building code are from the Host PC perspective. We don't generally build anything from the target. When we execute the programs, that's done from the target.
Alec PhillipsI guess my expectations are similar to CCS, because that's what I have experience using.In order to have IDE debug you would likely need to transition entirely to your Linux PC for development. You would then configure CCS for gdb debug (i.e. via Ethernet not JTAG). There are some more details here:
Thank you for clarifying these items for me. Why can't I use the JTAG to USB XDS100v2 for debugging in Linux? Linux CCS can only be debugged via Ethernet? I am pretty sure I was able to run an example program through the JTAG interface and had gotten minicom console output.
Thank you for the link. It seems as though I will need to fully transition to Linux for the development environment, rather than bounce around between Windows and Linux laptops.
Brad Griffis said:Alec PhillipsAm I able to develop programs in the root?The examples provided with the SDK are generally run from a "root" login. For your initial development you will likely want to keep it that way.
I meant developing programs like adding my own C code to a source file or header. I am guessing this is not possible within the u-boot/root environment, but am looking for a confirmation if this is accurate.
Thanks again,
Alec Phillips
Alec Phillips said:mkdir -p /mnt/samba
mount -t cifs -o guest,vers=3.0 //<machine>/<dir> /mnt/samba
I am not sure if this will go over. So as an alternative to this networked method, what would you suggest? Rewriting onto the SD card with each change I make?
Rewriting the SD card becomes a bottleneck if you're making frequent changes. There are other ways that might be more acceptable from an IT perspective.
On a related note, your Linux PC should be able to find your EVM using its mDNS name (am57xx-evm.local). In other words, you should be able to run "ping am57xx-evm.local" to ping your board. Taking that one step further you can use "scp" (secure copy) for copying a file from your Linux PC to your target. For example:
scp my_compiled_program root@am57xx-evm.local:/home/root
Alec Phillips said:Why can't I use the JTAG to USB XDS100v2 for debugging in Linux? Linux CCS can only be debugged via Ethernet? I am pretty sure I was able to run an example program through the JTAG interface and had gotten minicom console output.
You can only load/debug fully linked executables with CCS. Linux programs are dynamically linked at run-time, e.g. you don't know at what address they will physically reside. Also, JTAG debug is highly invasive in that it stops the entire CPU while you are stepping through code. Often in Linux you want everything else to keep executing while you are stepping through a single thread. So to do that you use gdb.
Alec Phillips said:Thank you for the link. It seems as though I will need to fully transition to Linux for the development environment, rather than bounce around between Windows and Linux laptops.
If you're doing full time development on this project I recommend it. Make sure your host PC is configured with 64-bit Linux as we use 64-bit toolchains. Ubuntu 18.04 64-bit would be a good choice (or even 16.04).
Alec Phillips said:I meant developing programs like adding my own C code to a source file or header. I am guessing this is not possible within the u-boot/root environment, but am looking for a confirmation if this is accurate.
I'm sorry, but I am not following. I think I'm even more confused now that you've mentioned u-boot as well. I assumed you were talking about embedded Linux applications that run on the AM572x.
Brad Griffis said:If you're doing full time development on this project I recommend it. Make sure your host PC is configured with 64-bit Linux as we use 64-bit toolchains. Ubuntu 18.04 64-bit would be a good choice (or even 16.04).
I am using Ubuntu 16.04 on the Linux laptop.
Brad Griffis said:Alec PhillipsI meant developing programs like adding my own C code to a source file or header. I am guessing this is not possible within the u-boot/root environment, but am looking for a confirmation if this is accurate.I'm sorry, but I am not following. I think I'm even more confused now that you've mentioned u-boot as well. I assumed you were talking about embedded Linux applications that run on the AM572x.
Booting from the SD card is called "U-boot", right? Maybe I'm causing the confusion due to inaccuracies in my knowledge of each term...
In CCS, I am able to change code, build, and test in the IDE. Can I modify/add the source files or headers within the "root" dev environment, or is this the added benefit of using CCS in the first place?
Thank you again,
Alec
Alec Phillips said:Booting from the SD card is called "U-boot", right? Maybe I'm causing the confusion due to inaccuracies in my knowledge of each term...
No, u-boot is the name of the open source bootloader that is used to boot the kernel. In fact, when you build u-boot, you end up with two different versions of it:
Alec Phillips said:In CCS, I am able to change code, build, and test in the IDE. Can I modify/add the source files or headers within the "root" dev environment, or is this the added benefit of using CCS in the first place?
What you're describing is certainly the norm in the RTOS world, though not nearly as common or easy in the Linux environment. Most projects tend to be makefile based. You can setup a "makefile project" in CCS where clicking the build button equates to running "make" from the command line. You still need some way of being able to "push" your updated code to the target (could be scp command or RSE which was discussed on the wiki) and you need to be able to launch gdbserver on the target.
I'm not an expert in using gdb for debugging applications. I spend a lot more side doing kernel debug than application debug. If you have specific issues or questions in getting that operational then I recommend starting a new thread.
Best regards,
Brad
When typing the paths use the "tab" key to auto-complete the paths. It will properly escape spaces, etc. when doing so.
In my opinion there's no need to back up any of the files. When you install the SDK the u-boot and linux directories are fully functioning git repositories. I would recommend that you simply start a new branch before doing any development. Navigate to the linux directory. Type "git status" to make sure that you have a clean branch (hopefully that's still the case). Then do "git branch -b my_development" (or whatever you want to call your branch). I recommend committing changes as you go. You can then always switch back to the original branch later, or diff against the original.
Hello Alec,
Brad is right. You can always use git to track you changes instead of making a defconfig backup. Please, also do not forget to mark the answers which helped you by clicking on "This resolved my issue" button.
Best regards,
Kemal