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.

TMS470R1B1M Flashloader Issue

Other Parts Discussed in Thread: TMS470R1B1M

I have an older project that I need to make some modifications but I am encountering issues flashing the image using the J-Trace probe.

The flashloader appears to download correctly but stops after this point.  This is a blank processor so the protection keys are all 1s or not secured.

Here is the debug output:

Fri Jan 08 10:04:04 2016: Loaded macro file: C:\Projects\scs150\MemoryConfig\FlashTMS470R1B1M.mac
Fri Jan 08 10:04:04 2016: Logging to file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 4.0\arm\cspycomm.log
Fri Jan 08 10:04:04 2016: DLL version: V3.72a, compiled Jun 18 2007 18:58:11
Fri Jan 08 10:04:04 2016: Firmware: J-Link ARM V6 compiled Jun 20 2012 19:43:26
Fri Jan 08 10:04:04 2016: JTAG speed is initially set to: 32 kHz
Fri Jan 08 10:04:04 2016: Software reset was performed
Fri Jan 08 10:04:04 2016: Initial reset was performed
Fri Jan 08 10:04:04 2016: J-Link found 1 JTAG device. ARM core Id: 3100E02F(ARM7)
Fri Jan 08 10:04:04 2016: Device at TAP0 selected
Fri Jan 08 10:04:04 2016: execUserFlashInit
Fri Jan 08 10:04:04 2016: Executing memory setup macro B1M Flash
Fri Jan 08 10:04:05 2016: RTCK is not connected
Fri Jan 08 10:04:05 2016: Auto JTAG speed: 8000 kHz
Fri Jan 08 10:04:05 2016: 5494 bytes downloaded and verified (11.46 Kbytes/sec)
Fri Jan 08 10:04:05 2016: Loaded debugee: C:\Projects\scs150\MemoryConfig\FlashTMS470R1B1M.d79
Fri Jan 08 10:04:05 2016: Target reset
Fri Jan 08 10:05:06 2016: Debug session aborted.

The MAC file is mostly like the default with the addition of memory select 5 (external).  Here is the MAC file:

PrepareMemory( )

{
__message "Executing memory setup macro B1M Flash\n";

__emulatorStatusCheckOnRead(0);


/* disable illegal address reset */
__writeMemory32( 0x00004007, 0xffffffe0, "Memory" ) ; // SYSECR

/* set memory select 0 block size to 1M */
__writeMemory32( 0x000000B0, 0xfffffe04, "Memory" ) ; // MFBALR0
__writeMemory32( 0x00000000, 0xfffffe00, "Memory"); // MFBAHR0

/* activate RAM at 0x00000000 0k that is connected to memory select 1 */
__writeMemory32(0x00000000, 0xfffffe08, "Memory"); // MFBALR1
__writeMemory32(0x00000000, 0xfffffe0c, "Memory"); // MFBAHR1


/* activate RAM at 0x00400000 32k that is connected to memory select 2 */
__writeMemory32( 0x00000040, 0xfffffe10, "Memory" ) ; // MFBAHR2
__writeMemory32( 0x00000070, 0xfffffe14, "Memory" ) ; // MFBALR2

/* activate RAM at 0x00000000 0k that is connected to memory select 3 */
__writeMemory32( 0x00000000, 0xfffffe18, "Memory" ) ; // MFBAHR3
__writeMemory32( 0x00000000, 0xfffffe1c, "Memory" ) ; // MFBALR3 0K


/* activate HET RAM at 0x00800000 1k that is connected to memory select 4 */
__writeMemory32( 0x00000080, 0xfffffe20, "Memory" ) ; // MFBAHR4
__writeMemory32( 0x00000020, 0xfffffe24, "Memory" ) ; // MFBALR4

/* activate External RAM at 0x00500000 2M that is connected to memory select 5
__writeMemory32( 0x00000050, 0xfffffe40, "Memory" ) ; // MCBAHR2 Added by RB for SCS150
__writeMemory32( 0x00000070, 0xfffffe44, "Memory" ) ; // MCBALR2
__writeMemory32( 0x00000034, 0xfffffd14, "Memory" ) ; // SMCR5 */

/* activate new mapping by writing 1 to MFBALR0.8 */
__writeMemory32( 0x000001B0, 0xfffffe04, "Memory" ) ; // MFBALR0

__writeMemory32(0x80000000, 0xfffff724, "Memory");

// Only need when keys are modified

//__writeMemory32(0xFFFFFFFF, 0xfffff700, "Memory");
//__writeMemory32(0xFFFFFFFF, 0xfffff704, "Memory");
//__writeMemory32(0xFFFFFFFF, 0xfffff708, "Memory");
//__writeMemory32(0xFFFFFFFF, 0xfffff70c, "Memory");

__readMemory32(0x0000ffe0, "Memory");
__readMemory32(0x0000ffe4, "Memory");
__readMemory32(0x0000ffe8, "Memory");
__readMemory32(0x0000ffec, "Memory");

__emulatorStatusCheckOnRead(1);

__writeMemory32( 0x00000003, 0xffffffdc, "Memory" ) ; // GCR SYSCLK *8 and /4 = SYSCLK /1
}


execUserFlashInit( )
{
__message "execUserFlashInit\n" ;


PrepareMemory( ) ;
}

execUserReset( )
{
__message "execUserReset\n" ;
PrepareMemory( ) ;
}

Any ideas on how to troubleshoot this issue?

Thank you.

  • David,

    No but maybe something changed in the J-LINK firmware?  Looks like you may have the original environment on the host (circa 2007) but your firmware is coming back as circa (2012) so maybe something changed in the 5 yrs between the two?

    -Anthony

  • In the IAR 442A Options - Debugger, I am specifying a macro file to use but it appears to still be using the default macro file from the tools directory. I am now have the flashloader (FlashTMS470R1B1M.d79), FlashTMS470R1B1M.mac and RAMTMS470R1B1M.mac in the same directory.

    After doing that it also appears that the key protection keys were set so I am now setting the MSM registers to all 1s (FlashTMS470R1B1M.mac). I am now able to load the flash.

    It is now running after loading the flash but I now appear to have an issue with the symbol tables. I am generating the d79 and sim files so I think I am generating the correct stuff. When I break in IDE, I get the assembly statement but not the C and I cannot place breakpoints on C statements. So I am starting to work on this issue now.
  • Anthony,
    Experimenting with the mac file and the flashloader, David was able to get IAR to work in debug mode a few times with IAR. It would take several attempts in a row but would eventually start. Once he got to that point he could get it started for a day. After a day, it stopped working again.

    He cannot find any documentation or examples on using MSM or protection keys with mac files and flash loaders.

    Do you have any information about this?
  • Dan,

    Just what's on the web. If you don't mind -- why the choice of the TMS470R1B1M which has been NRND for years as opposed to one of the active / replacement devices like TMS470M or TMS570? There is significantly better support for the TMS470M / TMS570.
  • Anthony,
    I believe it's an old design. Troubleshooting an issue with it.
    Any ideas why IAR is no longer working with it?
    Thanks,
    Dan
  • Dan, No, I have never used this set of tools/device.
    What is actually the problem. I see the trace saying
    Fri Jan 08 10:05:06 2016: Debug session aborted.
    but that doesn't give much of a clue. Is the line above mentioning reset normal or abnormal?

    I should also add - has anyone checked w. IAR and / or Segger about the .dll w. a stamp of 2007 and compatibility w. a JLINK firmware stamp of 2012?  That's another point in the output that strikes me a suspicious since a lot can change in 5 yrs.

     

  • Hi Dan,

    Just wanted to follow up to see how this issue is progressing and whether we should close the thread.