This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Loading all of a program into RAM (ADuC702x)

Hi!

Is there a capability to compile and load all of a program into RAM (not only some functions with __ram keyword)? Can such a program be loaded with the help of JTAG emulator? We also intend to write a loader for loading programs into RAM through UART. This loader will be stored in FLASH memory. Is this intention realizable? Can someone advice us?

We use ADuC207x controllers and Keil uVision3 with C ARM compiler V2.42.

Thanks,
Dr. Yury Tychinsky.

Parents
  • I don't know about your specific chip, but have you looked into the interrupt vector table location? Does your chip has a setting to switch the interrupt vector table between flash and RAM? If your program is linked for running in RAM, and has it's vector table configured in RAM, but the ARM chip makes use of the bootloader vector table in flash, then your program will not work.

    When you load an application into RAM using the JTAG interface, the JTAG interface will perform the "jump" to the start address for you. When loading the app into flash, the JTAG interface normally loads a tiny application into RAM, and then let this little application perform the flash sector programming. Either fully manually, or - if the chip has a built-in "bios" - calls available IAP routines to erase and program the sectors.

    As long as there isn't a problem with the interrupt vectors, it's quite easy to write a boot loader that loads an application into RAM, and then jumps to a predefined start address (or that gets the start address together with the binary/hex data).

Reply
  • I don't know about your specific chip, but have you looked into the interrupt vector table location? Does your chip has a setting to switch the interrupt vector table between flash and RAM? If your program is linked for running in RAM, and has it's vector table configured in RAM, but the ARM chip makes use of the bootloader vector table in flash, then your program will not work.

    When you load an application into RAM using the JTAG interface, the JTAG interface will perform the "jump" to the start address for you. When loading the app into flash, the JTAG interface normally loads a tiny application into RAM, and then let this little application perform the flash sector programming. Either fully manually, or - if the chip has a built-in "bios" - calls available IAP routines to erase and program the sectors.

    As long as there isn't a problem with the interrupt vectors, it's quite easy to write a boot loader that loads an application into RAM, and then jumps to a predefined start address (or that gets the start address together with the binary/hex data).

Children
  • How this program can be loaded into RAM?

    Basically three methods:
    - Use the JTAG interface to download and then jump to the start address.
    - Use the built-in (if existing) ISP monitor to download and then jump to the start address.
    - Write your own boot loader that listens on a communications device and downloads and then jumps to the start address.

    Make sure that the boot loader - or your application startup code - preconfigures the chip for running a RAM-based application, potentially reconfiguring memory mappings of memory controller.

  • We have linked a program for RAM. Now we try to download the program into RAM with the help of JTAG. But uVision3 doesn't download. It say: No algorithm found for programming. There are only FLASH-programming algorithms in the uVision3, no one for RAM.

    Does special algorithm required for RAM programming or uVision3 can download a program directly? Where we can obtain such algorithm?

    Thanks.

  • No flash download algorithm should be needed if your project is correctly configured. The download algorithm is a little program that is downloaded into RAM and uses IAP to program blocks of RAM data to the flash. With a correctly configured project, there will be no need for a flash algorithm, since no data needs to be programmed using IAP.

  • We have loaded the program into RAM and started it!

    The mistake was in using "Load" button of uVision3 toolbar. It requires programming algorithm.

    When we run "LOAD file.hex" from uVision3 command line, then JTAG has loaded the program correctly.

    Thank you very mutch!