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.

ICE V2 BOOTING THROUGH NOR FLASH

Hi Biser,

Although this question is regarding starterware present in sdk1.0.0.8, still I am putting in this forum because I am finding no response there. We are trying to understand the NOR bootloader for ICE V2 but we are unable to find the files which are configuring all the GPMC parameters to use it in NOR Flash. We could compile the bootloader program but I am not sure whether that will work or not on the actual hardware.

If you could suggest as to where can we get a reliable answer of our queries. sorry for the trouble.

Regards.

  • Hi,

    I will ask the Starterware team to help on this.

  • The Starterware team will look into this. Moving this thread to the Starterware forum per their request.

  • Thanks Biser,

    I was hoping some help from you in this. Waiting for the reply as we would then look forward to buying ICE_V2.

    Regards..
  • Hi Biser,

    Is this something very complicated that may require lot of time? If the starterware community can update...
  • Hi,

    To answer your questions,

    - Where are the GPMC configurations done?
    I think it's done by the ROM bootloader. The pinmuxes are done properly in the bootloader source

    - Will this work on ICEv2?
    Yes.

    Note: ISDK 1.0.0.8 is a very old SDK. Please use the latest 

    Regards,
    Vinesh

  • Hi Vinesh,

    Thanks. Sorry for the mis-information. I have SDK1.1.0.8 only which is latest.

    To further get into this NOR Flash Boot, I was going through boot_NOR_ICE_V2.cmd file which has the following description:-

    /****************************************************************************/
    -stack 0x0040 /* SOFTWARE STACK SIZE */
    -heap 0x2000 /* HEAP AREA SIZE */
    -e Entry
    /* Since we used 'Entry' as the entry-point symbol the compiler issues a */
    /* warning (#10063-D: entry-point symbol other than "_c_int00" specified: */
    /* "Entry"). The CCS Version (5.1.0.08000) stops building from command */
    /* line when there is a warning. So this warning is suppressed with the */
    /* below flag. */

    --diag_suppress=10063

    /* -l ../../../../../../../binary/armv7a/cgttms470_ccs/am335x/drivers/drivers.lib */
    /* -l ../../../../../../../binary/armv7a/cgttms470_ccs/am335x/evmAM335x/platform/platform.lib */
    /* -l ../../../../../../../binary/armv7a/cgttms470_ccs/utils/utils.lib */
    /* -l ../../../../../../../binary/armv7a/cgttms470_ccs/mmcsdlib/libmmcsd.lib */

    -l drivers.lib
    -l platform.lib
    -l utils.lib
    -l libmmcsd.lib


    /* SPECIFY THE SYSTEM MEMORY MAP */

    MEMORY
    {
    NOR_MEM : org = 0x08000000 len = 0x10000 /* RAM */
    IRAM_MEM : org = 0x402F0400 len = 0x1FBFF /* RAM */
    }

    /* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */

    SECTIONS
    {
    .init : {
    bl_init.obj (.text)
    } load > 0x08000000
    .const : load > NOR_MEM /* GLOBAL CONSTANTS */
    .cinit : load > NOR_MEM
    .text : load > NOR_MEM /* CODE */
    .ram_code: { bl_norexec.obj(.text)} load > NOR_MEM

    .data : load > IRAM_MEM /* INITIALIZED GLOBAL AND STATIC VARIABLES. */
    .bss : load > IRAM_MEM /* UNINITIALIZED OR ZERO INITIALIZED */
    /* GLOBAL & STATIC VARIABLES. */
    RUN_START(bss_start)
    RUN_END(bss_end)

    .stack : load > 0x4030FF00 /* SOFTWARE SYSTEM STACK */

    }

    Here does NOR_MEM : org = 0x08000000 len = 0x10000 /* RAM */ mean 65,535 bytes are allocated for CSN0 i.e. on board NOR FLash? Why so when the memory is 16MB?

    Again why the system memory map does not talk about system memory mapped to DDR3 and why only NOR and Internal SRAM?

    Can you also guide me as to how to go about to understand this remaining file? Like does it mean that after booting and during the execution of the application code global constants and the code will be loaded from NOR Memory and the initialized and uninitialized variables will be loaded from Internal SRAM? Do we need to fiddle with this file at all? And will this file be changed in case we boot from an OTP rather than NOR?
  • Hi,

    We have understood the above mentioned file by following ARM Compiler guide.

    Kindly reply the remaining doubts of the previous posts:-

    Here does NOR_MEM : org = 0x08000000 len = 0x10000 /* RAM */ mean 65,535 bytes are allocated for CSN0 i.e. on board NOR FLash? Why so when the memory is 16MB?

    Again why the system memory map does not talk about system memory mapped to DDR3 i.e. 0x80000000 and why only NOR and Internal SRAM?

    And will this file be changed in case we boot from an OTP rather than NOR?
  • Hi,

    Only the required memory sections are mentioned in the cmd file. In this case, it fits within the regions specified.

    The NOR bootloader uses only Internal SRAM(nothing on DDR).

    The NOR bootloader is designed specifically for XIP operation. An application compiled for XIP, will be flashed in NOR(at a predefined location).

    Regards,
    Vinesh
  • Mohit,
    not using DDR RAM here is part of the example configuration. We wanted to show a DDR-less system (reduced BOM). Of course there is DDR on ICEv2 but it is not used in some configurations. But that is totally application dependent.

    Regards,
  • But Walzer do you mean, we cannot use DDR in NOR boot configuration? I hope this not what you are saying.
  • Thanks Vinesh, I would continue this post for some more related query
  • Hi Vinesh and Walzer,

    In my case my system will be boot with an OTP [XIP device on CSn0, 16 bit device - 1Mbit size] and will compute the check sum of the content of a parallel NOR Flash [on CSn1, 16 bit device - 1Gbit size]. Once the the checksum of the NOR Flash is found to be correct, the actual application will reside on the NOR flash and should be executed from there. While executing the boot code from OTP, DDR may not be used. But while using application code of NOR flash, DDR will be used.

    Now how do the .cmd file change in that case as first the check sum routine within OTP will get executed and then application code within NOR flash will get executed and both will have .cinit, .const, .text etc.

    We have never done such thing and so I am confused with this.

    Please help.
  • I wait for our reply patiently...
  • If I am not understood kindly let me know, I can again explain my case
  • Mohit,

    we don't have such a specific example I believe. I would develop two independent apps, test and then modify the boot loader to sequence the two apps.

    Some work to do...

    Regards,

  • I mean how will that sequencing be done in .cmd file, if you could give some idea?

    Thanks for the reply... It would be great if you could help me in this...
  • Again, if you develop two independent apps there is no sequencing at that level. linker.cmd file is as needed setting your code to run from whatever memory you want. Once app1 is done set a flag in memory, do a SW reset. Then the boot laoder has to find the flag and now boot app2 instead of app1. But of course there are other ways to do this...
  • Kindly suggest other ways as well. I have understood what you are saying that develop two applications as per requirement and then sequence the two applications having their individual linker files. The sequencing can be through a SW reset and a flag that will not be reset even though SW reset has occurred.

    But here there is a catch, once you say booting twice, then My both the devices are XIP devices and booting through XIP means through device on CSn0. My OTP will be connected on CSn0 and the NOR Flash be connected on CSn1. Can I do booting twice? Am I confused somewhere?
  • When you say:-

    Then the boot laoder has to find the flag and now boot app2 instead of app1. But of course there are other ways to do this...

    This means after reset again the boot loader runs on XIP but it will never run on CSn1.

    Please reply as you find time..
  • Hi Walzer,

    we wait for your valuable revert on this. Please find time...

    Regards.