Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:29 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Build PicoMite MMBasic

     Page 1 of 2    
Author Message
karlelch

Senior Member

Joined: 30/10/2014
Location: Germany
Posts: 237
Posted: 09:18am 07 Nov 2021
Copy link to clipboard 
Print this post

Hi,

maybe someone can give me a pointer here.
I tried to build MMBasic but get at the very end a "region RAM overflowed error" (see below). I used the Linux Subsystem under Windows (Ubuntu 20.04), cloned the repositories as described in the UKTailwind/PicoMite repository. As hinted there, I had to rename a few files to account for Linux caring about uppercase/lowercase letters in file/path name.

Further, I installed the requirements (given in the pico-sdk readme file):
sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
sudo apt-get install build-essential


Then:
mkdir build
cd build
cmake ..
make PicoMite


It compiled ok until I got this message:
[100%] Linking CXX executable PicoMite.elf
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: region RAM overflowed
collect2: error: ld returned 1 exit status
make[3]: *** [CMakeFiles/PicoMite.dir/build.make:1527: PicoMite.elf] Error 1
make[2]: *** [CMakeFiles/Makefile2:1559: CMakeFiles/PicoMite.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1566: CMakeFiles/PicoMite.dir/rule] Error 2
make: *** [Makefile:131: PicoMite] Error 2


So I guess there is some configuration detail for the memory layout missing.
Any help is appreciated.

Thanks
Thomas
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 12:05pm 07 Nov 2021
Copy link to clipboard 
Print this post

It is because you are using an old compiler which seems to be a feature of linux. I'm using 10.2.1 under W11. also make sure you are building release with no debug
Edited 2021-11-07 22:15 by matherp
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 01:45pm 07 Nov 2021
Copy link to clipboard 
Print this post

Should be trivial to grab a newer compiler :)

John
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7937
Posted: 02:20pm 07 Nov 2021
Copy link to clipboard 
Print this post

W11 Peter?
Thou hast indeed ascended. ;)

Rule 1:
Never use versions 0 or 1 of anything unless it's from Microsoft, in which case wait for at least the third odd-numbered release. :)

It's not unusual for linux releases to be using quite old releases of anything - including the dependencies that the updated versions of the supplied applications need.
:(
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
karlelch

Senior Member

Joined: 30/10/2014
Location: Germany
Posts: 237
Posted: 06:01pm 07 Nov 2021
Copy link to clipboard 
Print this post

  matherp said  It is because you are using an old compiler which seems to be a feature of linux. I'm using 10.2.1 under W11. also make sure you are building release with no debug


Thanks for that hint. Now it worked. Here is what I did - I am sure someone with more experience with Linux would know a less convolved way of getting the new compiler version ;-)

Cloning and preparing:
git clone https://github.com/teuler/PicoMite.git
cd PicoMite
git clone https://github.com/raspberrypi/pico-sdk.git
cd pico-sdk
git submodule update --init
export PICO_SDK_PATH=~/PicoMite/pico-sdk/

Now this is what the pico-sdk readme tells one to do:
sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib

But this installs an old compiler version. Being usually a Windows person, I did not figure out to prevent this. Therefore, my awkward solution:
sudo apt remove gcc-arm-none-eabi
cd /opt
sudo wget "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2"
sudo tar -jxf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
sudo rm gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
export PATH="/opt/gcc-arm-none-eabi-10-2020-q4-major/bin:$PATH"

Now the firmware can be build:
cd ~/PicoMite/PicoMite
mkdir build
cd build
cmake ..
make PicoMite
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 07:42am 08 Nov 2021
Copy link to clipboard 
Print this post

  matherp said  It is because you are using an old compiler which seems to be a feature of linux.

It is usually when using a Linux "stable" release.

No-one has to do that, but for naive/newbie Linux users it's probably wise.

Even then, it's typically easy to grab anything newer should such be wanted - and to install these newer things separately from the stable stuff so either can be used at will.

It's all a question of deciding what you want to do, but the default of most distros is to install things known to work and which are known to co-exist with other things also known to work. (Thus "stable".)

John
 
nbrok

Regular Member

Joined: 13/02/2023
Location: Netherlands
Posts: 60
Posted: 01:28pm 24 Feb 2023
Copy link to clipboard 
Print this post

I did build the newest PicoMite using the instructions I read here. Compiling goes well but when trying to run a basic program I get Error: not enough memory.
Going back to the older version (not compiled by myself) the same program runs without error.
I read in the readme  something about replacing spi,h and gpio.c in the pico-sdk but I don't understand how, where...
Any hel appreciated.
Greetings,
Nick de pe1goo
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 01:40pm 24 Feb 2023
Copy link to clipboard 
Print this post

  nbrok said  I did build the newest PicoMite using the instructions I read here. Compiling goes well but when trying to run a basic program I get Error: not enough memory.


Can't help you with that, other than to say I didn't have that problem when I built 2-3 weeks ago.

  nbrok said  I read in the readme  something about replacing spi,h and gpio.c in the pico-sdk but I don't understand how, where...
Any hel[p] appreciated.


The source-repo is "a bit 'how ya goin'" as our Aussie members might say, we even appear to have two CMakeLists.txt file at the moment .

However I believe that the files you need to replace in the standard (v1.5) pico-sdk are:

   src/rp2_common/hardware_gpio/gpio.c
   src/rp2_common/hardware_spi/include/hardware/spi.h

Peter, I'm loathe to take on extra responsibilities, but if you want then I offer my services to maintain the github repo, e.g. you would put updated files on DropBox (or the like) and I would take reponsibility for updating github and keeping the build instructions up2date.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
nbrok

Regular Member

Joined: 13/02/2023
Location: Netherlands
Posts: 60
Posted: 02:37pm 24 Feb 2023
Copy link to clipboard 
Print this post

@thwill
I have retested the compilation and all work, but doing circle 160,120,100,3,1,&Hff0000
does generate the not enough memory error. When I type 1 instead of the 3 (Thickness of circle) the circle is drawn without error.
Peter: a new bug?
Edited 2023-02-25 00:43 by nbrok
Greetings,
Nick de pe1goo
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 03:22pm 24 Feb 2023
Copy link to clipboard 
Print this post

Nick,

Both versions of your circle work for me on b23 but I didn't build it myself.

John
 
nbrok

Regular Member

Joined: 13/02/2023
Location: Netherlands
Posts: 60
Posted: 03:56pm 24 Feb 2023
Copy link to clipboard 
Print this post

  JohnS said  Nick,

Both versions of your circle work for me on b23 but I didn't build it myself.

John

The circle is drawn on the LCD I've no VGA version. If your version is also none vga then my build is going wrong somewhere, but the build doesn't generate any errors.
Where do you get the precompiled beta versions?
Edited 2023-02-25 01:57 by nbrok
Greetings,
Nick de pe1goo
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 04:47pm 24 Feb 2023
Copy link to clipboard 
Print this post

Mine is VGA. I don't currently have non-VGA.

Peter posts the zip files periodically.

John
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2640
Posted: 09:53pm 24 Feb 2023
Copy link to clipboard 
Print this post

I think the latest non-VGA is toward the top of this page.

https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=15457&LastEntry=Y#198239#197921

Or
https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip
 
nbrok

Regular Member

Joined: 13/02/2023
Location: Netherlands
Posts: 60
Posted: 05:31am 25 Feb 2023
Copy link to clipboard 
Print this post

  phil99 said  I think the latest non-VGA is toward the top of this page.

https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=15457&LastEntry=Y#198239#197921

Or
https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip

This is not what I asked. I tried to compile the latest none vga version from github (https://github.com/UKTailwind/PicoMite) and got the problem I mentioned earlier. Probably I do something wrong, or forget to do the right settings for compiling picomate. but the code is compiled without errors. Plotting a circle with a thickness greater then one causes a not enough memory error. My question is how to compile the latest picomite with the pico sdk?
Edited 2023-02-25 15:32 by nbrok
Greetings,
Nick de pe1goo
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2640
Posted: 05:53am 25 Feb 2023
Copy link to clipboard 
Print this post

  nbrok said    Where do you get the precompiled beta versions?

Edited 2023-02-25 16:00 by phil99
 
nbrok

Regular Member

Joined: 13/02/2023
Location: Netherlands
Posts: 60
Posted: 06:23am 25 Feb 2023
Copy link to clipboard 
Print this post

  phil99 said  
  nbrok said    Where do you get the precompiled beta versions?

You ate right, I asked this also.... but my original question isn't answered but thanks anyway.
Greetings,
Nick de pe1goo
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 07:58am 25 Feb 2023
Copy link to clipboard 
Print this post

I'm planning to re-do compiling my own but am time-short just now. I'll post when I've done it.

John
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 09:13am 25 Feb 2023
Copy link to clipboard 
Print this post

I haven't released a beta for the PicoMite since b18 as I've been working on the VGA and WEB versions. Anything you build from later source than that from github is at your own risk and may well contain issues.
I do not and will not provide support for building your own versions as there are too many unknowns in your build environment compared to mine.
I do not use github as anything but an occasional dump of files as I have my own development approach so don't expect anything rational on github except when a full release is made.
I will always provide as much support as possible for the versions, including alphas and betas, that I release as binaries
Edited 2023-02-25 19:15 by matherp
 
nbrok

Regular Member

Joined: 13/02/2023
Location: Netherlands
Posts: 60
Posted: 10:01am 25 Feb 2023
Copy link to clipboard 
Print this post

@matherp,

Thanks for your explanation. I'll await the official compiled binaries instead of compiling it by myself. The reason I wanted to compile is a bug in the triangle function. But you're right because every environment used for the SDK can be different. (OS, version setup, etc)
I hope that in the next official none VGA release the triangle function is working as expected... I read that it is solved in the vga beta version.


Thanks.
Greetings,
Nick de pe1goo
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 11:25am 25 Feb 2023
Copy link to clipboard 
Print this post

Isn't the triangle bug fixed?

John
 
     Page 1 of 2    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025