SX Sim For Simulating Multi-Platform (SX28, SX48) Development
Question Has Several Parts:
·
1) Using Macros and Simulating
2) Using Macros For Conditional SX-Key Directives(Mode Macros, Memory Banks Macros)
·
·
I have been using the SXSim for several years now and was very successful in buildng large projects while in flight or simply anywhere. Impressed I have been, I find SXSim to be more rapid and faster than the debugger itself.
·
When I initiate· a project using the given templates (SX28-SX48) multi-chip interop. development templates.·I start the simulator and hit the run to sweep all and just get the program to loop and interrupt.
·
I get the following error:· "Bad Jump Address or Wrong Page"
·
My questions:
a) Relating to use of Macros, has anyone successfully used the template and the SXSim to simulate SX48?
b) Is there any known issue having to use directive macros (those declared at the header)?
c) The templates I am referring to are UART templates and multi-threading templates. Please let me know as this is the relevant context of this message.
Note: I am suspecting that there may be issues relating to _bank, _mode, etc macros while in simulation.
Regards,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Bashar Sadig
Senior Solutions Architect - Enterprise Applications
·
1) Using Macros and Simulating
2) Using Macros For Conditional SX-Key Directives(Mode Macros, Memory Banks Macros)
·
·
I have been using the SXSim for several years now and was very successful in buildng large projects while in flight or simply anywhere. Impressed I have been, I find SXSim to be more rapid and faster than the debugger itself.
·
When I initiate· a project using the given templates (SX28-SX48) multi-chip interop. development templates.·I start the simulator and hit the run to sweep all and just get the program to loop and interrupt.
·
I get the following error:· "Bad Jump Address or Wrong Page"
·
My questions:
a) Relating to use of Macros, has anyone successfully used the template and the SXSim to simulate SX48?
b) Is there any known issue having to use directive macros (those declared at the header)?
c) The templates I am referring to are UART templates and multi-threading templates. Please let me know as this is the relevant context of this message.
Note: I am suspecting that there may be issues relating to _bank, _mode, etc macros while in simulation.
Regards,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Bashar Sadig
Senior Solutions Architect - Enterprise Applications
Comments
because SxSim uses the list file.·This list file is created by the
SASM assembler and has all macros expanded. Unexpanded macros
are just comment in the list file.
If SxSim generates the error you mentioned, the page bits PAx
do not match a target address. You need to go through the list
file to see where a 'RET' is used where a 'RETP' should have been
used, or·look for a missing 'PAGE' instruction before a jump or call.
regards peter
····
Post Edited (Peter Verkaik) : 9/24/2007 5:12:16 PM GMT
Peter's explanations are absolutely correct - SXSim does not care about macros, it only reads the code parts and the symbol table from the list file generated by SASM.
I have implemented SX48 support in SXSim a while ago without excessive testing before releasing it. Now that Parallax sells the SX48 ProtoBoards at such a bargain price, more users write code for the SX48 (and test it with SXSim) than ever before. So chances are much higher that possible bugs in the SX48 simulation become obvious now. So, if you detect any unregularities with SXSim while simulating SX48 code, please don't hesitate to report them (a post in the "sticky" SXSim forum section would be best). This helps me a lot to improve SXSim.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Bashar Sadig
Senior Solutions Architect - Enterprise Applications