TMS320F28388D: How can I convert RAM-based project to FLASH-based one?

Part Number: TMS320F28388D
Other Parts Discussed in Thread: TMDSCNCD28388D, TMDSHSECDOCK, C2000WARE

Hi support team,

I have a working ram-based project on cpu1. Now I want to convert it into flash-based one.

Could you help me on that? If you could provide detailed procedure of it that would be great helpful for me.

FYI, I have installed C2000Ware 6.00.00.00 and CCS 20.2.0 on my windows laptop. I use the TMDSCNCD28388D version MCU063B-003 and TMDSHSECDOCK controlCARD Docking Station rev F boards for my testing. 

If you need more information from my side, please let me know.

Looking forward to your response.

Best regards,

Lin

 

  • For more info, I modified the flash linker file. When InitFlash() is called, it get unresolved symbol error. Then I find Flash_initModule(uint32_t ctrlBase, uint32_t eccBase, uint16_t waitstates);. However don't know how to set the parameters. Or do I need to call that function?

  • Hi Lin,

    Have you defined _FLASH in your pre-defined symbols in project properties?

    Regards,

    Ira

  • Hi Ira,

    Thanks for your reply.

    Yes, after changing the Build Configuration from CPU1_RAM to CPU1_FLASH, I found the _FLASH under the predefined symbols as shown below.

    Do I need to add some code in my project to do the conversion?

    Regards,

    Lin

  • Hi Ira,

    Here is an update. Now Code runs after Flashing from CCS, but does NOT run after power-cycle. could you help me on that?

    Thanks,

    Lin

  • Hi Lin,

    Here are a few questions that would help me understand your issue better

    1. What boot mode are you using? You can find this from the "BOOT" switch on your Control Card. Make sure you are in "Boot from Flash" mode before you Power Cycle.

    2. In your flash linker, does BEGIN live in a valid Flash memory location?

    3. In the Flash linker, is codestart mapped to Flash and not RAM? Your linker should say something like "codestart : > BEGIN " in the SECTIONS{} part.

    4. Also in the Flash linker make sure that .text is entirely in Flash and make sure that only the Flash linker is active when you use the Flash Build.

    5. If it still does not work, you can try adding SysCtl_disableWatchdog(); right when you enter the main() function. (This should most likely not be the issue but you can try it in case)

    Thanks,

    Ira

  • Hi Ira,

    Thanks for your reply and all the questions. Below is my answers.

    1) I set the S1:A - position 1 to OFF or left in Boot from Flash mode.

    2) In the flash liker: BEGIN            : origin = 0x080000, length = 0x000002

    3) codestart           : > BEGIN, ALIGN(8)

    4) .text               : >> FLASH1 | FLASH2 | FLASH3 | FLASH4, ALIGN(8)

    5) I tried that, but same results.

    Do you think I missed anything else?

    Regards,

    Lin

  • Hi Ira,

    One more update.

    After I set the S1:A -1 to OFF or left, when I right click ProjectName and choose Flash Project, I get following error: IcePick_C_0: Error connecting to the target: (Error -2131 @ 0x0) Unable to access device register. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 20.2.0.3536)

    If I set S1:A -1 to ON, then I can Flash Project without any error.

    Is there anything wrong in my CCS setting or on the hardware board?

    Regards,

    Lin

  • Hi Lin,

    When you set S1:A to ON are you able to Flash wihout any error even after power cycle?

    Can you try putting S1 to OFF and S2 to ON to enter wait boot mode and try?

    Thanks and Regards,

    Ira

  • Hi Ira,

    I tried to set S1:A to on, still can flash the board. Also S1 to OFF and S2 to ON, no lucky to make it work.

    Do you have the TMDSCNCD28388D version MCU063B-003 and TMDSHSECDOCK controlCARD Docking Station rev F boards at hand so that you can duplicate my test?

    I created a simple led toggle project for testing, it is not working at all.

    Thanks,

    Lin

  • Hi Lin,

    I am sorry for the late reply. I do not have your hardware handy in office right now. Can we schedule a meeting to resolve this issue?

    Thanks and Regards,

    Ira

  • Hi Ira, 

    yes, please let's have a meeting to handle it.

    Thanks,

    Lin

  • Hi Lin,

    Connected with you on email for a meeting.

    Thanks and Regards,

    Ira

  • replied to your email.

  • Lin, 

    Can you refer to https://www.ti.com/lit/ug/spruil8b/spruil8b.pdf for more information on how to configure the pins on your board.

    The other thing I'll suggest you do is import a Flash based empty project example from C2000Ware. Migrate all your project files to this new project. Merge any custom linker command file settings to the flash based linker command file. As Ira previously mentioned, make sure you are specifying the correct entry point.

    The other thing you'll need to ensure is that you have the f2838x_codestartbranch.asm file included in your project. This is required as it maps the codestart section of memory to your code. This will allow the bootROM to re-direct code to this point.

  • Hello,

    I do follow the instruction to set the switch on the control card. However, it doesn't help to resolve the issue. I wonder the instruction in the document is not correct. Could you verify it on your side with the same hardware I have here?

    It has been a long time. I do hope some one could help to resolve it.

    Thanks,

    Lin

  • Can you try to import one of the examples on C2000Ware and confirm if the Blinky examples works in standalone boot from flash mode. This should rule out any potential hardware issues.