From: Dario V. <dar...@ti...> - 2001-11-05 13:32:32
|
> I'm now the proud owner of a TINI board. Welcome! > My first contribution to the > ds390 port. The compiler will now generate code for the Arithmetic > Accelerator unit.. i.e. 16 bit by 16 bit multiplication , division & > remainder > operations will now generate inline code.... This can be disabled > by setting the port->muldiv = 1 (currently set to 2 ). Very good! > Now for the other thoughts .. while implementing the accelerator code > I desperately wanted a debugger.. I have some ideas want to pass it by > you folks... a simple debugger can be made by enhancing the boot loader.. > (Dallas has been kind enough the provide the source code)..... > e.g. add a command like "br <hex-address>"... the loader will then > read the contents of the location into a "loader internal" location and > patch the location with a branch to a "debug" entry point in the loader... > when the code reaches the point .. it will branch back to the loader.. the > loader then patches back the old values (it saved).. displays register > contents etc etc .. and waits for more commands ..... Here are many problems: 1 - branch instructions are more than one byte long, so patching an unknown code can have unpredictables results (guess what happen if the program jumps in the middle of the three bytes long jump patch) 2 - even SETB instruction is 2 bytes long (could be usefull for setting an interrupt bit to vectorize the monitor program) 3 - commercial compilers like IAR optionally insert three NOPs for each C statement for use with monitor programs: these NOPs can be substituted with a LJMP to the monitor as a breakpoint. This could be a new feature for sdcc 4 - assembly code can be executed "one shot" as documented in the 8051 data sheet but is too slow to compare the execution address at every assembly instruction... > I have to work up some more courage before I try to ZAP BANK 0 ...:) In case of failure take a look at Karl Bongers web site (www.turbobit.com), he helped me more than 1 year ago when I lost the bootloader. Dario Vecchio _______________________________________________ sdcc-devel mailing list sdc...@li... https://lists.sourceforge.net/lists/listinfo/sdcc-devel |