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.

PRU: How to debug?

Equipment: BBB, CCSv6, TI XDSv2 USB Emulator,
                   compiler for PRU is TIv2.0.0B2

Hi,

I am trying to learn how to use the PRU c-compiler and how to debug a programme for the PRU with CCSv6.
The am335x_pru_package contains a document named "04-CCS_PRU_Debugger-training.pdf" which provides some information how to do that with CCSv5. Now that my version is CCSv6 I would have expected that this should be ok.

So I created an empty PRU project (Empty project (with main.c) for BeagleBone_Black and TI XDSv2 USB Emulator with default settings. By default there are no initialization scripts for neither PRU_0 nor PRU_1.
At Project properties->General I left "Manage the project's target-configuration automatically" checked, which is the default setting.

I have come to the point where CCS connects to the CortexA8 which is still ok.
Then AM335x_15x15_EVM.gel and AM335x_PRU_ICSS.gel shall be loaded. They don't show up in the GEL Box, but beagleboneblack.gel is there with the status 'Success'.
After that the script PRU_ICSS_INIT shall be run, but it isn't there.
So I run the script
Scripts->AM335x System Initialisation->AM335x_BeagleBlack_Initialization instead .

Connection to PRU_0 then results in the following message:
Error connecting to the target:
(Error -1170 @ 0x4A322000)
Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the
board, and/or try more reliable JTAG settings (e.g. lower TCLK).
(Emulation package 5.1.507.0)

Does anybody know the right procedure?

Some other questions would be:
- Is it meanwhile possible to create the code .bin file for the PRU with CCSv6?
- Can I create a project that contains the code for CortexA8 and the PRU_0/PRU_1? Or do I have to create one project for each processor and hence would have to test each project separately?

All hints are appreciated!
Thank you.

Martin

  • Martin,

    I am not familiar with this training document, but the script mentioned in the document was included by default only after CCSv6 was released. In this case, you can install the updated device support package from the update site according to the instructions shown at the top of the page below:

    http://processors.wiki.ti.com/index.php/Device_support_files

    I wonder if the document is based on a previous step where the GEL file is manually added to the configuration.

    Hope this helps,

    Rafael

  • Hi Rafael,

    thank you for replying.

    That looks very promissing.
    Unfortunately I get a 'File not found' when I try to download the Device Support File for Sitara and the Shared Support
    Package. Also adding the (unzipped) 'File:Bookmarks device support.zip' to the update online server did not provide any new
    updates.
    I will try again tomorrow to see if the file is available.

    I made some progress connecting the PRUs:
    AM335x_PRU_ICSS.gel comes with the am335x_pru_package mentioned earlier. Running it after A8 has connected creates the menu
    Scripts-->PRU_ICSS (in CCSv6) with several commands to start the PRUs. beagleboneblack.gel does not start them.
    So AM335x_PRU_ICSS.gel shows how to start and halt the PRUs later on in the final programme.


    Thank you.

    Martin

  • Martin,

    Thanks for pointing that out. I fixed the paths of the individual files on the page.

    Regarding the update site, I find strange you are not getting any updates. If you run the menu Help --> Check for Updates you should see something similar to what is shown below:

    Just for reference, the Sitara device support installed with CCSv6.0.1 (the latest CCS release) is 1.1.7, therefore the newer package should have been detected.

    Just to confirm, what release of this package do you have installed? Check it under menu Help --> About CCS --> Installation details

    Regards,

    Rafael

     

  • Rafael,

    the CCSv6 version I use is .6.0.0.00190.
    I regularly click at the update button and thought I would be up-to-date.
    Will I need to install CCSv6 6.0.1?
    Sitara Device Support is version 1.1.7 and Shared Device Support is version 1.0.7.

    Download of the support files is ok now.
    I then unpacked sitara_device_support_1.1.9.zip and shared_device_support_1.0.7.zip to
    <CCS_INSTALL_DIR>/ccsv6/ccs_base and started CCSv6 with the -clean parameter.
    'Check for Updates' detected Device Support. 'Sitara Device Support' now is version 1.1.9
    No other updates so far.

    Starting the PRUs still is possible. Also loading and stepping through the assembler can be done.

    What I could not find out so far is how a project is created with CCSv6  that contains code for the A8 and a
    PRU. I mean how would I tell CCSv6 to use different compilers for each part of the code. Is there
    some information in the .out file that tells the loader to load one part to the A8 and the other
    one to PRU0 or PRU1?

    I hope somebody can bring some light into the darkness. All comments or pointers to appropriate
    information are very welcome.
    Thank you.

    Martin

  • Martin,

    Martin H. said:
    I regularly click at the update button and thought I would be up-to-date.

    Yes, but the device support update site information (the bookmarks file available on the website I pointed out) was not added to CCSv6 releases out there (both 6.0.0 and 6.0.1), as it only became ready after the internal cutoff dates to integrate new features.

    Martin H. said:
    Will I need to install CCSv6 6.0.1?

    No, CCSv6.0.0 is just fine.

    Martin H. said:
    What I could not find out so far is how a project is created with CCSv6  that contains code for the A8 and a PRU. I mean how would I tell CCSv6 to use different compilers for each part of the code. Is there
    some information in the .out file that tells the loader to load one part to the A8 and the other one to PRU0 or PRU1?

    Despite I don't know of a streamlined process other than having embedded Linux running on the C-A8 (PRU Linux Loader), you will definitely need two separate projects (one for the C-A8 and another for the PRU). The PRU project can output its executable as a binary file (some details here) and the C-A8 project can pick that binary stream and initialize an array that loads the code to the PRU memory directly.

    Despite that, I would post this last question also to the Sitara forum, as the experts there would have much more knowledge about this process.

    Hope this helps,

    Rafael

  • Rafael,

    I will follow your suggestion.
    Thank you very much for your response.

    Martin