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.

AM3358 Exception Attempting to Set GPIO Clock

Other Parts Discussed in Thread: AM3358, AM3359, SYSBIOS, CCSTUDIO

Hello!

I'm new to the whole line of TI processors, and tasked with getting a complex RTOS application running and ready for market on an AM3358 with resistive touch screen.  (I'm not new to firmware programming, and not new to RTOS concepts and have a few complex RTOS products already out in the field and running well.)  So I am taking myself through the learning steps one at a time.  Currently, I'm trying to do one of the exercises (Labs) in the TI-RTOS training videos (TI-RTOS Workshop Series with Eric Wilbur), which is implementing a sort of "hello world" using SYS/BIOS (TI-RTOS Kernel) to simply blink an LED.  I am currently working with the AM335x Starter Kit board, so I'm having to adapt several things (including changes in the software versions of CCS and SYS/BIOS since those videos were made).

Using StarterWare, I was previously able to perfectly control all 4 LEDs on the Starter Kit board.  So I took the key code from that and placed the hardware initialization code (only the GPIO1 module) at the top of main (this is just a test application), and the Lab (exercise) is meant to use the RTOS Idle thread to blink the LED (the simplest of simple RTOS architectures for an application).

To keep it simple, I'm using SYS/BIOS v6.45.00.20 (latest release as of a couple of weeks ago).

The problem I am running into is that as soon as I write to the register to enable to GPIO1 clock(s), I am getting a CPU exception.  Specifically, this is the very first step of setting up the GPIO1 pins.  As soon as I step through this line, I get a CPU exception.

    HWREG(SOC_CM_PER_REGS + CM_PER_GPIO1_CLKCTRL)   |=  CM_PER_GPIO1_CLKCTRL_MODULEMODE_ENABLE;

where

#define HWREG(x)                                                              \
        (*((volatile unsigned int *)(x)))

and

#define SOC_PRCM_REGS                        (0x44E00000)
#define SOC_CM_PER_REGS                      (SOC_PRCM_REGS + 0)

#define CM_PER_GPIO1_CLKCTRL   (0xac)

#define CM_PER_GPIO1_CLKCTRL_MODULEMODE_ENABLE   (0x2u)

=-=-=-=

Is there some kind of UNLOCK I am supposed to do first (to avoid the exception) that wasn't needed under StarterWare?  If so should this hardware initialization code go earlier in the SYS/BIOS initialization sequence (before the 'main' function in my tiny application)?

(And if anyone knows a tried-and-true training sequence for my situation, that would be helpful as well.)


Kind regards,

Vic

  • Hi,

    I will ask the RTOS team to help.
  • Thank you, Biser!  Meanwhile, I'm continuing to study the RTOS start-up sequence and how to control it, but I haven't found the answer yet.

  • Victor,

    I'm taking a look at this and will get back to you. Thanks for your patience.

    Lali
  • Hi, Lali!

    Thanks for letting me know. Am still looking for the answer myself, studying the SYS/BIOS User's Guide in detail, especially about configuration since it seems to control the generated start-up code. Meanwhile, I'm setting up my new AM335x Eval Module and Spectrum Digital debug probe, and very much looking forward to mastering this environment!

    Looking forward to your advice,
    Vic
  • Hi Vic,

    There's a GPIO blink example for the AM335x Starter Kit that uses TI-RTOS in the Processor SDK release. Its located under C:\ti\pdk_am335x_1_0_1\packages\MyExampleProjects\GPIO_LedBlink_skAM335x_armExampleProject

    You can get the release here. In order to generate this example, please build the PDK by running the pdkProjectCreate.bat file in the release. Instructions on how to do that are here. Please use CCS 6.1.2 and ensure that all the packages contained in the release are registered with CCS before building these examples.

    I hope this gets you going with the example that you are trying to build.

    Cheers!

    Lali

  • Hi, Lali!

    Well, I'm somewhat awestruck what a package the PDK is and how projects for different boards are actually GENERATED! That is a very nice piece of work!

    I was trying to get it up and running, and I am still running into one (hopefully the last) problem:

    I am attempting to build the project called GPIO_LedBlink_skAM335x_armExampleProject in Debug configuration. I note that the project didn't build immediately (I didn't capture the error messages), but went into the Project > Properties dialog box to confirm the settings matched my setup. The first thing I noticed was that the device was (by default) set for ICE_AM3359 [Cortex A]. I thought that was a bit odd, since I specified the SK board. In any case, I changed it to what I had been successfully using before for some other examples: SK_AM3358 [Cortex A]. I specified the connection: Texas Instruments XDS100v2 USB Debug Probe. I also noticed that the compiler version selected is GNU v4.8.4 (Linaro) with a linker command file: AM335x.lds. I did not change these. And when I tried to build it I get this output:

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: C:/ti/pdk_am335x_1_0_1/packages/ti/drv/gpio/example/led_blink/am335x/armv7/bios/am335x_app_skam335x.cfg'
    'Invoking: XDCtools'
    "C:/ti/xdctools_3_31_02_38_core/xs" --xdcpath="C:/ti/edma3_lld_02_12_01_22/packages;C:/ti/bios_6_45_00_19/packages;C:/ti/pdk_am335x_1_0_1/packages;C:/ti/ndk_2_24_03_35/packages;C:/ti/ccsv6/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.A8Fnv -p ti.platforms.evmAM3359 -r debug -c "C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3" "C:/ti/pdk_am335x_1_0_1/packages/ti/drv/gpio/example/led_blink/am335x/armv7/bios/am335x_app_skam335x.cfg"
    making package.mak (because of package.bld) ...
    js: "C:/ti/bios_6_45_00_19/packages/ti/targets/arm/elf/IArm.xs", line 77: Error: template generation of 'compiler.opt' failed: Error: The compiler in C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3 is not compatible with this version of TI-RTOS or SYS/BIOS. Please use Arm compiler 5.2.2 or newer.
    "./package.bld", line 54
    xdctools_3_31_02_38_core\gmake.exe: *** Deleting file `package.mak'
    making package.mak (because of package.bld) ...
    js: "C:/ti/bios_6_45_00_19/packages/ti/targets/arm/elf/IArm.xs", line 77: Error: template generation of 'compiler.opt' failed: Error: The compiler in C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3 is not compatible with this version of TI-RTOS or SYS/BIOS. Please use Arm compiler 5.2.2 or newer.
    "./package.bld", line 54
    gmake.exe: *** Deleting file `package.mak'
    gmake.exe: *** No rule to make target `.configuro'. Stop.
    js: "C:/ti/xdctools_3_31_02_38_core/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    gmake: *** [configPkg/linker.cmd] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****


    =-=-=
    I note that the common error message seems to be:

    "The compiler in C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3 is not compatible with this version of TI-RTOS or SYS/BIOS. Please use Arm compiler 5.2.2 or newer."

    SYS/BIOS 6.45.00.19 is what shipped with the PDK.

    So thinking I was doing the right thing, I switched the compiler to TI v5.2.6 (in which case it generated a new linker script AM335x.cmd, keeping the prior one (*.LDS) in the project but graying it out and placing a stroke through its icon (appears to indicate that it is not being used). Doing a CLEAN and REBUILD, the output now generated ends with:

    "...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring am335x_app_skam335x.xea8fnv from package/cfg/am335x_app_skam335x_pea8fnv.cfg ...
    error: ti.sysbios.rts.gnu.SemiHostSupport: "C:/ti/bios_6_45_00_19/packages/ti/sysbios/rts/gnu/SemiHostSupport.xs", line 72: ti.sysbios.rts.gnu.SemiHostSupport : This module does not support non-GNU targets.
    js: "C:/ti/xdctools_3_31_02_38_core/packages/xdc/cfg/Main.xs", line 160: Error: Configuration failed!
    gmake.exe: *** [package/cfg/am335x_app_skam335x_pea8fnv.xdl] Error 1
    js: "C:/ti/xdctools_3_31_02_38_core/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    gmake: *** [configPkg/linker.cmd] Error 1
    gmake: Target `all' not remade because of errors."


    where the earliest problem noted seems to be: "This module does not support non-GNU targets."

    If I switch back to the GNU compiler again, I get the original errors.

    Can you help me understand what the problem is and what I should do to fix it?

    Kind regards,
    Vic
  • Hi Vic,

    I'm glad that you like the scripts. Hopefully we can get your build issues resolved.

    I assume you are using CCS 6.1.2.

    Also, are you getting the same error if you use the original settings on the other project builds? e.g GPIO_LedBlink_skAM335x_armExampleProject.

    Lali

  • Hi, Lali!

    Yes (GPIO_LedBlink_skAM335x_armExampleProject), exactly the same errors. The following output is from the Rebuild attempt with the GNU v4.8.4 (Linaro) compiler:

    **** Build of configuration Debug__GNU(2) for project GPIO_LedBlink_skAM335x_armExampleProject ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: C:/ti/pdk_am335x_1_0_1/packages/ti/drv/gpio/example/led_blink/am335x/armv7/bios/am335x_app_skam335x.cfg'
    'Invoking: XDCtools'
    "C:/ti/xdctools_3_31_02_38_core/xs" --xdcpath="C:/ti/edma3_lld_02_12_01_22/packages;C:/ti/bios_6_45_00_19/packages;C:/ti/pdk_am335x_1_0_1/packages;C:/ti/ndk_2_24_03_35/packages;C:/ti/ccsv6/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.A8Fnv -p ti.platforms.evmAM3359 -r debug -c "C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3" "C:/ti/pdk_am335x_1_0_1/packages/ti/drv/gpio/example/led_blink/am335x/armv7/bios/am335x_app_skam335x.cfg"
    making package.mak (because of package.bld) ...
    js: "C:/ti/bios_6_45_00_19/packages/ti/targets/arm/elf/IArm.xs", line 77: Error: template generation of 'compiler.opt' failed: Error: The compiler in C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3 is not compatible with this version of TI-RTOS or SYS/BIOS. Please use Arm compiler 5.2.2 or newer.
    "./package.bld", line 54
    xdctools_3_31_02_38_core\gmake.exe: *** Deleting file `package.mak'
    making package.mak (because of package.bld) ...
    js: "C:/ti/bios_6_45_00_19/packages/ti/targets/arm/elf/IArm.xs", line 77: Error: template generation of 'compiler.opt' failed: Error: The compiler in C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3 is not compatible with this version of TI-RTOS or SYS/BIOS. Please use Arm compiler 5.2.2 or newer.
    "./package.bld", line 54
    gmake.exe: *** Deleting file `package.mak'
    gmake.exe: *** No rule to make target `.configuro'. Stop.
    js: "C:/ti/xdctools_3_31_02_38_core/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    gmake: *** [configPkg/linker.cmd] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****

    =-=-=-=

    and when I switch to a TI compiler, it issues the complaint above about "This module does not support non-GNU targets." The following is an attempt using TI v15.12.1.LTS:

    **** Build of configuration Debug__TI(3) for project GPIO_LedBlink_skAM335x_armExampleProject ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: C:/ti/pdk_am335x_1_0_1/packages/ti/drv/gpio/example/led_blink/am335x/armv7/bios/am335x_app_skam335x.cfg'
    'Invoking: XDCtools'
    "C:/ti/xdctools_3_31_02_38_core/xs" --xdcpath="C:/ti/edma3_lld_02_12_01_22/packages;C:/ti/bios_6_45_00_19/packages;C:/ti/pdk_am335x_1_0_1/packages;C:/ti/ndk_2_24_03_35/packages;C:/ti/ccsv6/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.A8Fnv -p ti.platforms.evmAM3359 -r debug -c "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS" "C:/ti/pdk_am335x_1_0_1/packages/ti/drv/gpio/example/led_blink/am335x/armv7/bios/am335x_app_skam335x.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring am335x_app_skam335x.xea8fnv from package/cfg/am335x_app_skam335x_pea8fnv.cfg ...
    error: ti.sysbios.rts.gnu.SemiHostSupport: "C:/ti/bios_6_45_00_19/packages/ti/sysbios/rts/gnu/SemiHostSupport.xs", line 72: ti.sysbios.rts.gnu.SemiHostSupport : This module does not support non-GNU targets.
    js: "C:/ti/xdctools_3_31_02_38_core/packages/xdc/cfg/Main.xs", line 160: Error: Configuration failed!
    gmake.exe: *** [package/cfg/am335x_app_skam335x_pea8fnv.xdl] Error 1
    js: "C:/ti/xdctools_3_31_02_38_core/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    gmake: *** [configPkg/linker.cmd] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****

    =-=-=-=

    I was hoping that the GNU compiler was simply out of date, and searched

    software-dl.ti.com/.../download.htm

    and found no mention of "GNU" nor "GCC" when the downloads list was expanded. Forgive me: I'm new to all this. I must be looking in the wrong place for the GNU compilers. All I have done up to this point is check the "select" checkbox under ARM GCC "tile" under CCS > CCS App Center >> ARM GCC tile. Right now the button in that tile is gray and says "Up to Date" and the compiler version is showing "GNU v4.8.4 (Linaro)". Should I be looking in a different place to get an ARM GNU compiler with version >= v5.2.2?

    Kind regards,
    Vic
  • Vic,
    No worries.
    Did you register the new software components installed with this release in CCS?
    Window>preferences>Code Composer Studio>RTSC>Products.

    Please see if you can register these components. You may also notice CCS prompt you when launched to register new products that it has discovered.

    Lali
  • Hi, Lali!

    Sorry for the delay getting back to you.  I hadn't realized I had an answer here waiting for me.

    What's odd about attempting to do this is that after a few days ago (possibly coinciding with what appears to be an automatic update to several versions of XDSTOOLS, and possibly with my having gone through the example-build batch files from above), EDMA3, NDK and the PDK is showing as NOT being installed in CCS.  And when I go to  Window>preferences>Code Composer Studio>RTSC>Products  and then [Install New...] and selecting the directory (e.g. c:\ti\pdk_am335x_1_0_1), there is a quick flash and then nothing new is installed!  I attached a 3-second video showing this.


    Simultaneously, I have tried building other projects, and am now running into a new set of errors (e.g. for the UART_BasicExample_evmAM335x_armExampleProject   project for the evmAM335x board):

    Description    Resource    Path    Location    Type
    Product 'am335x PDK' v1.0.1 is not currently installed and no compatible version is available. Please install this product or a compatible version.    UART_BasicExample_evmAM335x_armExampleProject        UART_BasicExample_evmAM335x_armExampleProject    Problems
    Product 'EDMA3 Low Level Driver' v2.12.1 is not currently installed and no compatible version is available. Please install this product or a compatible version.    UART_BasicExample_evmAM335x_armExampleProject        UART_BasicExample_evmAM335x_armExampleProject    Problems
    Product 'NDK' v2.24.3.35 is not currently installed and no compatible version is available. Please install this product or a compatible version.    UART_BasicExample_evmAM335x_armExampleProject        UART_BasicExample_evmAM335x_armExampleProject    Problems


    This screenshot of the Project Properties window shows red "X's" next to these products.  Yet I didn't de-install them (they were installed successfully with the PDK and I was working with the examples as above), and this set of errors started appearing just after the XDCTOOLS updates.

    Yet, this directory tree shows the fact of them having been installed.  The red arrows show the products that were installed with the PDK.

    Help!  :-(


    Kind regards,

    Vic

  • Hi, Lali!

    Okay, well with a tip from a fellow by the name of Chester Gillon, I resolved PART of the above.  Specifically,

    1.  CCS > Help > About Code Composer Studio > Installation Details.  I selected (one at a time, though it may be possible to do this in a group as well, not sure yet):  am335x PDK, NDK (IDE Client), NDK (Target Client), and EDMA3 and uninstalled them.  I answered YES to re-starte CCS between each one except for the two NDK items, which I did back to back and then accepted the re-start.

    2.  CCS > Window > Preferences > Code Composer Studio > RTSC > Products > Installed Products:  > [Install New...] button, and then I selected the already-existing directories for the above, namely:

      c:\ti\pdk_am335x_1_0_1

      c:\ti\ndk_2_24_03_35

      c:\ti\edma3_lld_02_12_01_22

    one at a time, re-starting CCS between each one.

    Now my Project Properties look like this:

    However, now I have a new set of errors, and I believe we're getting back to the first set above.  Copy/paste of the errors and warnings:

    Description    Resource    Path    Location    Type
    gmake: *** [configPkg/linker.cmd] Error 1    UART_BasicExample_evmAM335x_armExampleProject             C/C++ Problem
    gmake: Target `all' not remade because of errors.    UART_BasicExample_evmAM335x_armExampleProject             C/C++ Problem
    gmake.exe: *** No rule to make target `.configuro'.  Stop.    UART_BasicExample_evmAM335x_armExampleProject             C/C++ Problem
    template generation of 'compiler.opt' failed: Error: The compiler in C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3 is not compatible with this version of TI-RTOS or SYS/BIOS. Please use Arm compiler 5.2.2 or newer.    .xdchelp    /UART_BasicExample_evmAM335x_armExampleProject    line 77    C/C++ Problem
    Product 'SYS/BIOS' v6.45.0.19 defines no repositories. Uninstall and reinstall the product, or contact the product provider.    UART_BasicExample_evmAM335x_armExampleProject        UART_BasicExample_evmAM335x_armExampleProject    Problems

    On a hunch, I tried the above steps with the SYS/BIOS v6.45.0.19, but doing so did not resolve the warning.

    I looked a bit into the 4th error above and found that it was a generated exception in the file C:\ti\bios_6_45_00_19\packages\ti\targets\arm\elf\IArm.xs  (Java?) as a result of the presence of file

        C:\ti\ccsv6\tools\compiler\ti-cgt-arm_15.12.0.LTS\bin\armcl.exe

    =-=-=

    Back to the  GPIO_LedBlink_skAM335x_armExampleProject  project, I have virtually the same set of errors now as the above:

    Description    Resource    Path    Location    Type

    Errors:

    gmake: *** [configPkg/linker.cmd] Error 1    GPIO_LedBlink_skAM335x_armExampleProject             C/C++ Problem
    gmake: Target `all' not remade because of errors.    GPIO_LedBlink_skAM335x_armExampleProject             C/C++ Problem
    gmake.exe: *** No rule to make target `.configuro'.  Stop.    GPIO_LedBlink_skAM335x_armExampleProject             C/C++ Problem
    template generation of 'compiler.opt' failed: Error: The compiler in C:/ti/ccsv6/tools/compiler/gcc-arm-none-eabi-4_8-2014q3 is not compatible with this version of TI-RTOS or SYS/BIOS. Please use Arm compiler 5.2.2 or newer.    .xdchelp    /GPIO_LedBlink_skAM335x_armExampleProject    line 77    C/C++ Problem

    Warnings:

    Build variable 'EDMA3_LLD_INSTALL_DIR' cannot be resolved.     GPIO_LedBlink_skAM335x_armExampleProject        properties    Problems
    Build variable 'TI_PDK_INSTALL_DIR' cannot be resolved.     GPIO_LedBlink_skAM335x_armExampleProject        properties    Problems
    directory "E:/packages" on package path does not exist    GPIO_LedBlink_skAM335x_armExampleProject             C/C++ Problem
    Product 'SYS/BIOS' v6.45.0.19 defines no repositories. Uninstall and reinstall the product, or contact the product provider.    GPIO_LedBlink_skAM335x_armExampleProject        GPIO_LedBlink_skAM335x_armExampleProject    Problems
    XDCpath repository '/packages' cannot be found! Visit project's 'Properties > General > RTSC' tab to adjust the XDCpath.    GPIO_LedBlink_skAM335x_armExampleProject        GPIO_LedBlink_skAM335x_armExampleProject    Problems
    XDCpath repository '/packages' cannot be found! Visit project's 'Properties > General > RTSC' tab to adjust the XDCpath.    GPIO_LedBlink_skAM335x_armExampleProject        GPIO_LedBlink_skAM335x_armExampleProject    Problems

    I hate to ask an obvious question, but am I running into example applications  (UART_BasicExample_evmAM335x_armExampleProject, and GPIO_LedBlink_skAM335x_armExampleProject)  that were never tested on the Windows platform, and has a built-in compatibility problem with the SYS/BIOS it was installed with?

    Would I get any benefit by deleting everything and re-installing it all from scratch?   (The projects I have made from scratch are compiling, running and debugging without any problems, on both the  skAM335x  and  evmAM335x  boards, so this seems a bit extreme, so let me know if this is an answer, or if we can navigate fixing what I have here.)  If so, what is the proper method of de-installing everything?  Noting that the only item that seems to appear in the >Control Panel > Uninstall a Program list is CCStudio, so that leaves the question:  how do you de-install the rest (roughly 4 GB worth of software)?  Delete C:\ti\*.* ?   (Scary thought.)

    And would doing so just end me up back where I am now?

    Kind regards,

    Vic

  • I tried deleting the GPIO_LedBlink_skAM335x_armExampleProject  (which I had imported into my workspace), as well as deleting the directory and all its contents from my workspace, and then I re-imported it from the source:  

        C:\ti\pdk_am335x_1_0_1\packages\MyExampleProjects\GPIO_LedBlink_skAM335x_armExampleProject

    Yet, I still get the above errors and warnings.

    In case it is helpful, here is the screenshot showing the 2 unresolved variables, and I note that the variable EDMA3_LLD_INSTALL_DIR (for example) is neither in the LINKED nor the BUILD variable lists....  But it IS in the the path as shown in the screen shot.  But then, BIOS_CG_ROOT variable is ALSO not in the above 2 lists, but IT is resolved.  Where (and how) is the BIOS_CG_ROOT variable being generated?  Maybe that will give us a clue as to why EDMA3_LLD_INSTALL_DIR and the other one are not being resolved.  Perhaps they don't exist?  :-(

  • For what it's worth:  plugging in the hard-coded path for the 2 unresolved paths like this:

    now removed all but 1 warning.  All the errors are still present.  The one warning that remains is this one:

    Description    Resource    Path    Location    Type
    Product 'SYS/BIOS' v6.45.0.19 defines no repositories. Uninstall and reinstall the product, or contact the product provider.    GPIO_LedBlink_skAM335x_armExampleProject        GPIO_LedBlink_skAM335x_armExampleProject    Problems

    ...and I do not know how to solve that (how to perform the uninstall step in a way that I haven't already tried -- I have tried the Help > About Code Composer Studio > Installation Details... > Select SYS/BIOS v6.45.0.19 > Uninstall, and then re-installing by Window > Preferences > Code Composer Studio > RTSC > Products > Install New... -- and these RAN and did not produce any errors, but still is not resolving the above warning).

    Is that last warning causing the errors?

    Kind regards,

    Vic

  • Hi, Lali.

    Well, I FINALLY got something running.  I'll list here (while it is still fresh) the steps I went through to do so:

    1.  I deleted my imported   GPIO_LedBlink_skAM335x_armExampleProject   from within CCS (without deleting it on disk).

    2.  I closed CCS.

    3.  I manually deleted my directory for the same project in my workspace.

    4.  I manually deleted this directory:

    C:\ti\pdk_am335x_1_0_1\packages\MyExampleProjects\GPIO_LedBlink_skAM335x_armExampleProject

    5.  I went into   C:\ti\pdk_am335x_1_0_1\packages   with a command prompt and ran:

    pdksetupenv.bat

    then

    pdkProjectCreate.bat   AM335x  skAM335x   little  gpio

    6.  I re-launched CCS and re-imported the project into CCS, checking both "Automatically import referenced projects found in same search-directory" and "Copy projects into workspace".  (I don't know if these checkboxes made any difference or not, but this is what worked, so I'm documenting the steps.)

    7.  I opened Project Properties and made the following changes:

    a.  Corrected Device from the erroneous "ICE_AM3359 [Cortex A]" to "SK_AM3358 [Cortex A]".

    b.  Set the "Connection" to "Texas Instruments XDS100v2 USB Debug Probe" (what's built into the Starter Kit board).

    c.  I noted that the compiler was "GNU v4.8.4 (Linaro)" and left it that way.  The linker command file (created during import?) is AM335x.lds.

    d.  Under the RTSC tab, I noted the XDCtools version was 3.31.2.38_core and I left it that way.

    e.  The following is what I had at this point:  Note that the SYS/BIOS selected (by project creation in step 5?) is v6.45.0.19 -- the version that shipped with the PDK.  Screenshot just below.

    8.  Noting the blank "Platform" field, I clicked on the drop-down box and it took a couple of seconds to generate the list, and its contents made no sense to me (see screenshot below):

    9.  I changed the selected version of SYS/BIOS to v6.45.0.20 (more recent version that I had previously installed myself as an independent installer .EXE -- not through CCS).

    10.  I clicked the dropdown list for the platform again and got this:

    ...which was a lot closer to what I was expecting.  I selected      "ti.platforms.evmAM3359".

    11.  For the first time ever, I was able to open the .CFG file without errors.  I didn't change anything.

    12.  Being hopeful, I right-clicked the project and chose "Build".  It generated 3 warnings:

    Description    Resource    Path    Location    Type
    Build variable 'EDMA3LLD_BIOS6_INSTALLDIR' cannot be resolved.     GPIO_LedBlink_skAM335x_armExampleProject        properties    Problems
    implicit declaration of function 'GPIOIntrTrigger' [-Wimplicit-function-declaration]    main_led_blink.c    /GPIO_LedBlink_skAM335x_armExampleProject    line 179    C/C++ Problem
    Invalid project path: Include path not found (\packages).    GPIO_LedBlink_skAM335x_armExampleProject        pathentry    Path Entry Problem

    13.  As it turns out, the INCLUDE directory containing EDMA3LLD_BIOS6_INSTALLDIR was not needed, so I removed it, and executed a "Rebuild".  This time there was only one warning:  the implicit declaration of the   GPIOIntrTrigger()   function in MAIN_LED_BLINK.C

    14.  Ctrl-Clicking the function name did not do anything since the parser in the editor could not resolve the location of the function definition, so I searched with another tool and found the declaration of the function in   C:/ti/pdk_am335x_1_0_1/packages/ti/drv/gpio/src/v1/GPIO_v1_lld.h

    15.  Noting that this file had an   #include   near the top of  MAIN_LED_BLINK.C, I also noted that the  #if  bracketing that enclosed it was DIFFERENT than the bracketing around the actual function call.  So I edited the top of  MAIN_LED_BLINK.C  as follows:

    // 19-Feb-2016 vw:
    // This is an incorrect #if condition, and should have included SOC_AM335X and SOC_AM437X
    // as does the call to GPIOIntrTrigger() below.
    //#if defined(SOC_AM572x)|| defined(SOC_AM571x)
    #if defined(SOC_AM572x) || defined(SOC_AM571x)|| defined(SOC_AM335X)  || defined(SOC_AM437X)
    #include <ti/drv/gpio/src/v1/GPIO_v1_lld.h>
    #endif

    16.  Finally, MAIN_LED_BLINK.C  now compiled without any warnings or errors.

    17.  Then I clicked the DEBUG button and it is now running on my Starter Kit board and blinking the LED.

    Thank you, Lali for the time you put in to direct me.

    I strongly suggest that the staff that builds these things (e.g. pdkProjectCreate.bat)  hires a DIFFERENT person as a tester who will put these projects through the paces with all the different platforms they are meant to run on.  If I had known more about CCS (I'm learning), it would not have cost me so much time, but we're getting there.

    Kind regards,

    Vic Wheeler

  • Victor,

    Thank you for posting your steps on this thread, as this would assist others if they encounter the same challenging experience you had.
    We truly appreciate you giving TI products a chance, and your candid feedback no doubt helps us improve our products.

    I will be taking up your notes internally and ensure that the right folks see this to implement ways to improve the user experience. Thank you for your patience and working through the errors.

    Lali
  • Thanks, Lali!

    That's all I can ask for. :-)   (Note:  if I had done the path above the FIRST time, I would not have run into the problem, so that's one score for possible documentation or errata [made easily available and -- hopefully -- impossible NOT to find] -- would be a great step too.)

    Kind regards,
    Vic

  • Lali,

    One thing I am still needing really badly: I'm new to the whole line of TI products (and CCS and TI-RTOS and SYS/BIOS), and so far am thrilled with what appears to be the quality of the products (e.g. the thought that went into the [for example] evm335x evaluation module: in our case, it has a lot of things we're going to be putting into our product already, and so provides an excellent launch pad for me to get started with until we have our hardware developed).

    Here's what I'm running into as a TI products beginner: even though I'm an excellent student, I am running into questions like:

    1. WHY could my original try (the first message in this chain) have caused an exception? (I believe it was a legal register address for the AM3358 SoC, since the same code worked in the StarterWare context, but not in the SYS/BIOS context.)

    2. In SYS/BIOS, what is the design intention for board initialization and things that happen BEFORE the application 'main()' function is entered? I see, in the LedBlink example that apparent library code is stepping through structures that I will need to populate in order to get that initialization done. But is that the designer's intention? If this is the case for GPIO, is it also what I should be expecting for the rest of the peripheral modules?

    3. And here's one that's currently has my attention: The example LED BLINK for the Starter Kit board calls a function called "Board_init()", which is a purple link, and only leads to a file "board.h", but not to the definition of the function. With a special editor I have, I was able to scan and find "Board_init()" in a file .\packages\ti\board\src\skAM335x\skAM335x.c. Yet, this file is NOT included in the project, and it does not appear to be included in any of the libraries either! (At least, I scanned for the string "Board_init" in the *.a files under the GNU compiler where the included libraries are, and didn't find it in any of them.) The big questions of course are:

    a. How is that function getting linked into the project?

    b. Where can I find that FOR CERTAIN that code in skAM335x.c is the correct source code for it?

    c. Why is the function in bold-face purple? (Defined externally?)

    What I find as a new TI customer so far is that I'm thrown into a sea of details, trying to figure out what the 30,000-foot overview is -- the stuff that tells me things like, "In this SoC, as is true for most TI SoC's, to use a peripheral, in most cases you need to complete 3 steps: set up clocks, configure and turn the peripheral on, set up interrupts." <-- and I have no idea if this is correct or not, but what I'm trying to get across is: WHERE IS THE ORIENTATION MATERIAL? The stuff that says, "This is the umbrella view, this is how all the parts are intended to work together: ..." And then fill in the gaps.

    Let's take one small example: the GPIO library under the PDK. As I newbie, when I start looking into it, I have this question: "How are all the parts of this GPIO library intended to work together by its designer?" And I'm finding it HARD HARD HARD to find the answer to that question. The Doxygen documentation merely throws me back into the "sea of details" and gives me no clue about the answer to that question. The answer SEEMS to be (forgive me if I'm wrong), to read and understand ALL of the source code (without having this context, which I NEED in order to understand that source code), and then determine for myself the answer to the question: "How are all the parts of this GPIO library intended to work together by its designer?"

    I have downloaded, but not studied all of yet, the AM335x Technical Reference manual, I have the SYS/BIOS User's Guide, the document "How to Develop a Project with TI SYS_BIOS" -- which is a kind of "getting started" document and so skips a lot of details, but directs me to the STEPS TO DO (rather than the understanding behind it -- okay for a "getting started" document, but I still need that understanding), and the CCS wiki.

    Simply put: I'm trying to get oriented with the TI line of products, CCS, and the libraries I'm going to be using, and I'm trying to do so EFFICIENTLY.

    I've searched Amazon.com for books that accomplish this and found nothing.

    Can you advise me please where I should go to get this orientation? (I won't be able to go to training seminars, and as an excellent student of written material, I shouldn't need to. I did find Eric Wilbur's training videos at training.ti.com/ti-rtos-workshop-series on TI-RTOS excellent, and fill in a lot of these gaps.) Is it indeed in the reference works I mentioned above, and I just have to read them in sequence (which I would gladly do)?

    Kind regards,
    Vic Wheeler

  • I see PART of the answers to the above questions (though the REAL question is "Where is the orientation material?") are:

    1. For the PDK GPIO library, the release notes list this file: docs/GPIO_User_Guide.pdf However, the file is not present! Apparently, SOMEONE meant there to be such a file, but it was not there. If it had been there, I would have seen it, because I did look through the 'docs' directory, which are, thankfully, so consistently provided. Lacking this document still leaves me swimming in the "sea of details" of the Doxygen HTML documentation, which is almost the same as reading the source code UNLESS there is orientation material in the doxygen comments, which there SHOULD be, but which is scarce or missing.

    2. The library files I scanned through (*.lib and *.a) is an INCOMPLETE list. The libraries that did in fact contain the Board_init() function have file extensions: *.aa8fg. I found this by studying the file 'makefile' file in the GPIO library directory. After knowing that *.aa8fg was a library extension, I was pleased to find pre-built library files included with the PDK in GPIO\lib\<platform>\armv7\ .  However, this still leaves me with the question as to how CCS knows to link these, and other *.aa8fg  libraries into my project.

    Lali, do you have any tips for me as regards "Where is the orientation material?" What documents did you use to learn this stuff?

    Kind regards,
    Vic

  • Victor,

    I forgot to mention that I have reported the error in the release notes to be corrected.
    Thanks for bringing it to our attention.

    Lali
  • Dear Lali,

    *wheezing sigh of relief!*

    No, I had not seen these, and yes, this is exactly the type of material that I've been looking for!

    I know this may be a stupid question, but what should I have done to have found the first link -- this one?

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

    (I see that the first one has a link to the 2nd one, and other driver documentation, and a lot more.)

    Kind regards,
    Vic

  • Excellent. Thanks, Lali!
  • Oh dear -- nevermind: I answered my own question.

    http://www.ti.com > search for AM3358 > Tools and Software Tab > Processor SDK for AM335X Sitara™ Processors - Linux and TI-RTOS support > Processor SDK - RTOS- Software Developer's Guide (Wiki) link under "User Guides" section.

    There is also a nice handful of training links under "Additional Information", which I will be pursuing!

    THANK YOU !!!
  • Hi, Lali!

    I got closer to the root cause of all this trouble. The real ROOT may be deeper, but this is a work-around that makes the imported examples from PDK v1.0.1 work right THE FIRST TIME on both my platforms: SKAM3358 and EVMAM3358:

    If you edit the C:\ti\pdk_am335x_1_0_1\packages\pdkProjectCreate.bat file and replace the ELSE IF block at line 436 with this:

    ) else if %SOC% == AM335x (
    set PDK_PARTNO=AM335
    set PDK_ECLIPSE_ID=com.ti.pdk.am335x
    set RTSC_PLATFORM_NAME=ti.platforms.evmAM3359
    set RTSC_TARGET=gnu.targets.arm.A8F
    rem 03-Mar-2016 12:55 vw
    rem This doesn't work for users who have an EVMAM3358 platform,
    rem so this is being replaced so that projects will work right
    rem when imported without the need for a lot of fiddling about.
    rem Reason: Changing the target device in the project can and does
    rem silently alter the linker command file entry causing some examples
    rem to flatly not work. Case in point: USB Mass Storage example.
    rem Original code:
    rem set CCS_DEVICE="Cortex A.AM3359.ICE_AM3359"
    rem Code that replaces it:
    if %BOARD% == icev2AM335x (
    set CCS_DEVICE="Cortex A.AM3359.ICE_AM3359"
    ) else if %BOARD% == evmAM335x (
    set CCS_DEVICE="Cortex A.AM3358.EVMAM3358"
    ) else if %BOARD% == skAM335x (
    set CCS_DEVICE="Cortex A.AM3358.SK_AM3358"
    ) else (
    set CCS_DEVICE="Cortex A.AM3358.BBBAM3358"
    )

    Part of the problem was that the generated projects had hard-coded ICE_AM3359 target, and when this was changed, an incompatible linker command file was silently pulled into the project.

    If you have a communication channel to the TI engineers who manage the PDK, I suggest they review the logic in this IF/ELSE block to confirm whether this is correct or whether other platforms would also need to be supported. At the top of the batch file is some comments that indicate that valid names for the 'board' argument to the pdkProjectCrate.bat file can be found in the pdk_<soc>_<version>\packages\ti\board\lib directory. Prior to this code change, the batch file did not in fact support all those arguments. Now it does (I think).

    Kind regards,
    Vic