<html>
- Isn't there some way to specify object module order in Keil? And starting address for a collection of object modules?
Maybe doing this would get the object modules' arrangement more compressed, with only a few spare bytes in between them. Then you would only have to put the trap before the collections of modules (maybe one collection for code, one for constants). - I think the best way is to make a hex file filter that fills in unused space in your .hex file with sets of NOPs, each ending in a jump to the trap. This would help with a problem i've had before with Archimedes (Keil), that it does not fill in unused PROM locations (maybe there is a linker flag to do this?)
- Better to jump to a diagnostic routine, instead of to zero. This routine could increment a counter (saturating at max instead of rolling over to zero), and maybe save some other values, such as registers, all or some of the stack, etc. Best to save to a reserved area of external RAM if internal RAM is scarce. Should be able to search around the web for the Intel hex object format; I think Keil has an appendix describing it, in one of the compiler manuals. You can use gawk or something similar to write the filter (maybe even C :).
re compilers, it's usually the CODE that gets you screwed up ... not the compiler ...
<table><tr><td>james</td><td> </td><td>
www.jameshinnant.com</td></tr></table>
</html>