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.

TMS320F28388D: global variables

Part Number: TMS320F28388D

Hi,

I am using TMS320F28388D controller, C2000 compiler 18.3.1.LTS.

I want to reduce the time taken for auto-initialization which is performed in ROM model.

can we reduce auto initialization for global variables for these below, if so how ?

Eg:

#pragma DATA_SECTION(NmiIntruptRegs,"NmiIntruptRegsFile");
volatile struct NMI_INTRUPT_REGS NmiIntruptRegs;

Regards,

Nagesh

  • Hi Nagesh,

    Please refer this link for the option.

    Regards,

    Vivek Singh

  • Hi Vivek, 

    i am using compiler version : TI v18.1.3.LTS

    the compiler flags are as below

    -v28 -ml -mt --float_support=fpu32 -Ooff --include_path="C:/Users/E537053/Documents/GBL_DCPBA/GBL_F28388D" --include_path="C:/ti/ti-cgt-c2000_18.1.3.LTS/include" --advice:performance=all -g --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --zero_init=off

    but after compiling i do get a warning as --zero_init=off is ignored what could be causing the compiler to ignore this flag.

    <Linking>
    >> WARNING: invalid compiler option --zero_init=off (ignored)
    warning #10063-D: entry-point symbol other than "_c_int00" specified: "code_start"
    Finished building target: "GBL_F28388D.out"

    thanks,

    Nagesh

  • Nagesh,

    Moving it to compiler team to help.

    Regards,

    Vivek Singh

  • Hi Vivek, 

    Thank you, its a linker command flag, i moved it there and the warning went.

    also, I would like to know can I update the coestartbranch.asm file to disable the external watchdog which will be done via GPIO.

    thanks,

    Nagesh

  • Hi Nagesh,

    Yes you can updated that code as per your application need. It is kind of part of application code only. We have just provided basic code for reference.

    Regards,

    Vivek Singh

  • Hi Vivek, 

    Thank you for the response.

    I was going through the f2838x_codestartbranch.asm. for the _c_int00 it says  boot._asm file can you please let me know where can I find this file for f2838x

    'LB _c_int00         ;Branch to start of boot._asm in RTS library'.

    Also, I have an external watchdog that needs refresh at 10ms, so my question is if I modify the code for f2838x_codestartbranch.asm to toggle any of the GPIO to refresh my external watchdog.

    From point 3 if auto initialize variables take more than 10ms can we toggle any of the GPIO in between auto initialization?

    thanks,

    Nagesh

  • Nagesh,

    As mentioned in the comment, it is part of TI provided library. I am not sure if it is recommended to change it. I'll have to refer this to our compiler team for their suggestion. 

    Regards

    Vivek Singh

  • NAGESH RK said:
    -v28 -ml -mt --float_support=fpu32 -Ooff --include_path="C:/Users/E537053/Documents/GBL_DCPBA/GBL_F28388D" --include_path="C:/ti/ti-cgt-c2000_18.1.3.LTS/include" --advice:performance=all -g --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --zero_init=off

    Please understand that using C2000 compiler version 18.1.x.LTS with EABI (the option --abi=eabi) is not a supported combination.  Support for EABI starts with version 18.12.0.LTS.  

    Thanks and regards,

    -George

  • Regarding the linker flag --zero_init=off, you say ...

    NAGESH RK said:
    its a linker command flag, i moved it there and the warning went.

    I presume this means this particular problem is resolved.

    Thanks and regards,

    -George

  • NAGESH RK said:

    please let me know where can I find this file for f2838x

    'LB _c_int00         ;Branch to start of boot._asm in RTS library'.

    The function _c_int00 comes from the RTS library that comes with the compiler.  The source code for the RTS is also part of the compiler.  If you have CCS installed, here is a typical location for the source file ...

    C:\ti\ccs1011\ccs\tools\compiler\ti-cgt-c2000_20.2.4.LTS\lib\src\boot28.asm

    I presume this reply resolves all the open questions in this thread.

    Thanks and regards,

    -George

  • Hi George,

    Thank you for the response.

    There is one more question for updating the boot28.asm file

    I have an external watchdog that needs refresh at 10ms, so my question is if we can modify the code for f2838x_codestartbranch.asm/boot28.asm to toggle any of the GPIO to refresh my external watchdog in between the auto initialization of global variables.

    From point 3 if auto initialize variables take more than 10ms can we toggle any of the GPIO in between auto initialization?

    thanks,

    Nagesh

  • Hi George, 

    I think we had a discussion on this issue from our team and it was suggested from TI to go with this option as the Flash API library provided by Ti is compiled in 18.1.3.LTS and this was forcing us to go with this compiler version 18.1.3.LTS as it is used for Aerospace applications.

    Please let us know if this is good.

    We have procured the Flash Api code from TI and their suggestion was not to modify anything in the Flash Api code and use the same compiler used by Ti to create the library.

    thanks,

    Nagesh

  • Nagesh,

    Our experts from TI will be reaching out to concern person in your company on compiler version topic

    Let us know if you have any further query on boot time.

    Regards,

    Vivek Singh

  • Hi Vivek, 

    There is one more question for updating the boot28.asm file

    I have an external watchdog that needs refresh at 10ms, so my question is if we can modify the code for f2838x_codestartbranch.asm/boot28.asm to toggle any of the GPIO to refresh my external watchdog in between the auto initialization of global variables.

    I basically want to add assembly code in boot28.asm to toggle the GPIO46 during the global variable initialization.

    Please do let me know if we can configure the GPIO46 peripheral as output and toggle it during the auto initialization .

    thanks,

    Nagesh 

  • Nagesh,

    Based on response from George, I would say, Yes, you should be able to update it as per your need.

    Regards,

    Vivek Singh

  • Hi Vivek, 

    can you provide me the steps for writing the assembly code to toggle the GPIO46.

    thanks,

    nagesh

  • Nagesh,

    You can just write a simple C code, compile it and then use the generated assembly code. You need to change the GPIO pin direction to output and then write into toggle register.

    Regards,

    Vivek Singh