Is this a compiler bug? Adding a set of parentheses around an address changes the way it is computed. This caused a failure in the code that
took quite a while to track down. No parens, the offset is 0xAA. Use parens, the offset is 0x55. See C code and generated assembly below.
Running CCS 6.1.3.00033, compiler TI v15.12.3.LTS, chip TMS320F28335
*((volatile unsigned long*) FLASH_BASE + 0x55 ) = 0x00980098;
795 000000f7 9A98 MOV AL,#152 ; [CPU_] |126|
796 000000f8 9B98 MOV AH,#152 ; [CPU_] |126|
797 000000f9 8F20 MOVL XAR4,#2097322 ; [CPU_U] |126|
000000fa 00AA
798 000000fb 1EC4 MOVL *+XAR4[0],ACC ; [CPU_] |126|
-------------------------------------------------------
*((volatile unsigned long*) (FLASH_BASE + 0x55) ) = 0x00980098;
795 000000f7 9A98 MOV AL,#152 ; [CPU_] |126|
796 000000f8 9B98 MOV AH,#152 ; [CPU_] |126|
797 000000f9 8F20 MOVL XAR4,#2097237 ; [CPU_U] |126|
000000fa 0055
798 000000fb 1EC4 MOVL *+XAR4[0],ACC ; [CPU_] |126|
Thanks,
Lloyd