I've got an application that's working fine running out of flash and with normal RAM. I'm taking baby steps forward in trying to turn on hardware optimizations for it. Turning on the ICache was successful, but the DCache broke things, probably due to concurrency problems. My action item there is to dive down into the ASF4 USB code and find all of the USB starts stops and add flush and invalidation calls. Not really looking forward to that, but that's another conversation.
Meanwhile, I tried carefully turning on DTCM. I went into the linker file and redefined the "ram" section to be the DTCM range. When I did that, everything worked - again - except for USB.
If I turn off TCM and move back to the normal RAM range for this chip (S70N19), it works again. Now here's the kicker: If I don't do anything else but reduce the RAM range size to be the same as the size of DTCM, it fails in the same way.
The linker says my application is using less than 4K of RAM. And the application works, it just doesn't show up on USB.
So what is USB doing that it cares how much RAM there is... but not in the way that shows in the size of the data or BSS segments?