PicoCalc Compile Error

I’m trying to compile the PicoCalc software in Ubuntu. I followed the instructions as closely as I could (I’m no expert in Ubuntu!) but when I do cmake .. it ends like this:

[ 12%] Built target slower_boot2_library
[ 12%] Building C object CMakeFiles/PicoMite.dir/PicoMite.c.o
/home/tom/PicoMite/PicoMite.c:47:10: fatal error: pico/unique_id.h: No such file or directory
   47 | #include "pico/unique_id.h"
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/PicoMite.dir/build.make:76: CMakeFiles/PicoMite.dir/PicoMite.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1758: CMakeFiles/PicoMite.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

What’s happening and how do I fix it?

I think you might be missing the Pico SDK.

However, to be clear, this isn’t the “PicoCalc software” ! What ClockworkPi are distributing (and have linked to from GitHub) is a fork of the MMBasic firmware for the Raspberry Pi Pico, otherwise known as the PicoMite (Geoff's Projects - BASIC Interpreter for the Raspberry Pi Pico).

Currently ClockworkPi aren’t respecting the license conditions for distributing MMBasic, especially clauses 3 and 4:

<COPYRIGHT HOLDERS>  Geoff Graham, Peter Mather
Copyright (c) 2021, <COPYRIGHT HOLDERS> All rights reserved. 
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 
1.	Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2.	Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
    in the documentation and/or other materials provided with the distribution.
3.	The name MMBasic be used when referring to the interpreter in any documentation and promotional material and the original copyright message be displayed 
    on the console at startup (additional copyright messages may be added).
4.	All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed 
    by the <copyright holder>.
5.	Neither the name of the <copyright holder> nor the names of its contributors may be used to endorse or promote products derived from this software 
    without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDERS> AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDERS> BE LIABLE FOR ANY DIRECT, 
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

(Yes, I know the formatting of that license is a bit iffy, but the intent is clear.)

Hopefully ClockworkPi will adjust their website with the necessary accreditations and engage with the MMBasic authors and the MMBasic community (https://www.thebackshed.com/forum/ViewForum.php?FID=16) who are understandably a bit grumpy about this. If for no other reason that it will make it much easier for ClockworkPi to keep the latest and greatest MMBasic running on the very pretty looking PicoCalc… it looks like they are already a major version or two out of date.

Best wishes,

Tom

2 Likes

Oh hey Tom(L), I’ve just had a look at your bio and you presumably know this already because you are part of the “MMBasic community” :laughing:.

If it’s like their other devices (uConsole, Devterm, Gameshell), I suspect the software will end up being updated, maintained, and released by the community once people start receiving their devices. So I guess at that point the software distributions could, and will, be made to respect the license conditions.

It’s unfortunate to hear the current official Clockwork version is already behind (and not following the license). In the past they usually started with the latest version of the OS they built on, even if it wasn’t able to be properly updated months later, and the community ended up stepping in to support it when things broke.

1 Like

Yup. I have the Pico SDK loaded. I do hope ClockworkPi maintains a good relationship with the MMBasic people. That would be best for everyone.

1 Like

ok license added in

3 Likes

Thank you @guu, I appreciate this step, but I think there is a little more to be done. I’ll drop you a PM once I’ve had a chance to speak with Geoff and Peter.

Best wishes,

Tom

I’m sorry, but could you please explain the licensing issue in more detail? It’s just a patch file that was published by ClockworkPi, so why do you think there is any violation at all?

Edit: OK, I had re-read the terms and now I understand. A bit unusual to me for license to have promotional clauses.

@mxp The original 4-clause BSD license had something similar. I’m hoping that some minimal changes to what ClockworkPi have published on their website will be agreeable and iron over any potential misunderstandings.

Note that there is “historical baggage” surrounding someone in the past (not ClockworkPi) having potentially tried to usurp the “ownership” of MMBasic and it can make the community a bit prickly. However I like to think this can be overcome and allow users of the PicoCalc to use the IMO superb MMBasic and have access to its existing library of programs.

2 Likes

@ Toml_12953
When you setup the SDK, did you checkout version 2.0? when I tried to compile PicoMite on the latest SDK, it failed and I had to setup a new environment.

Second, when you downloaded the PicoMite source, did you apply the PicoCalc patch provided by Clockworkpi?

Once I did those two things, I had no trouble compiling the code into a uf2 file.

I only downloaded the SDK version that was apparent on the site. I did apply the patch.

@Toml_12953, You are probably using the latest version of the SDK, when I tried to use the latest version, it threw compiler errors at me as well. Have a look at Clockworkpi’s instructions for setting up the SDK environment, it specifically has you checking out the 2.0 version. Once I did that and applied the patch, PicoMite compiled fine.