I am trying to port a little bit of CAN code from S08DZ to S12XD using CodeWarrior for HCS12 V4.7. (attached)
I have cleared up many things but the following is confusing me.
I am getting message Link Error : L1822 saying symbols _LSHRU, _BSHL, and _LSHL are undefined. I do not recognize these symbols. I cannot find any of them in my S08DZ or S12XD code. I suppose they are specific to one or the other target.
I had a similar message regarding symbol _Startup, which I fix by getting the start12 files in the same place. There was no message that I was missing those files. Am I missing some S12XD file that has these symbols? Some memory map?
These symbols are said to be missing from a file that was originally a CAN.c file generated by PE for the S08DZ. I do not intend to continue to use the PE generated code for CAN so I wish to learn what is going on here.
Thanks.
Solved! Go to Solution.
_BSHL is byte shift left routine, _LSHRU - long shift right unsigned, _LSHL - long shift left
I guess you removed or forgot to add required library file.
_BSHL is byte shift left routine, _LSHRU - long shift right unsigned, _LSHL - long shift left
I guess you removed or forgot to add required library file.
kef- "I guess you removed or forgot to add required library file."
I'm thinking that, too, but I haven't figured which one yet,
Thought for a moment it might be the mc9s12xdp512.h/.inc files?
OK, I think these may be S12X symbols, specifically associated with XGATE shared memory.
SHL = Shared Region Lower?
http://notes-application.abcelectronique.com/314/314-68219.pdf
Let me note at this point, that I intend to start out with XGATE turned off and employ it later where it can do the most good.
But the question remains, what and where are these symbols?
Those are part of the compilers runtime support.
So either link against the proper ansi library (see lib/hc12c/readme.txt) or include the lib/hc12c/src/rtshc12.c in your build.
In general it might be easier to start with a wizard generated project than from scratch to have such things taken care of properly.
Daniel
Daniel - "In general it might be easier to start with a wizard generated project than from scratch to have such things taken care of properly."
Sure. But, I was curious to see how PE would work if I could change processors just by deselecting the S08DZ and selecting the S12XD.
I will look at the libraries you suggested. And also try making a new empty project and import my existing code into that.
"_BSHL is byte shift left routine"
Some ancient memory was actually trying to tell me that, feebly - thanks.
“(see lib/hc12c/readme.txt)”
Ah, one of the PE beans was giving me a message like “use the compile command ‘-CpuHCS12X’” can’t find that message at the moment though. Am still working on it.
OK, copied in ansibi.lib (no float, banked memory)
Was able to then get it to all compile on my reused S08DZ code.
I was getting close the other way, but it was quicker to start with a new project.
I'll set up the clock settings tomorow and see how the software runs tomorrow.
Thank you,
BTW, adding the ansi##.lib worked,
Thank you.
I've also just changed the compiler instruction " -CpuHCS12" to " -CpuHCS12X"