We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi guys, I am using keil C51 to do the program and debugging the cypress FX2 ezusb chip. In my project options I selected Cypress FX2 as the device type. Should I add an include file in my .a51 file? Also, if I need to add one instruction at location 0043h, how do I do it? I tried CSEG 0043h, keil says syntax error. I am new to both cypress fx2 and keil.
There were already 5 responses in your existing thread before you started this one.
Do you not think that background would be of any value?
Andrew, In my first post at 8052.com, I was asking for assembly examples for cypress FX2 chip. I subsequently asked about keil and 8051 in the same thread. Which I posted here too(not intentional as I mentioned before). That thread has only 4 replies. Anyways, not sure why you are so concerned. If you want me to delete this post, I will. I read forum rules, it doesn't mention anything about cross posting. If you are the moderator, please go ahead and delete.
I read forum rules, it doesn't mention anything about cross posting.
Indeed, I've no idea what the fuss is about.
If you write your interrupt handler in 'C' using the 'interrupt' keyword the toolchain will automagically insert a jump at the vector address. Take a look in the C51 documentation for a complete explanation.
The fuss is about different people spending their time answering a question that has been already answered in a satisfactory manner. Maybe Keil should add special tags to indicate that, too; However, they are as likely to be ignored as the others...
:-(
:-)
Tamir, Where have the questions been answered?
Jack, I am coding in assembly. I found out how to insert a jump at a particular location. I am still trying to find if include files have to be added to my .a51 file.
"If you write your interrupt handler in 'C'..."
There you go: it has already been established in the other thread that he won't use 'C' - so that was a waste of time suggesting it!
"Jack, I am coding in assembly"
That had already been established in the other thread, but you didn't see fit to mention it here.
Thus you waste people's time making suggestions that have already been made & rejected!
Andy, it was not your time was it?
Andy, I did mention .a51 file.
Jack, I am coding in assembly.
Unless you have a very good reason to do so I'd strongly recommend 'C'!
I am still trying to find if include files have to be added to my .a51 file.
If you want to reference anything not declared in that a51 file then yes - assuming you want declarations of the SFRs (special function registers) you'll need to track down the appropriate file, either in the Keil installation directory structure or at the chip manufacturer's website.
Selecting the 8051 derivative type in the project options does little apart from populating the default memory space sizes that are passed to the linker.
Not at all. After a while he'll succumb to the superliminal messages and convert to a life of 'C'.
If I get a bit more evangelical he might even cash in his worldly posessions and make a contribution towards the cost of my next Rolls Royce.
"a life of 'C'" would be a sad life.
No I am not in any way saying that the OP should not have 'C' in his toolchest, but a good life would be "a life of 'C' and assembler"
Erik
I tried $include "fx2regs.h" I get the file not found error. Anyone know where to add the header files. I added them to C:\Keil\C51\INC\ and also my project folder. I still get the error.
I tried $include "fx2regs.h"
That just gives a file name, doesn't it?
It doesn't give any information as to the location of that file, does it?
So the assembler will obviously have to apply some default location (or set of locations) in which to look, won't it?
And the place to find out about what that default (or set of defaults) is will, obviously, be the assembler's Manual...
There is nothing special or magic about include files; Including a file is exactly equivalent to having just typed its contents verbatim into the source file.
Therefore you never have to use an include file - but it may often be more convenient to do so...