| |||
| Home > Troubleshooting > Troubleshooting > A program that prints strings seems to load and run, but displays garbled text | |||
The target memory controller does not support byte reads. This is a common and serious problem because any C code that accesses chars does not work correctly.
None of the built-in string handling functions (for example, strcmp, strlen,
and strcpy) work properly without byte-readable
memory, and accesses to arrays of chars also fail. It
is a misconception that because ARM code is all 32-bit (or all 16-bit
for Thumb), that only word and halfword accesses must be supported
by the memory controller. Code can be specially written to work
with memory controllers designed like this, but processors using
these controllers do not run generic C code correctly.