From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2003-03-15 14:11:54
On Fri, Mar 14, 2003 at 01:04:12PM -0800, Shawn Jefferson wrote: > I know nothing about loadable modules (I couldn't figure out exactly what > you need to do to compile a module and load it.) I wonder if loadable modules > could be used to swap parts of the program from extended to regular memory, > with some changes? Modules need some sort of framework to be really useful. Modules are relocatable pieces of code that can contain code and data and can be loaded to arbitrary addresses. However, a module doesn't define any way how the main program and the module talk to each other. Importing/exporting symbols via identifiers is theoretically possible, not supported by the cc65 module loaded, because it ahs a high overhead. Instead, current driver frameworks use a jump table at the start of the module code segment (the standard module linker config has some support for this). Since the jump table depends on the application and the module, just compiling something as a module doesn't make it immediately useful. Another problem with modules is that the runtime and C library is not shared. For one, this would have to be done by name, so the main program would have to include a name table for all runtime functions (overhead). Second, the module doesn't know which runtime functions are linked to the applications (and would therefore be available by dynamic linking) and which are not. Adam had some ideas how to work around this problem. The consequence would be that the modules must match exactly the Contiki binary - something which wouldn't be a problem in the case of Contiki. Regards Uz -- Ullrich von Bassewitz uz_at_musoftware.de ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo_at_musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2003-03-15 14:12:01 CET