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.

How to load the program? (UART)

Other Parts Discussed in Thread: AM4378

I have:

- CCS 6.1.3

- SMARC-T4378 Embedian with TI Sitara AM4378

- ti-processor-sdk-rtos-am437x-evm-02.00.02.11

I have created project from TI Resource Explorer SYS/BIOS typical_AM4378_CortexA.

Build the project: typical_AM4378_CortexA.out

I've used Connection: Data Snapshot Viewer AM4378, Uart Communication, ComPort Cortex_M3 CPU, Port COM5 115200, 8, no, 1.

I can not load the program to the AM4378, I get an error:

CortexA9: Trouble Writing Memory Block at 0x80000000 on Page 0 of Length 0x40: This operation is not supported by this driver

CortexA9: File Loader: Verification failed: Target failed to write 0x80000000
CortexA9: GEL: File: C:\workspace_v6_1_3\typical_AM4378_CortexA\Debug\typical_AM4378_CortexA.out: Load failed.

How to load the program? Please, help.

  • Looks like it is unable to load vector table into DRAM. Have you initialized DRAM in boot loader?
  • Have you initialized DRAM in boot loader?

    I am newbie.  Please, explain step by step.

  • OK. For TI AMxxxx serial SoC, the memory addressing space after 0x80000000 is used for DRAM (DDR2, 3 ...). The CPU has DRAM controller but it needs to be initialized so that it can know the external DRAM configuration. And the initialisation is usually done in the boot loader.

    Since you are newbie, you may now know the boot process very clear. Here is the basic concept.
    Power up --> ROM boot loader (RBL) --> User boot loader (UBL) --> Main program

    After powering up, RBL will try to load UBL from some sources depends on some pinout settings at boot. For example, the external SPI NOR flash, SD card, UART port, USB port, Ethernet, or internal flash memory. This will vary depends on SoC to SoC model. For AM437x, you can look at TRM page 175 for details.

    If a valid UBL image is found then RBL will load it into internal SRAM and jump to UBL's entry point. Now, UBL is running. UBL is designed by you or someone else. UBL should initialise necessary peripherals such as DRAM and then load main program from external SPI NOR flash or SD card... to DRAM. After that, it should jump to main program's entry point. Now, your main program will get executed.

    Please note that RBL is also called "ROM Code". There is a famous UBL program called U-Boot which can be used to load Linux kernel to DRAM. So, if you are using Linux then you could reply on U-Boot. But it is a little "fat" and I don't like it at all. I prefer to design my own UBL.

    If you are not using U-Boot and Linux. You have a simple program and just want to get it run on target. OK, you can load it into internal SRAM. According to datasheet, there is 256KB SRAM on-chip. You can load a small program to SRAM by JTAG debugger. For this to work, you also have to change the memory map definition of the linker command file.