TMS320F28388D: Function not being entered

Part Number: TMS320F28388D

Hi,
I am trying to use both I2CA and I2CB for both transmission and reception at a rate of 1 ms with a bare metal scheduler. In free run, I can see that the desired SAR value is set. However, when I set a breakpoint at the start of the function(as shown in the video), the value does not update. I tried checking the same in the expression window with continuous refresh enabled, yet the value was not updating. On inserting 3 global variables at the start, in the middle and at the end of the function and monitoring the values, it seemed like the function was not being entered at all. From the breakpoint, when I do an assembly step over, the desired value was being set. What could be the possible reason for this behaviour?
Regards,

Ganesh

  • Hi Ganesh,

    In terms of I2C HW/SW, I don't see any reasons why it would affect breakpoint behavior. The only thing I can think of is if the breakpoint is being set before/while that register is being written to. If you set a breakpoint in a following line, do you see the register value being set? 

    Are you utilizing any optimization? Compiler optimization affects how the breakpoints are memory address mapped.

    Best Regards,

    Aishwarya

  • Hi Aishwarya,

    Sorry for the delayed response.

    If I set the breakpoint to the following lime, yes the register gets set. I do not think there are any additional optimizations, the flags section of makefile is as follows:

    #----------------------------------------
    # "Faster Builds" Build Configuration
    #----------------------------------------

    ARFLAGS              = -r
    ASFLAGS              = --abi=coffabi \
                           -s \
                           -v28 \
                           -ml \
                           $(ASFLAGS_ADDITIONAL)
    CFLAGS               = --abi=coffabi \
                           --compile_only \
                           --preproc_dependency="$(@:%.obj=%.dep)" --preproc_with_compile  \
                           -I"$(TI_INCLUDE)" \
                           --large_memory_model \
                           --silicon_version=28 \
                           --define="LARGE_MODEL"
    CPPFLAGS             =
    CPP_LDFLAGS          =
    CPP_SHAREDLIB_LDFLAGS  =
    OBJCOPYFLAGS_DWO     =  "$<"
    DOWNLOAD_FLAGS       = $(TARGET_LOAD_CMD_ARGS) $(PRODUCT)
    EXECUTE_FLAGS        =
    OBJCOPYFLAGS_HEX     =  -i "$<" -o "$@" -order MS -romwidth 16 -q
    LDFLAGS              = --abi=coffabi \
                           -z -I$(TI_LIB) \
                           --stack_size=$(STACK_SIZE) --warn_sections \
                           --heap_size=$(HEAP_SIZE) \
                           --reread_libs --rom_model \
                           --priority \
                           -m"$(PRODUCT_NAME).map"
    MEX_CPPFLAGS         =
    MEX_CPPLDFLAGS       =
    MEX_CFLAGS           =
    MEX_LDFLAGS          =
    MAKE_FLAGS           = -f $(MAKEFILE)
    SHAREDLIB_LDFLAGS    =
  • Ganesh,

    You could also use a HW breakpoint in assembly to place it at a more precise location. Let me loop in the compiler experts to comment further as well. 

    Best Regards,

    Aishwarya

  • (as shown in the video)

    Which video are you referring to?

    Which CCS version is being used?

  • Hi Ki,

    Apologies for having missed adding the video. I have attached it as follows:


    This behaviour was observed on both ccs 12.7 and ccs 20.3.1 .

    Regards,

    Ganesh

  • Would to provide the project or at least some reproducible test case that can run on a generic F28388D?

    You can send it via private E2E message.

    Thanks

    ki