Build the following project (I use gnumake). Load the file (note the target is C6418) and add the p structure to the watch window. Then single-step through the line that assigns 1 to the "p->mbrToFirstSectorCount = 1;" line. Note that the endCyl element is modified instead of the mbrToFirstSectorCount.
****C File****
#include <stdint.h>
typedef struct
{
uint8_t state;
uint8_t beginHead;
uint16_t beginCyl;
uint8_t type;
uint8_t endHead;
uint16_t endCyl;
uint32_t mbrToFirstSectorCount;
uint32_t sectorCount;
} FAT_PARTITIONENTRY_T;
FAT_PARTITIONENTRY_T* p;
void main(void)
{
p = (FAT_PARTITIONENTRY_T*)0x800001BE;
p->mbrToFirstSectorCount = 1;
}
**** GnuMake File****
./test.out : ./test.obj
/home/fat/dsp/code/tool/cgtools/bin/lnk6x -I /home/fat/dsp/code/tool/cgtools/lib/ ./test.obj -o ./test.out -m ./test.map -c -e _c_int00 -w -stack0x4000
./test.obj : ./test.c
/home/fat/dsp/code/tool/cgtools/bin/cl6x -c ./test.c -g -mu -mv6400 --mem_model:data=far -dCHIP_6418 -d_TMS320C6X -d_TMS320C6400 -d_6x_ -dTARGET_DSP_64X -dPLATFORM_LINUX -i/home/fat/dsp/code/tool/cgtools/include/
clean :
-rm ./test.obj ./test.out
ci :
svn ci ../../. -m "structure testbench checkin"