Just realised this as I was looking at the declarations for DID0 and DID1 that they are wrong. Currently they are
#define SYSCTL_DID0_R (*((volatile uint32_t *)0x400FE000))
#define SYSCTL_DID1_R (*((volatile uint32_t *)0x400FE004))
They should be
#define SYSCTL_DID0_R (*((const uint32_t *)0x400FE000))
#define SYSCTL_DID1_R (*((const uint32_t *)0x400FE004))
They are not volatile, it does not matter if reads are skipped and they are not writeable. The missing const if probably the more severe bug, an unnecessary volatile just restricts the possible optimization the compiler can do. A missing const allows a write or RMW sequence error to be undetected.
I expect there are more of these in the code.
Robert
I think better still would be to declare them as proper variables rather than using defines but that's another thing entirely.