??? 04/15/04 10:50 Read: times |
#68527 - RE: Assembly works but C... Responding to: ???'s previous message |
"This #pragma src directive is not supported in FREE Evaluation Kit.
But when I use the simulator, the code works fine; the assembly code is right." Have you carefully read the limitations of the 'evaluation' version? I seem to remember, for example, that it offsets the code to somewhere your device/board might not have code space, hence it runs fine in the simulator but not on the target. You don't need to muck about with startup.a51 - you don't even need to include it in your project. If you have modified the 'master' copy then you need to delete it and replace it with the copy on the CD. All you have to do is this: Create a new project selecting the correct derivative. Specify the code space/xdata start addresses and lengths. Create a .c file and #include the correct .h file for your derivative. Add the .c file to your project. All the stuff such as initialising memory spaces and calling main() will happen automagically. I notice from the code you posted that you used a delay loop. This is not generally a good idea in 'C' as it is difficult to achieve the delay you actually want. If you do use a delay loop you must declare the loop variable 'volatile' or the compiler may optimise the loop away altogether. |
Topic | Author | Date |
Assembly works but C... | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 | |
STARTUP.A51 | 01/01/70 00:00 | |
RE: STARTUP.A51 | 01/01/70 00:00 | |
RE: STARTUP.A51 | 01/01/70 00:00 | |
Stand Still... | 01/01/70 00:00 | |
RE: Stand Still... | 01/01/70 00:00 | |
RE: STARTUP.A51 | 01/01/70 00:00 | |
RE: STARTUP.A51 | 01/01/70 00:00 | |
function for LCD in C... | 01/01/70 00:00 | |
RE: function for LCD in C...![]() | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 | |
RE: Assembly works but C... | 01/01/70 00:00 |