I have been compiling previous versions of the PicoMite software but with the current (B7) beta, I get all sorts of errors. How can I compile the latest beta?
Works for me. I can’t tell you what is wrong because I don’t know your build environment and you did not give examples of the error messages. I have a build script that I use under Raspberry Pi OS on a Pi5. The method is reasonably simple after installing the prerequisite products.
Unzip github archive in a directory
Move to the directory
Edit CMakeLists.txt to set variant (PICO,WEB,PICORP2350,WEBRP3250)
Delete build directory if it exists
Create a build directory
Change to build directory
Enter the command “cmake ..” or “cmake .. -DPICO_SDK_PATH=”
Then enter the command “make -j8”
If all goes well you will find “PicoMite.uf2” in the build directory.
echo ==== PICO ====
sed -i 's/^set(COMPILE/#set(COMPILE/' CMakeLists.txt
sed -i 's/#set(COMPILE .*)/set(COMPILE PICO)/' CMakeLists.txt
BUILDDIR=build_picomite_pico1
rm -rf $BUILDDIR
mkdir $BUILDDIR; cd $BUILDDIR; cmake .. -DPICO_SDK_PATH=$SDK; make -j8;
cp PicoMite.uf2 ../uf2/picomite_v${VER}${REV}\_pico1.uf2
cd ..; #rm -rf $BUILDDIR
Here are the first errors:
In file included from /home/tom/picocalc/PicoMiteAllVersions/MMBasic_Includes.h:32,
from /home/tom/picocalc/PicoMiteAllVersions/PicoMite.c:40:
/home/tom/picocalc/PicoMiteAllVersions/MMBasic.h:328:35: error: 'MAXSUBFUN' undeclared here (not in a function)
328 | extern struct s_funtbl funtbl[MAXSUBFUN];
| ^~~~~~~~~
/home/tom/picocalc/PicoMiteAllVersions/PicoMite.c:252:73: error: 'FLASH_TARGET_OFFSET' undeclared here (not in a function); did you mean 'TARGET_OFFSET'?
252 | const uint8_t *flash_option_contents = (const uint8_t *)(XIP_BASE + FLASH_TARGET_OFFSET);
| ^~~~~~~~~~~~~~~~~~~
| TARGET_OFFSET
In file included from /home/tom/picocalc/PicoMiteAllVersions/PicoMite.c:34:
/home/tom/picocalc/PicoMiteAllVersions/configuration.h:266:23: error: 'HEAP_MEMORY_SIZE' undeclared here (not in a function)
266 | #define MAX_PROG_SIZE HEAP_MEMORY_SIZE
| ^~~~~~~~~~~~~~~~
Most likely you did not update CMakeLists.txt.
You must change
#set(COMPILE VGA)
to
set(COMPILE ????)
Where ??? is one of PICO, WEB, PICORP2350, WEBRP2350
Please note that “#” at the beginning of the line must also be removed.
Arrrgh! That’s exactly what I overlooked. I forgot to remove the #. Thank you! It compiles perfectly now. One of the changes I’d like to make (but may never get around to) is to add this:
OPTION PRINTZONES ON|OFF
Allows print zones in PRINT statements. Default: OFF
and
OPTION ZONEWIDTH n
Sets the width of print zones to n columns. Default: 10
What this will do is to allow the comma in a PRINT statement to act like other BASICs and move the cursor to the next print zone rather than just print a single space. I know it’s not as useful for a 40-column display but still it would make converting old BASIC programs a lot easier. The default is OFF for compatibility with other PicoMite BASIC programs. If you don’t want to use it, then do nothing and your programs will work as they always have.
Implementing those print zones sounds like a good idea. One of the things that I do is to convert old BASIC programs, and the print zones would be one less thing to worry about.
Thanks.