MC9RS08KA2: AN3266 - codewarrior error messages

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MC9RS08KA2: AN3266 - codewarrior error messages

跳至解决方案
2,557 次查看
jackabo
Contributor I
hey guys,
i put up a post before mentioning that I was working on a A/D conversion. i took code from the AN3266 document and plugged it into my codewarrior. However, the code is not working and gives me many errors that don't make much sense. For example, I used the line "org ROMStart" and it gives the error "not an HC08 instruction or directive." There are also other errors that complain about redefining variables that are declared in my "MC9RS08KA2.inc" file. Does anyone have any idea if I am just forgetting to include something important or maybe I am putting lines in the wrong order. Any ideas as to what is going wrong would be appreciated. Thank you.
Jackabo


Alban Edit: Part number in subject line. Moved CodeWarrior question to CodeWarrior board.

Message Edited by Alban on 2007-03-13 10:30 PM

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,403 次查看
CrasyCat
Specialist III
Hello
 
assembling with -FA1 or -FA2 indicated you wants the assembler to generate directly the executable file. There is no additional link process.
 
There are some coding guidelines when you build with -FA1 or -FA2:
  - You can process one single assembly unit (i.e. Application consist in one single source file including multiple include files is needed)
  - You can only use absolute section in the application (only ORG section no section defined with SECTION directive).
  - You have to explicitly define the start address of each code or data section in the source file and make sure there are no overlap..
 
CrasyCat

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,403 次查看
jackabo
Contributor I
When I added spaces to the front of the instructions all of those errors went away.  Thanks a lot CompilerGuru. Unfortunately, other errors occurred when I got rid of my initial errors. The most common one is the complaint that certain instructions can't have variables that I created in them and must instead have absolute values when either options -FA1 or -FA2 are selected. Is there something that can be done about this or do I just need to use values instead of variables in my code. Thanks again for the help.
 
Jackabo
0 项奖励
回复
1,404 次查看
CrasyCat
Specialist III
Hello
 
assembling with -FA1 or -FA2 indicated you wants the assembler to generate directly the executable file. There is no additional link process.
 
There are some coding guidelines when you build with -FA1 or -FA2:
  - You can process one single assembly unit (i.e. Application consist in one single source file including multiple include files is needed)
  - You can only use absolute section in the application (only ORG section no section defined with SECTION directive).
  - You have to explicitly define the start address of each code or data section in the source file and make sure there are no overlap..
 
CrasyCat
0 项奖励
回复
1,403 次查看
CompilerGuru
NXP Employee
NXP Employee
try to create a project with the wizard for the RS08 KA2, select absolute assembly,
then paste the code of AN3266 into it.
Things to notice:
There has to be a space before a directive, so "ORG $1234" does not work, it has to be " ORG $1234" (or more spaces/tabs). Not sure how well pdf preserves spaces/tabs.

- ORG is actually a directive, so the error message is a bit strange.
- In order to assemble RS08 code, you have to pass in an option, otherwise the assembler runs in HC08 mode (I think it is -CRS08).
- For absolute assembly, you have to pass -FA2. When using a wizard generated project, those things are setup already, that's the reason for this proposal.
- it's actually possible to copy the error messages from the message window, press Ctrl-C.
If this does not help, please a zip file with your state, so we can check and see where the problem is from.
- I wonder if the error messages from the redefinitions of the MC9RS08KA2.inc are not actually correct, I could imagine the code in AN3266 was written without any external reference, then duplicate errors would not be much of a surprise to me.

Daniel