Julian,
This was an interesting one that took us some work to find out the exact reason.
1) The main issue with the multiple byte memset. When creating a project using the default settings, the libc.a memset() was being pulled from the directory below:
<CCS_INSTALL_DIR>/ccsv6/tools/compiler/gcc-arm-none-eabi-4_7-2013q3/arm-none-eabi/lib
However, these libraries are for the ARM binary mode (which CortexM was supposed to support) but somehow they were failing during runtime. Therefore, to select the proper library you can simply add the following setting to the Compiler options:
We found out that the cortex-m4 option was not enough to pull the correct library - in fact, removing it did not affect the outcome of the build.
2) The difference between the single byte and multiple byte memset was actually caused by the smartness of the compiler. The disassembly shows that single-byte memset is entirely replaced by a simple store operation:
To us it seems the problem with 1) above is a bug in the GCC tool, as its documentation reports that either cortex-m4 or armv7e-m should pull the libraries from the correct directory. However, given we (TI) do not have control over GCC, its fix may take some time to be fixed.
Hope this helps,
Rafael