Dear Alex, dear List,

Alcor6L uses platform configuration files to configure the PicoLisp
build for a specific hardware target. One may then edit this file
(platform_conf.h) to include/exclude Lisp support for specific hardware
peripherals. For example, if one does not require the pulse width
modulation functions, she can simply disable the compilation of the
PWM PicoLisp module by commenting it out.

  /* _ROM(PWM) */

In the older miniPicoLisp (before miniCodeROM), I had placed these
conditionally compilable modules (like PWM) in tab.c like this:

static symInit Symbols[] = {
#  undef _ROM
#  define _ROM(module)\
   {doAbs, "abs"},
   // More code here

Now with miniCodeROM, I must (in theory) place the above conditions
(#ifdefs, other application specific macros for conditional compilation)
in init.s and expect to find them in ram.d/rom.d. The main.c file
(which then includes ram.d and rom.d) will then know the PicoLisp HW
modules it has to include in the build.

However, I see there's no direct way to put user specific code/macros
(like the one above) in init.s. A feature in gen3m which (blindly) copies
user text to ram.d may help in this situation but even if this were
possible, there is no direct way to produce this information alongside
what is already generated in rom.d.

While this might require a tweak in gen3m.c, is there an easier way to
conditionally include ROM and RAM references in main.c? (rom.d &
ram.d includes).


P.S. The same applies to internal immutable symbols. For example, if
the terminal module isn't included in the build, there's no need to
include the internal symbols *term-wait* & *term-nowait*.

Reply via email to