The 256KB and 512KB flash/64MB internal RAM versions of Mizar32 use the same eLua/Alcor6L firmware. Use this command:

scons board=mizar32 cpu=AT32UC3A0256

If you're compiling the eLua sources, the build will create a file elua_lua_at32uc3a0256.elf. On the other hand if you're compiling the Alcor6L sources, it will create a file Alcor6L_elua_fp_at32uc3a0256_<timestamp>.elf. The <timestamp> indicates the date of the build.

Alcor6L will by default compile eLua (version 0.9). To use another language (for example, Lisp) on the Mizar32, use the following:

scons cpu=AT32UC3A0256 board=mizar32 lang=picolisp prog

The above will generate Alcor6L_picolisp_fp_at32uc3a0256_<timestamp>.elf. The generated file can be programmed into the Mizar32 boards in various ways: see the chapter Flashing firmware.

To build a version of the eLua interpreter where all numeric variables are integers instead of floating point values, which is smaller and slightly faster, use:

In 128KB of flash memory you can fit the 8KB DFU bootloader and a 120K integer version of eLua. Standard eLua for the Mizar C, compiled with

scons board=mizar32 cpu=at32uc3a0128 target=lualong optram=0

produces a firmware with most of the eLua modules omitted, leaving just the PIO, Timer and UART modules.

The Mizar32 branch of eLua has a series of modification to reduce the code size so as to be able to include all the eLua modules except for the Ethernet module. The features that it removes from eLua are:

the eLua shell (it runs the Lua interpreter directly);

Lua interrupts (an option available with the GPIO, Timer and UART modules);

the Lua debug module, which is of little use in an embedded system;

dump(), used to write compiled code or Lua data into files;

undump(), used to read the same back in, or to load precompiled Lua bytecode from *.lc files;

collectgarbage() and gcinfo(), used to monitor and fine-tune eLua's use of RAM;

the Emergency Garbage Collector, used to improve the performance of systems with very little RAM.

When the compilation is finished, it should have created a file called something like elua_lualong_at32uc3a0256.elf which can be programmed into the Mizar32 board in various ways: see the chapter on Flashing firmware.

If you will be using dfu-programmer to do this, you will first need to convert your .elf file to a .hex file. For example: