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.

RM48L952 GPIO + Flash project request.

Other Parts Discussed in Thread: HALCOGEN, UNIFLASH

Hello,

I have successfully used the gpio example projects for the RM48L952ZWTT on the Hercules dev kit.

However, that project is running in the Flash memory space. I am an amateur with linker and command files, and am having trouble converting it to the RAM space. Every basic project I generate from HALCoGen downloads to the Flash memory.

My goal is once I convert the .out file to a motorola file format I want the entry address and entry vector to be in the RAM memory.

Does anyone have an example project that perhaps initializes/toggles gpio and touches the flash (erase/program) from the RAM after downloading?

This would make my life easier.

Regards,

Fernando Guillen

  • I am concerned that without knowing your end goal, I might give you bad advice. You can change where the code is loaded in the link command file, but you cannot change the location of the vectors. If you  need code that is programmed into flash and then loaded into RAM to run, such as a bootloader, then that is also controlled in the link command file. Section 3 of the Assembly Language User's Guide explains load and run addresses. Section 8.5 describes linker command files.

    You can also swap the FLASH and RAM memory locations. This puts the exception vectors in RAM. You will still need to change the link command file so that the RAM variables in your program are not then mapped to flash. The memories go back to their normal addresses after a power-on reset. This is described in the TRM in section 2.5.1.42.

  • Hi Bob,

    Thanks for the information. The end goal is to develop an algorithm that will handshake with our 3rd party programmer to be able to erase/program/verify the contents of the flash with a mutual customer's data pattern. The main point is I cannot put any bootloader information in the Flash because it is eventually going to be erased and reprogrammed with our algorithm.
    So our standard method with other ARM Cortex devices is to download the bootcode generated with IAR or CCS to the RAM via jtag or SWD and then just run that bootcode.
    Which is why I can't use the flash memory for any of the variables, vectors, etc...

    I'll read up in the TRM and SPNU118O. I know I need to read SPNU118O, but it's just a lot of information to digest.
    Let me know if you need any more information regarding my end goal.

    Thanks,
    Fernando Guillen
  • That is what we do in our flash programmer (UniFlash and CCS), the code is loaded into RAM by JTAG and then the PC is modified to point to the start of the routine in RAM. We do not use interrupts or reset to do the flash programming.
  • Thanks for the help Bob.
    I ended up working with Dave Livingston to get a working project as we are in a time crunch.
    I wanted to load into the RAM and then point to it, wasn't trying to use interrupts or reset. My issue was that any time I changed the command linker and configuration to point to RAM I had issues compiling. Dave created a configuration for me so that the bootcode output is in Motorola format and at address 0x08000000, which I could then convert into a hex file than download via IcePick JTAG. Once I had that GPIO project I added the F021 Flash API into the project.
    Now I have a project/bootcode that can communicate with our programmer and algorithm over the gpio and erase/write/read the flash. Just working on optimizing the speeds of communication and various operations.

    Thanks again,
    Fernando