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/RM41L232: CCS Release version loading problem

Part Number: RM41L232
Other Parts Discussed in Thread: UNIFLASH

Tool/software: Code Composer Studio

Hi all,

We are trying to load the release FW version in a RM41L232 microcontroller using CCS and we are having problems with it. We are using the XDS200 USB programmer, we have generated the hex or out files with the code composer and load them with the UNIFLASH program version 4.3.1 but unsuccessfully. When we load the release version it does not give any fault in the programming or in the verification but the equipment does not do anything (not a simple blink of a led). Could you give us any idea of where the fault is? If you need more information please request us anything.

Best regards

  • To have another reference point, does the same program (.out) run as expected when loaded using CCS?

  • The (.out) and the (.hex) do the same thing, when uploaded the system remains inoperative.

  • You state that the "release" version does not work correctly when programmed. Do you also have a "Debug" version of this firmware? Does that version work correctly? What are the optimization levels that are different between the "Debug" and the "Release" versions?

    I have seen experienced that an increased optimization level is used for the "Release" version, which causes the compiler to optimize out some code.
  • Marcos Martinez said:
    The (.out) and the (.hex) do the same thing, when uploaded the system remains inoperative.

    We need to isolate if the issue is with the tool (Uniflash) or the firmware code. To that end I was asking whether you are able to load and run the code successfully using CCS instead of Uniflash (to help isolate if the issue is specific to Uniflash).

    And as Sunil suggested, are you able to load and run the "Debug" version of the firmware code successfully? How about other programs? 

  • Hi AartiG,

    If we load the Debug version with CCS it works OK, but we have been not able to make a (.hex) and load it with Uniflash succesfully. We don't have any other program to load with Uniflash and try, do you have a simple test program to try loading it?
  • Hi Sunil,

    We actually have a Debug version and it works OK loading it with CCS but we want to load the final version. We have not implemented any optimization, we have just create (.hex) file and try to load it with Uniflash but it doesn't work.
  • Marcos Martinez said:
    If we load the Debug version with CCS it works OK, but we have been not able to make a (.hex) and load it with Uniflash succesfully.

    How about if you load the .out file (instead of .hex file) using Uniflash? Does that work? If it works, then the issue could be in the hex conversion process.

    Marcos Martinez said:
    We don't have any other program to load with Uniflash and try, do you have a simple test program to try loading it?

    Sunil, do you have a known good example program for this target device that they could try with Uniflash?

  • Marcos,

    Can you please upload the CCS project that you are using to try to blink the LED? I can look at the configuration options and see if a compiler optimization is causing the pin toggle code to be optimized out.

    Aarti,

    The issue is not with loading / verifying the code with CCS or Uniflash. It is just that the code does not do what is expected after programming.

    The difference is between the "Debug" and the "Release" versions of the compiled output. Do you know what optimization levels are automatically enabled when going from "Debug" to "Release" configurations in a given CCS project?

    Regards, Sunil

  • Sunil Oak said:
    Do you know what optimization levels are automatically enabled when going from "Debug" to "Release" configurations in a given CCS project?

    That depends entirely on the project as the options are fully customizable. However, for a default Cortex R project created using the CCS New Project wizard, the "Debug" configuration has no optimization and "Release" has -o2 optimization.

  • The (.out) file doesn't work with Uniflash either , both do the same thing, Uniflash doesn't show any error when uploading the image but after that the system doesn't respond.
    It would be fine as you commented if anyone could share a know working program and load it with Uniflash to test it.
  • It is true that the optimization level was set to "2-Global optimization" but I have changed it to "Off" and generate again the (.hex) file. I have loaded it with Uniflash and the result is the same, the system remains inactive as if it had not been started the program.
  • Hi Marcos,

    Can you connect a debugger to see if the code you desire is part of the executable code or not? What part of the code is the execution lost in? Is it a simple test to blink an LED? Can you upload this CCS project so I can take a look? How about pasting just the main() function which includes the code that is not being executed? I will create a sample test case to blink an LED as well, but that may not help you much.

    Regards,
    Sunil

  • Hi Sunil and AartiG,

    We have been able to succesfully load the release code with Uniflash but with (.out) file extension instead of (.hex). If we load the (.hex) file the system remains inoperative as before. There are too much difference between file sizes, (.out) is 600KB and (.hex) is 70KB so I don't know if the problem could be related to the wrong file generation.

    The problem has been solved then and the case can be closed, thank you so much for your support and help.

    Best regards
  • Hi Marcos,

    That's good to hear. Did you use the CCS built-in post-compile command to generate the .hex file? Can you post the actual command that was used to create the .hex file? The tools' team can look into any issues in generating the .hex from .out.

    Regards,
    Sunil
  • Hi Sunil,

    We generate the (.hex) file enabling the ARM Hex Utility (right click in project folder - properties) in release version.

    Best regards

  • Marcos Martinez said:
    We generate the (.hex) file enabling the ARM Hex Utility (right click in project folder - properties) in release version.

    I suspect the options used with the hex utility may not be the ideal choices.

    Since hex options are driven by the device and desired output format/hex programmer I can't tell what the exact options should be. But if you post the hex command you are using (it should be shown in the CCS build console) I could check to see if something obvious stands out. 

  • Hi AartiG,

    ARM Hex Utility is set by default, when enabled lines are:
    Command: "${CG_TOOL_HEX}"
    Command-line pattern: ${command} ${flags} ${output_flag} ${output} ${inputs}

    Output format tab inside "Output Format Options" part is blank so nothing is selected
  • Marcos,

    Depending on the output format and other options selected, the output of the hex utility will be a single hex file or multiple hex files. If multiple files are generated but you are only programming one of them using the flash programmer then it will not function correctly.

    When the "Output format" option is left blank, it defaults to Extended Tektronix format. For this format, the default romwidth is 8. Since the default memwidth for Cortex ARM device is 32, not specifying any options will result in 4 output hex files. To generate a single file, specify the romwidth option to be 32.

    Please see this article for more information.

    Also the Hex Conversion Utility chapter in the ARM Assembly Language Tools Users Guide has details on the different hex formats and other options supported by the hex utility. Hope this helps.

  • Thank you AartiG, we will check this and if we have any doubt we will write you again.