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.
Hi,
When I compared the library files with CG_XML , I got the results something like below.( For almost all the obj files)
**********************************************************************
Filename _lock.obj
**********************************************************************
======================================================================
Comparing Sections : section = $build.attributes
======================================================================
Raw data is different
======================================================================
Comparing Sections : section = $build.attributes : build_attributes : vendor_sec
tion : vendor_name = TI : attribute_section : attribute_list : tag = Tag_Produce
r_VPatch : arguments
======================================================================
Differences: C:\Release\rts_TMS320F28335_Flash.lib c:\updated_with
_5.1.3\rts_TMS320F28335_Flash.lib
const: 0x2 0x4
******************************************************
/* *----------------------------------------------------------------------------- * Copyright Honeywell ASCa 2011. All Rights Reserved. * This software and all information and expression are the property of * Honeywell ASCa Inc., contain trade secrets and may not, in whole or in * part, be licensed, used, duplicated, or disclosed for any purpose without * prior written permission of Honeywell ASCa Inc. All Rights Reserved. *----------------------------------------------------------------------------- * * File Name : Flash28_Prog.c * * CSCI Name : C Run Time Library for TMS320F28335 DSC * * CSU Name : Flash Program CSU * * SCI Number : 51352153 * *----------------------------------------------------------------------------- * * Description: * The C Run Time Library for TMS320F28335 CSU provides run time support * functions for applications executing on TMS320F28335. * * This is the top level Flash programming function. * * Deviation from Coding Standard: * Deviations: the deviation from the coding standard are for complexity, * variable and function naming standards, source file name length and case, * layout of the source files for different sections, explicit use of spaces, * braces and parenthesis, pointer verification of null, divide by zero, * * Justification: * The source files for the C RTL are obtained as COTS from TI as part of the * Code Composer Studio compiler suite, C28x Floating Point fastRTS and from * TMS320F28335 Flash APIs. No executable line of source code is modified in * the source files. Hence these files do not follow the coding standards. * *----------------------------------------------------------------------------- * * Revision History: * * Version Author Date Description * E-ID (DD/MM/YY) * 1-3 E244183 06/09/2010 Initial Version. * 4 E329175 08/04/2011 Modified as per Review ID 636 * 5 E329175 27/05/2011 Implemented as per * SCR EPS00005384 * 6 E329175 23/06/2011 Implemented as per * SCR EPS00005662 * *----------------------------------------------------------------------------- */ // TI File $Revision: /main/15 $ // Checkin $Date: December 4, 2007 16:03:51 $ //########################################################################### // // FILE: Flash28_Prog.c // // TITLE: F28x Program Algorithums // // NOTE: // //This is the top level FO5 programming function. // //########################################################################### // $TI Release:$ // $Release Date:$ //########################################################################### /***************************** HEADER FILES **********************************/ #include "Flash28_Internals.h" #include <stdio.h> /************************** PRE-PROCESSOR DIRECTIVES *************************/ /************************** IMPORTED DATA ELEMENTS ***************************/ // None /************************ IMPORTED OPERATION DECLARATION *********************/ // None /************************ LOCAL DATA TYPES (Enum/Struct/Union)****************/ // None /************************ EXPORTED DATA ELEMENTS *****************************/ // None /************************** LOCAL DATA ELEMENTS ******************************/ // None /************************ LOCAL OPERATION DECLARATIONS ***********************/ // None /************************ LOCAL OPERATION DEFINITIONS ************************/ // None /********************** EXPORTED OPERATION DEFINITIONS ***********************/ // CRTL_SDD_02_05_004_Derived /*----------------------------------------------------------------------------- * Description : * Function Flash_Program programs a buffer into the Flash or OTP memory. * Only bits that need to be programmed are touched, the rest are masked * out and not touched. * * Arguments: * Uint16 *StartAddr : Points to the first word to be programmed * Uint16 *BufAddr : Points to the buffer with data to program * Uint32 Length : Number of 16 bit words to program * FPROG_STAT *FProgStat : Flash status structure * * Return Value: * The function returns a status value. * STATUS_SUCCESS Program was successful * STATUS_FAIL_CSM_LOCKED CSM is locked, nothing to do * STATUS_FAIL_PROGRAM Programing failed. * STATUS_FAIL_ZERO_BIT_ERROR A bit is already 0 that should be 1 * * Notes: * If the address to be programmed lies within the OTP block, then the * user or TI OTP section will be programmed. Which (TI or user) is * controlled by a compile switch in Flash28_Internals.h. * * This switch should not be changed by customers as the TI half is for * engineering data and not memory mapped. * * This function disables the watchdog * This function assumes that the CSM is unlocked *----------------------------------------------------------------------------- */ //**************************************************************** // Program Block // // This function programs a buffer into the Flash or OTP memory // Only bits that need to be programmed are, the rest are masked // out and not touched. // // Parameters: // Uint16 *StartAddr Points to the first word to be programmed // Uint16 *BufAddr Points to the buffer with data to program // Uint32 Length Number of 16 bit words to program // FPROG_STAT *FProgStat Flash status structure // // Return Values: // The function returns a status value. // STATUS_SUCCESS Erase was successful // STATUS_FAIL_CSM_LOCKED CSM is locked, nothing to do // STATUS_FAIL_PROGRAM Programing failed. // STATUS_FAIL_ZERO_BIT_ERROR A bit is already 0 that should be 1 // // Notes: // If the address to be programmed lies within the OTP block, then the // user or TI OTP section will be programmed. Which (TI or user) is // controlled by a compile switch in Flash28_Internals.h. // // This switch should not be changed by customers as the TI half is for // engineering data and not memory mapped. // // This function disables the watchdog // This function assumes that the CSM is unlocked //----------------------------------------------------------------------------- // The volatile is just for compatability with the original 281x API. #if FL28_FLASH_YANTRA Uint16 Flash_Program( volatile Uint16 *StartAddr, volatile Uint16 *BufAddr, Uint32 Length, FLASH_ST *FProgStat ) #else Uint16 Flash_Program( Uint16 *StartAddr, Uint16 *BufAddr, Uint32 Length, FLASH_ST *FProgStat ) #endif { Uint16 *EndAddr; // End address Uint32 FAddr; // Address adjusted by the wrapper start address Uint16 FDataout; // Data read out of the array by program verify Uint16 FDatain; // Data to be programmed, properly masked // according to what partial value is already programmed Uint16 Status; // Status that will be returned to the caller Uint16 Array; // Used to modify which control signals are toggled // in particular this is used when programming the OTP Uint32 CurrentLoc; // Current location relative to the first addr Uint16 PulseCount; // Number of pulses //**************************************************************** // Watchdog, check REVID (Y only), boot ROM location check, // and make sure we can access the flash registers (no CSM blocking) //**************************************************************** Status = Fl28x_Init(FProgStat); if(Status != STATUS_SUCCESS) { return Status; } else Status = STATUS_BUSY; EndAddr = (Uint16 *)StartAddr+Length-1; //**************************************************************** // Check if the start and end addresses are within the Flash block // If not, check if the start and end addresses are within the OTP block // If not, return error // Otherwise adjust the address for the flash wrapper //**************************************************************** if(StartAddr >= FL28_FADDR_START && EndAddr <= FL28_FADDR_END) { FAddr = ((Uint32)StartAddr - (Uint32)FL28_FADDR_ADJUST); Array = FL28_FLASH_ARRAY; } #if ((FL28_OTP_TI && (FL28_FLASH_YANTRA||FL28_FLASH_SHAKTI||FL28_FLASH_DD6)) || FL28_OTP_USR) else if(StartAddr >= FL28_OTPADDR_START && EndAddr <= FL28_OTPADDR_END) { FAddr = ((Uint32)StartAddr - (Uint32)FL28_OTPADDR_ADJUST); Array = FL28_OTP_ARRAY; } #elif (FL28_OTP_TI) else if(StartAddr >= FL28_TIOTPADDR_START && EndAddr <= FL28_TIOTPADDR_END) { FAddr = ((Uint32)StartAddr - (Uint32)FL28_TIOTPADDR_ADJUST); Array = FL28_OTP_ARRAY; } #endif else return STATUS_FAIL_ADDR_INVALID; Fl28x_EnterCmdMode(); // Enter the command mode for the flash //**************************************************************** // Sector interleraving must be accounted for 280x devices. //**************************************************************** #if FL28_INTERLEAVING FL28_EALLOW; *FL28_FSECTM = FL28_PROG_SECTMODE; FL28_EDIS; #endif //**************************************************************** // For each word that needs to be programed: // * Read the current value of the location via prog verify // * Program only the bits that are not correct, mask out the // ones that are correct // * repeat until the value is programmed, or the maximum // program pulses is reached. //**************************************************************** for(CurrentLoc = 1; CurrentLoc <= Length; CurrentLoc++) { // Get the current value stored in the flash location // ProgVerify will return 0's where the bits are programmed. FDataout = Fl28x_ProgVerify(FAddr,FL28_FUSER_SPACE|Array); for(PulseCount = 0; PulseCount < FL28_MAX_PROGRAM_PULSES; PulseCount++) { #if FL28_CALLBACK if(NULL != Flash_CallbackPtr) { Flash_CallbackPtr(); } #endif #if !FL28_STOMP // Make sure there are no bits already programmed that we want to be a 1. // If so, then we are done if( ( (FDataout ^ 0xFFFF) & *BufAddr ) != 0x0000) { Status = STATUS_FAIL_ZERO_BIT_ERROR; break; } #endif // endif !FL28_STOMP // If the word is already programmed then we are done. if(FDataout == *BufAddr) break; // Otherwise mask out the bits that are already programmed // and attempt to program the rest FDatain = (~FDataout | *BufAddr); Fl28x_ProgPulse(FAddr,FDatain,FL28_FUSER_SPACE|Array); // Get the current value stored in the flash location // ProgVerify will return 0's where the bits are programmed. FDataout = Fl28x_ProgVerify(FAddr,FL28_FUSER_SPACE|Array); } // Check for failure if(FDataout != *BufAddr) { // If Status is still busy then this was a prog error // and not a zero bit error if( Status == STATUS_BUSY) Status = STATUS_FAIL_PROGRAM; FProgStat->ActualData = FDataout; FProgStat->ExpectedData = *BufAddr; if(Array == FL28_FLASH_ARRAY) FProgStat->FirstFailAddr = FAddr + FL28_FADDR_ADJUST; else FProgStat->FirstFailAddr = FAddr + FL28_OTPADDR_ADJUST; break; } // Move to the next flash location and buffer location BufAddr++; FAddr++; } Fl28x_LeaveCmdMode(); // If Status is still busy, then no error was flagged if(Status == STATUS_BUSY) Status = STATUS_SUCCESS; return Status; } /********************** ISR OPERATION DEFINITIONS ****************************/ // None /************************** End of Flash28_Prog.c ****************************/
Just want to decipher , whats the trigger for the lib change.
When we compared through the hex difference , I got to know the difference is generated in the functionality Flash28_Prog.obj and I have attached the file for reference.
Thanks,
Jeba
Build attributes are meta-data. A change in build attributes will not affect the correctness of the code. The build attributes encode the compiler version, so you are most likely seeing the change in compiler version being reflected in the build attributes. Use ofd2000 on this library to interpret the build attributes in a human-readable fashion.
Jeba Sankar said:======================================================================
Comparing Sections : section = $build.attributes : build_attributes : vendor_sec
tion : vendor_name = TI : attribute_section : attribute_list : tag = Tag_Produce
r_VPatch : arguments
======================================================================
Differences: C:\Release\rts_TMS320F28335_Flash.lib c:\updated_with
_5.1.3\rts_TMS320F28335_Flash.lib
const: 0x2 0x4
That is saying the last digit in the compiler version changed from 1 to 3. Using your directory name as a further hint, this probably means the compiler version changed from 5.1.1 to 5.1.3. I agree it is quite a leap from that output to this conclusion.
There is presently no option in objdiff to skip over the comparison of the build attributes. Do you think it needs one? If so, please explain why.
Jeba Sankar said:When we compared through the hex difference , I got to know the difference is generated in the functionality Flash28_Prog.obj
Another way to see it is with the --verbose option of objdiff.
Thanks and regards,
-George