Get errors in all-assembly PSoC 3 projects - L51: UNRESOLVED SYMBOL ?C_STARTUP

Question: Why does the Keil linker generate this message when I turn on the inline assembly directive?



The issue is likely that you have a source single file in the project with the directive set. Alternatively, you may have changed the directive project-wide - so it is set for all files in your project. In both cases the Keil linker doesn't know it has to include the appropriate C run-time library and the linker errors are the result.

The solution is to have a single C file that does not inline assembler. Note that it can be an empty file; just the presence of a C source file without the inlining directive is sufficient to ensure the libraries will be linked.

This is a feature of the Keil toolchain and is described in more detail in their support knowledge base: