I found an even better way, which is to use platformIO to build uLisp, since platformIO does support the nRF52840, unlike the Sandeep Mistry library.
However, it encounters a similar limitation on the workspace size, so now I don’t believe it’s related to a board definition.
The platformIO build does seem to work if I keep the workspace size relatively small (i.e. below its true potential). Presently, it looks like:
uLisp 2.4
4999>
However, if I try to increase the workspace to 8096, which should be easily accomodated, I get this compile error:
Compiling .pioenvs\nrf52840_dk\src\main.cpp.o
Linking .pioenvs\nrf52840_dk\firmware.elf
c:/users/coolermaster/.platformio/packages/toolchain-
gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-
eabi/bin/ld.exe: .pioenvs\nrf52840_dk\firmware.elf section `.bss' will not fit in
region `RAM'
c:/users/coolermaster/.platformio/packages/toolchain-
gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-
eabi/bin/ld.exe: region RAM overflowed with stack
c:/users/coolermaster/.platformio/packages/toolchain-
gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-
eabi/bin/ld.exe: region `RAM' overflowed by 1072 bytes
collect2.exe: error: ld returned 1 exit status
*** [.pioenvs\nrf52840_dk\firmware.elf] Error 1
Based on this error message, my suspicion now is that the starting address for the uLisp stack is too close to the uLisp heap. Does that sound right to you? If so, which would be the right variable/constant to change?