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.

CCS/AM3354: Trouble Writing Memory Block at 0x80000000 on Page 0 of Length 0x4208

Part Number: AM3354
Other Parts Discussed in Thread: AMIC110, , AM3358, AM3359

Tool/software: Code Composer Studio

Hello expert

    I use baremetal_template_app_am335x_a8, and I run program, I got following problems.

My board assemble a DDR2 as external memory,  I know the problem is that I did not initial DDR2 correctly.

so, I try to use the example bootloader in starterwarer, but I have following questions.

     1:  I found in bootloader example, all the initial function include in main function(such as the functon SBLPlatformConfig() which config PLL and  DDR controller ) .

as far as I know, the bootloader should run before function main(), right?

     2:  if I want to use bootloader in my project, should I move all the initial function to another function which run before main function?

Such as the function start_boot( I use diag_entry.s  as  startup document, start_boot  run after function Entry), the start_boot function define like this. 

int32_t start_boot(void)
{
//    DIAG_init();
    /* Copy the vector table to desired location.  */
    CopyVectorTable();

    /* Calling the main */
    return main();
}

can I just put the initial function inside this function?

     3:  I found there is a function BOARDInit(), but the BOARDInit is defined in many different documents, such as bbbAM335x, icAMIC110, icev2AM335x, skAM335x, which one should I choose?

     4:  I search in this forum, I found the hardware could initial in GEL file, and the program run to function OnTargetConnect() at first time,  so, should I initial DDR and PLL inside the funtion OnTargetConnect?

if so, should I write some C function which include DDR and PLL initial code and call this function in OnTargetConnect() , is there any exist function I can use to initial DDR2 and PLL?

     5: here is my board's picture, can you tell me the type of this board(bbbAM335x, icAMIC110 or icev2AM335x)?

Best Regards

Jack

  • Hi Jack,

    user6486467 said:
    I run program

    I assume this issue occurs when you load the program, not when you execute the program.

    Before considering the bootloader, I suggest you get the DDR working using CCS/JTAG & GEL. The DDR settings in the GEL file for a particular hardware platform should match those used by the bootloader.

    Please read the following documentaion concerning the AM335x bootloader: https://software-dl.ti.com/processor-sdk-rtos/esd/docs/06_03_00_106/AM335X/rtos/index_Foundational_Components.html#boot

    user6486467 said:
    as far as I know, the bootloader should run before function main(), right?

    The bootloader has its own main() function. The bootloader executes before the application main(). Once the bootloader has finished loading the application code, it passes control to the application by jumping to the application entry point. Please see details here: https://software-dl.ti.com/processor-sdk-rtos/esd/docs/06_03_00_106/AM335X/rtos/index_Foundational_Components.html#boot-sequence

    user6486467 said:
    if I want to use bootloader in my project, should I move all the initial function to another function which run before main function?

    The bootloader and application are independent, and should be built as a separate executables. There shouldn't be a need to reorganize the bootloader or application code to use the bootloader.

    user6486467 said:
    I found there is a function BOARDInit(), but the BOARDInit is defined in many different documents, such as bbbAM335x, icAMIC110, icev2AM335x, skAM335x, which one should I choose?

    BOARDInit() is a Starterware function which is only used in the Starterware bootloader and example code.

    • This function isn't hardware platform specific. Internally the function obtains the board ID using the I2C EEPROM and then executes any platform-specific initialization code based on the ID.
    • The SBL main() already has a call to this function, and there's no need to change it. 
    • Only use this function if you plan to program in bare-metal using Starterware.

    Use the Board library function Board_init() in your application code. 

    • This function is platform specific, but the API is the same for all platforms.
    • The function performs hardware initialization for the platform. The Board library for platform will include the platform-specific code.

    Please read details here: https://software-dl.ti.com/processor-sdk-rtos/esd/docs/06_03_00_106/AM335X/rtos/index_board.html#board-apis

    user6486467 said:
    I found the hardware could initial in GEL file, and the program run to function OnTargetConnect() at first time,  so, should I initial DDR and PLL inside the funtion OnTargetConnect?

    OnTargetConnect() in the GEL file executes when connecting to the target hardware platform via JTAG. 

    GEL files for TI hardware platforms are provided in the CCS installation. These GEL files contain definitions for OnTargetConnect() and functions for initializing PLL and DDR. The functions for PLL and DDR initialization are invoked in OnTargetConnect(). For example, see the BBB gel file here: C:\ti\ccs930\ccs\ccs_base\emulation\boards\beaglebone\gel\beagleboneblack.gel.

    user6486467 said:
    if so, should I write some C function which include DDR and PLL initial code and call this function in OnTargetConnect() , is there any exist function I can use to initial DDR2 and PLL?

    GEL functions for DDR and PLL initialization are already be included in OnTargetConnect() for TI platforms. GEL isn't C code, but is rather a scripting language used to create functions to extend Code Composer Studio IDE's usefulness. Hence adding GEL functions requires writing GEL code. Please read details on GEL here: https://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_debug-gel.html

    user6486467 said:
    here is my board's picture, can you tell me the type of this board(bbbAM335x, icAMIC110 or icev2AM335x)?

    It doesn't look like a TI EVM to me.

    • The board uses an AM3354, so it can't be an AMIC110 board.
    • TI EVMs typically use AM3358 or AM3359, not AM3354.
    • It doesn't look like BBB, ICEv2, GP EVM, or StarterKit. 

    You can see pictures of all the TI hardware platforms on www.ti.com. Go to www.ti.com and enter the name of the platform into the search field.

    I suggest inspecting the silkscreen on the other side of the board for identifying information.

    Regards,
    Frank

  • Hello Frank

        I use win10 and I install CCS and Processor SDK RTOS in defualt directory(C:/TI).

    I try to set up Environment following the structure Setup Environment .

    First, I type following command in CMD

    C:\ti\processor_sdk_rtos_am335x_6_03_00_106\setupenv.bat

    I got following info

    I do not know why IPC_PLATFORM: UNKOWN happend, what's the meaning of IPC_PLATFORM?

    Then I type 

    C:\ti\processor_sdk_rtos_am335x_6_03_00_106

    I got following so many errors of Nothing to be done for 'all'.

    and can not find directory.

    and then I can not compile the project property , do you know why?

    and I can not understand the meaning of command for Alternatively set RULES_MAKE and PATH variable for Windows..

    set RULES_MAKE = C:/ti/pdk_[soc]_[version]/packages/Rules.make
    set PATH=%PATH%;C:/ti/xdc_[xdc_version]

    my pdk_[soc]_[version] is pdk_am335x_1_0_17, so can I just use the following command?

    set RULES_MAKE = C:\ti\pdk_am335x_1_0_17\packages\Rules.make
    set PATH=%PATH%;C:\ti\xdctools_3_55_02_22_core

    I can not find the file Rules.make in directory C:\ti\pdk_am335x_1_0_17\packages .

    And I try to find all AM3354 TI hardware platforms, I can just find  (1)AM335x Starter Kit (EVM) (2)AM335x Evaluation Module (EVM)  (3)AM3359 Industrial Communications Engine (ICE) (4)BeagleBone Black Development Board  in the link in website , so we just have four stander modules?

    Best Regards

    Jack

  • hello Frank

       do you have idea about this issue?

    best regards

    Jack

  • Hi Jack,

    user6486467 said:
    I do not know why IPC_PLATFORM: UNKOWN happend, what's the meaning of IPC_PLATFORM?

    I don't know the purpose of this variable. However, I observe the same setting for IPC_PLATFORM when I invoke processor_sdk_rtos_am335x_6_03_00_106\setupenv.bat. Inspecting the file, I see the variable is never set to anything besides "UNKNOWN":

            @REM Configure IPC platform
            set IPC_PLATFORM=UNKNOWN
            set IPC_ALT_PLATFORM=
    
            @echo     IPC_PLATFORM: %IPC_PLATFORM%
            @echo     IPC_ALT_PLATFORM: %IPC_ALT_PLATFORM%
    

    user6486467 said:
    I got following so many errors of Nothing to be done for 'all'.

    Release build libraries are included in the installed content, so there isn't a need to build these libraries. Hence gmake is skipping these libraries during the build.

    user6486467 said:
    and then I can not compile the project property , do you know why?

    This issue is discussed in thie e2e thread: https://e2e.ti.com/support/processors/f/791/t/957768

    user6486467 said:
    and I can not understand the meaning of command for Alternatively set RULES_MAKE and PATH variable for Windows..

    user6486467 said:
    I can not find the file Rules.make in directory C:\ti\pdk_am335x_1_0_17\packages .

    I assume you're referring to the instructions here: http://software-dl.ti.com/processor-sdk-rtos/esd/docs/06_03_00_106/AM335X/rtos/index_overview.html#rebuild-pdk

    PDK Rules.make is located in <PRSDK>/pdk_am335x_1_0_17/packages/ti/build/Rules.make

    user6486467 said:
    set PATH=%PATH%;C:\ti\xdctools_3_55_02_22_core

    Correct.

    user6486467 said:
    , so we just have four stander modules?

    Yes, these are the TI AM335x development platforms, please see here: https://www.ti.com/processors/sitara-arm/am335x-cortex-a8/design-development.html. Reference designs can be found by clicking on the "See designs" button.

    Regards,
    Frank

  • Hello Frank

      I try to do last step in structure setup environment, and I type 

    >pdkProjectCreate.bat AM335x evmAM335x little all all arm C:\ti\pdk_am335x_1_0_17\packages

    but I got following error

      

    both PDK Example and Test Project are not created, do you know why? Does this relevant to  "IPC_PLATFORM : UNKNOW"?

    Best Regards

    Jack

  • Hi Jack,

    Please read the documentation here: https://software-dl.ti.com/processor-sdk-rtos/esd/docs/06_03_00_106/AM335X/rtos/index_overview.html#pdk-example-and-test-project-creation

    Likely this issue is caused by not installing the PRSDK products in CCS:

    Ensure all dependent/prerequisite products are installed and registered with CCS before proceeding with the examples and/or unit test. Starting CCS after installing the Processor SDK products will cause CCS to find and register any new products. Errors will occur during PDK project creation if any dependent products have not been registered with CCS.

    Installing the products is described here: https://software-dl.ti.com/processor-sdk-rtos/esd/docs/06_03_00_106/AM335X/rtos/index_how_to_guides.html#discovering-sdk-products

    Regards,
    Frank

  • Hello Frank

         What's the meaning of PRSDK products? Iinstalled the following product in CCS, 

    include bios, pdk, ndk, uia.....

     then I follow the structure of setup environment again, at last, I type the command

    pdkProjectCreate.bat AM335x evmAM335x little all all arm C:\ti\pdk_am335x_1_0_17\packages

    but I still can not build the example. 

    In addition, I install CCS and processor_sdk_rtos_am335x in C:\ti, do you know why?

    Best Regards

    Jack

  • Hi Jack,

    It looks like you're using PRSDK 6.3, and CCS 10.x. Please try using CCS 9.3 since this version was used for PRSDK 6.3 validation & release.

    The download link can be found under "AM335x RTOS SDK Essentials" here: https://software-dl.ti.com/processor-sdk-rtos/esd/AM335X/06_03_00_106/index_FDS.html

    Also be sure to follow all instructions mentioned here: https://software-dl.ti.com/processor-sdk-rtos/esd/docs/06_03_00_106/AM335X/rtos/index_overview.html#pdk-example-and-test-project-creation

    You may see errors (failed to start server) during the running of the script if an instance of CCS is running, so please ensure that CCS is closed prior to running the pdkProjectCreate script

    Regards,
    Frank