Hello All,,
I am currently using CodeWarrior 2.9 for the SPC563XX(Power Architecture e200Z3), which is equivalent to the MCP563xx microcontroller.
While attempting to integrate the ERIKA RTOS for the MCP56xx family, I am encountering the following Compilation errors:
mwldeppc: undefined: 'EE_hal_terminate_savestk'
mwldeppc: Referenced from 'EE_oo_thread_stub' in ee_tstub.o
Upon investigation, I found that the function EE_hal_terminate_savestk() is defined in an assembly (.S) file, which does not seem to be included in the compilation process.
My toolchain is able to compile .c files, so I attempted to work around the issue by renaming the .S file to a .c file and wrapping the assembly code inside a C-style function (e.g., asm void Fun(){}).
My original intention was to reuse the same assembly implementation, only adapting the function definition to match C syntax, so that I could avoid modifying the makefile. However, this approach is resulting in multiple compilation errors, which I find unexpected.
Below are some of the errors I am encountering:
illegal function definition
undefined identifier 'rlwinm'
undefined identifier 'addis'
undefined identifier 'stw'
undefined identifier 'stmw'
undefined identifier 'mtlr'
undefined identifier 'bl'
undefined identifier 'lwz'
undefined identifier 'addi'
declaration syntax error
';' expected
It appears that the CodeWarrior compiler is not recognizing several PowerPC assembly instructions within the C file.
Could you please help me understand:
- Why these assembly instructions are not being recognized by the compiler?
- Whether this approach (embedding assembly in a .c file) is valid for this toolchain?
- How I can properly resolve these compilation errors?
Thank you for your support.
Best regards,
Nagendra Pothula
SW Architect
AVL ITC India