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.

CCS/TMS320C28345: 8.2

Part Number: TMS320C28345

Tool/software: Code Composer Studio

I download my out file from JTAG and it runs very well. However I download it from SCI by boot rom it goes into illegal ISR and reset repeatly.

The same out file produces the different result. Is there any differences between the two operations?

who can tell me the reason?

Wait for the reply eagerly!

THANK YOU!

  • Due to US holidays, you can expect a response by 3'rd Dec.

  • Hello

    Make sure your application entry point in your project (and project properties) are setup correctly.

    You can set a breakpoint in CCS where you expect the bootloader to jump to in order to verify that it's starting at the correct address.

    Best regards

    Chris

  • Christopher Chiarella said:

    Hello

    Make sure your application entry point in your project (and project properties) are setup correctly.

    You can set a breakpoint in CCS where you expect the bootloader to jump to in order to verify that it's starting at the correct address.

    Best regards

    Chris

    Hello

    Thank you for your reply! I have tested the project, it can jump at the correct address and run normally in the beginning, but it reset in the middle somewhere. I need to mend some code while it always reset by more and more illegal ISR.  However, these lines are correct by JTAG download way, I wonder the difference between the JTAG and SCI boot room ways. Maybe the key is the difference.

    Thand you!

  • Hello

    In that case, make sure you are initializing variables properly and not expecting certain values to be zero or something to that effect. Also make sure that your entry point is going to where c_init() is and not main(). If you are using "code_start" file, then this should already be the case.

    If you load and run via JTAG, CCS will typically take you directly to main() bypassing the c_init() function which initializes certain static values, arrays, etc

    Best regards

    Chris

  • Christopher Chiarella said:

    Hello

    In that case, make sure you are initializing variables properly and not expecting certain values to be zero or something to that effect. Also make sure that your entry point is going to where c_init() is and not main(). If you are using "code_start" file, then this should already be the case.

    If you load and run via JTAG, CCS will typically take you directly to main() bypassing the c_init() function which initializes certain static values, arrays, etc

    Best regards

    Chris

    Hello

    Thank you for your reply! I meant that it can run properly with power reset everytime after removing JTAG plug. And it always run without anything wrong. But I download the out file in the "Debug" folder via the C2Prog tool with SCI, it always reset. Then I set PC to initBoot it can jump to _cint00 and main(), but it always reset, I suppose that it goes into the illegal ISR and the watchdog reset the board. I wonder why, and it's so weird!

    Looking forward for solving my problem! Thank you!

    Yukie

  • Hello

    If you do a memory dump of the application when you load it via JTAG versus when you load it via C2Prog+SCI, do they match?

    Can you see the illegal ISR get triggered when stepping through with debugger connected?

    Best regards

    Chris

  • Christopher Chiarella said:

    Hello

    If you do a memory dump of the application when you load it via JTAG versus when you load it via C2Prog+SCI, do they match?

    Can you see the illegal ISR get triggered when stepping through with debugger connected?

    Best regards

    Chris

    Hello

    Thanks for your reply again!

    Without JTAG connectted,it could jump to main() because I can receive some characters through UART during the initialzition in the begenning. I'm sure it jumpped successfully, But I receive the characters send in initialization repeatedly. They are supposed to be received once in the begginning.So I supposed that it reset for something wrong. When I change some code ( for example, exchange pointers to registers with registers themselves and so on ) it can run forward but it always reset in the middle somewhere.  It seems that there's lots of bugs which make it to illegal ISR. And with no JTAG, it very inconvenient to get the reset location. I nearly go crazy to get the endless reset locations and change the code in another way. However it can run properly in JTAG download way. Probably there's something wrong for other reasons.

    The C2Prog is well because I download another small out file for test to the same chip and it can run properly.

    Best wishes!

    Yukie

  • Hello

    You could put an infinite loop at the start of your main(), send the application over and boot (no JTAG). Then use your target configuration file to connect to the device (however, under advanced settings of the target config, select the CPU and delete the path to the init GEL script, then save). This way you can connect to the device without the GEL resetting it. Then once connected, you can load symbols using your application OUT file and then step through (starting from that infinite loop location). This may help you figure out where something is going wrong.

    Best regards

    Chris

  • Christopher Chiarella said:

    Hello

    You could put an infinite loop at the start of your main(), send the application over and boot (no JTAG). Then use your target configuration file to connect to the device (however, under advanced settings of the target config, select the CPU and delete the path to the init GEL script, then save). This way you can connect to the device without the GEL resetting it. Then once connected, you can load symbols using your application OUT file and then step through (starting from that infinite loop location). This may help you figure out where something is going wrong.

    Best regards

    Chris

    Hello

    Thank you very much for your guide of the emulation! I found one problem that a breakpoint in one function cannot be reached by F8 (resume) and it will reset. However it can be reached by F5 and with no reset. I have no idea to solve such a problem.

    I wonder if there's something wrong with the configuration of the project of coff file to match the SCI loading. The gel file will config the CPU on the beginning of connection of JTAG. But the pull up the JTAG and reset the power, my code runs normally. I don't think there's wrong with the code. I wonder if there's something difference configuration between JTAG and SCI boot ROM download.

    Best wishes!

    Yukie  

  • Hello

    If you're seeing a reset when you use "resume" vs when you are stepping through the code, typically that means the watchdog is timing out. Is watchdog enabled? If so, try disabling it and see if that eliminates your issue.

    You can do the memory dump to compare if there is something different between the JTAG and SCI image.

    Best regards

    Chris

  • Christopher Chiarella said:

    Hello

    If you're seeing a reset when you use "resume" vs when you are stepping through the code, typically that means the watchdog is timing out. Is watchdog enabled? If so, try disabling it and see if that eliminates your issue.

    You can do the memory dump to compare if there is something different between the JTAG and SCI image.

    Best regards

    Chris

    Hello

    Thank you for your advise! It seems to see the hope!

    I found that the codes of .econst section are not written correctly. They are all in map file. But this part is 0xFF. But from  JTAG these codes in these addresses are all right. I add .const section in my cmd file. But it's useless. I feel puzzled.

    Furthermore, could you tell me how to do the memory dump. Thank you!

    Best withes!

    Yukie

  • Hello

    If you can, please attach screenshot of your constants as well as attach the linker command file. Also, what compiler version are you using?

    For the memory dump, in CCS, go to View->Memory Browser and then in the top right of that window, find the save button. Here you can specific the start address and length. The length is number of words, make sure to use decimal not HEX values.

    Best regards

    Chris

  • Christopher Chiarella said:

    Hello

    If you can, please attach screenshot of your constants as well as attach the linker command file. Also, what compiler version are you using?

    For the memory dump, in CCS, go to View->Memory Browser and then in the top right of that window, find the save button. Here you can specific the start address and length. The length is number of words, make sure to use decimal not HEX values.

    Best regards

    Chris

    Hello

    Thank you for your help! I can do the memory dump!

    Yesterday I set the breakpoint in the function "setState", and found that the structrue newcommunicationstate was not initilized correctly. Then I checked it in the Disassembly window. It seemed that the initialization value was set at 0x3334cc which is shown in pic1.Then I checked this address and it was filled with 0xFFFF which should be 01 00 00 00 00 00 00 in pic2.Then I found that from the address 0x3334BF in the memory  there were all filled with 0xFF. This part is the begining of codestartbrach file. And I attach the cmd, map,out files and other pictures in the file.rar at the end.

    Best wishes!

    Yukie

    5773.file.rar

  • Hello

    Thank you for sharing!

    When you load the application via the ROM SCI bootloader, are you first transferring a flash kernel application? The ROM bootloaders don't program flash, only write the application to RAM. If you are transferring the application you shared expecting the ROM bootloader to program it to flash, that won't happen.

    Best regards

    Chris

  • Christopher Chiarella said:

    Hello

    Thank you for sharing!

    When you load the application via the ROM SCI bootloader, are you first transferring a flash kernel application? The ROM bootloaders don't program flash, only write the application to RAM. If you are transferring the application you shared expecting the ROM bootloader to program it to flash, that won't happen.

    Best regards

    Chris

    Hello

    Thank you for your advice! I will check that but I still feel confused about that not all of my codes are lost but only part of them are 0xFF from 0x3334BF. If the ROM SCI bootloader only write the application to RAM, all of the code will not be programmed to the flash.Am I right?

    Best Wishes!

    Yukie

  • Hello

    The flash likely contains the code you flashed via JTAG previously before attempting the SCI loader.

    Best regards

    Chris

  • Christopher Chiarella said:

    Hello

    The flash likely contains the code you flashed via JTAG previously before attempting the SCI loader.

    Best regards

    Chris

    Hello

    Thanks for your reply!

    This is not the first time I write a app to flash. I have downloaded one small app to FLASHA and successed. While I surely not very familiar with the boot Rom program. If the C2prog only write the app to the RAM, why parts of the flash was erased. Can you tell me how to program app to flash with sci boot rom? Thank you!

    Best wishes!

    Yukie

  • Christopher Chiarella said:

    Hello

    The flash likely contains the code you flashed via JTAG previously before attempting the SCI loader.

    Best regards

    Chris

    Hello

    I have resolved my questrion by myself! Thank you all the same! There's something wrong with my cmd file.

    Best regards!

    Yukie