Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:27 04 Nov 2026 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 : PicoMite - integrated compact C-compiler / C-runtime

     Page 1 of 2    
Author Message
MikeV73
Newbie

Joined: 03/07/2025
Location: Ukraine
Posts: 25
Posted: 02:16pm 01 Nov 2026
Copy link to clipboard 
Print this post

Fork and branch with working copy: https://github.com/DnCraptor/pico-mm/tree/tcc
Initial documentation: https://github.com/DnCraptor/pico-mm/blob/tcc/docs/PicoMite-native-C-support.md

Changes:
+ TinyCC 0.9.27 with a Thumb-2 back end (RP2350 only);
+ C-runtime (2040/2350);
+ documentation: PicoMite-native-C-support.md;
+ several simple examples in "C" folder;
+ murmulator 2.0 board support in the configuration;
+ native elf-files execution;
+ PIO IDLE MMBasic command.

Several examples: https://github.com/DnCraptor/pico-mm/tree/tcc/C
Related .uf2 builds are publishing there: https://t.me/ZX_MURMULATOR/251133
Edited 2026-11-02 00:25 by MikeV73

Footnote added 2026-11-03 03:43 by MikeV73
UPD:
+ RC1: https://github.com/DnCraptor/pico-mm/releases/tag/PicoMite-V7.0.00b8-tcc-elf-RC1
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 2128
Posted: 04:07pm 01 Nov 2026
Copy link to clipboard 
Print this post

Great work  

I think my head is about to explode. I haven't caught up with Pete's latest developments yet.  
 
hhtg1968
Senior Member

Joined: 25/05/2023
Location: Germany
Posts: 288
Posted: 07:38pm 01 Nov 2026
Copy link to clipboard 
Print this post

I have to echo that.
 
MikeV73
Newbie

Joined: 03/07/2025
Location: Ukraine
Posts: 25
Posted: 02:39am 02 Nov 2026
Copy link to clipboard 
Print this post

Small update:
+ LIBRARY C/ELF CSUB support;
+ LIBRARY ELF-residents (with PIO/GPIO/DMA claim support);
(the same fork/branch)
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 1169
Posted: 09:29am 02 Nov 2026
Copy link to clipboard 
Print this post

I don't really understand what this is all about. Can I use this to write C programs on an RP2350 and then run them on a PicoMite? Or does the compiler already run on a PicoMite, and is BASIC being extended to include C?
Could you maybe describe the entire process of how to use this???

Frank
 
MikeV73
Newbie

Joined: 03/07/2025
Location: Ukraine
Posts: 25
Posted: 11:01am 02 Nov 2026
Copy link to clipboard 
Print this post

  Frank N. Furter said  I don't really understand what this is all about. Can I use this to write C programs on an RP2350 and then run them on a PicoMite? Or does the compiler already run on a PicoMite, and is BASIC being extended to include C?
Could you maybe describe the entire process of how to use this???

Frank


Here are some practical use cases for the pico-mm / tcc branch:

1. Run C programs directly (RP2350 only). Copy a .c file to the SD card and type RUN "maze3.c". PicoMite compiles and runs it automatically. No PC compiler is needed. Example: maze3.c

2. Compile once, run many times (2040/2350). Use TCC "-o game.elf game.c" to build an ELF file. Later, just use RUN "game.elf". You can also build programs from multiple C source files.

3. Run C programs compiled on a PC. Both RP2040 and RP2350 can load suitable ARM ELF object files, even without TinyCC installed in the firmware. Example: ELF loader

4. Use C functions inside BASIC (RP2350 only). Write a CSUB in C instead of manually creating hexadecimal machine code. PicoMite compiles it when saving the BASIC program. The CSUB then runs directly from flash. Example: C CSUB

5. Mix BASIC and C. C programs can read and change BASIC variables and arrays, execute BASIC commands, and call BASIC SUBs and FUNCTIONs. Variables example | BASIC function example

6. Write graphics and games in C (RP2350 only). Use PicoMite graphics, sprites, framebuffers, keyboard, mouse, GUI controls and sound through the C API. Animation | GUI | Sound

7. Control hardware from C. Access GPIO, UART, I2C, SPI, ADC and PWM using PicoMite's existing hardware support. UART | I2C | PWM

8. Use PIO, DMA and hardware events. Control PIO state machines, transfer data with DMA, and receive GPIO or gamepad events in C. PIO/DMA | Gamepad

9. Create resident C services. Install a C service in the flash LIBRARY. It can continue working after BASIC END or another RUN, keeping its state and reserved GPIO, PIO or DMA resources. Similar in purpose to a DOS TSR, but with a controlled API. Resident timer | Resident DMA

10. Work with files using standard C functions. Use fopen, fread, fwrite, fprintf, directory listing and other familiar C functions on PicoMite's filesystem. Example: files.c

Important: The built-in TinyCC compiler works on RP2350 only, and PSRAM is strongly recommended. Precompiled ELF code can run on both RP2040 and RP2350. Hardware features depend on the firmware build.

This is still a development branch, not a finished release.

Full documentation: Native C support in PicoMite
Edited 2026-11-02 21:19 by MikeV73
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 9287
Posted: 11:31am 02 Nov 2026
Copy link to clipboard 
Print this post

C makes me shudder. lol

No offence, Mike, this is very clever stuff, but if I wanted it I'd connect the Pico to the Arduino system and use C++, not Tiny C. Give me MMBasic any day. :) My poor old brain has enough problems in using that.

(Goes back to the comforting world of laying out PCB traces manually - never trust the autorouter!)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 1169
Posted: 11:48am 02 Nov 2026
Copy link to clipboard 
Print this post

@MikeV73:

Thank you very much for your explanation! But the RP2350 doesn't come with an editor, does it?

  MikeV73 said  Related .uf2 builds are publishing there: https://t.me/ZX_MURMULATOR/251133

The site isn't working for me...

Frank
 
MikeV73
Newbie

Joined: 03/07/2025
Location: Ukraine
Posts: 25
Posted: 12:22pm 02 Nov 2026
Copy link to clipboard 
Print this post

  Mixtel90 said   if I wanted it I'd connect the Pico to the Arduino system and use C++, not Tiny C.


It is part of solution. You can build your code on PC, than just use compiled .elf-file as well as .c-file, or .bas-file
 
MikeV73
Newbie

Joined: 03/07/2025
Location: Ukraine
Posts: 25
Posted: 12:23pm 02 Nov 2026
Copy link to clipboard 
Print this post

  Frank N. Furter said  Thank you very much for your explanation! But the RP2350 doesn't come with an editor, does it?


Build in EDIT command is there. Also, F2-RUN is working for C-sources.
 
MikeV73
Newbie

Joined: 03/07/2025
Location: Ukraine
Posts: 25
Posted: 12:25pm 02 Nov 2026
Copy link to clipboard 
Print this post

  Frank N. Furter said  The site isn't working for me...

Build for what hardware you prefer?

Current list:
PICO
PICOUSB
PICOMIN
VGA
M2P1VGA
VGAUSB
WEB
PICORP2350
PICOUSBRP2350
VGARP2350
VGAUSBRP2350
WEBRP2350
HDMI
M2P2HDMI
HDMIUSB
PICOBTRP2350
PICOBTHRP2350
HDMIBTH
HDMIWEB
PC3

But actually tested by me for now: M2P1VGA (2040) and M2P2HDMI (2350)
 
hhtg1968
Senior Member

Joined: 25/05/2023
Location: Germany
Posts: 288
Posted: 03:31pm 02 Nov 2026
Copy link to clipboard 
Print this post

Does this refer to a different version of MMBasic that includes an integrated (tiny) C compiler? Where can the UF2 file be downloaded?
 
MikeV73
Newbie

Joined: 03/07/2025
Location: Ukraine
Posts: 25
Posted: 04:12pm 02 Nov 2026
Copy link to clipboard 
Print this post

  hhtg1968 said  Does this refer to a different version of MMBasic that includes an integrated (tiny) C compiler?

Yes.
  hhtg1968 said  Where can the UF2 file be downloaded?

I'll provide. Actually, build results are not ready yet for all cases.
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 2128
Posted: 04:31pm 02 Nov 2026
Copy link to clipboard 
Print this post

One of the links takes you to Telegram. I have an account on my phone and so I downloaded what appears to be the latest:


MikeV73_uf2_files.zip
 
MikeV73
Newbie

Joined: 03/07/2025
Location: Ukraine
Posts: 25
Posted: 04:43pm 02 Nov 2026
Copy link to clipboard 
Print this post

  PhenixRising said  One of the links takes you to Telegram. I have an account on my phone and so I downloaded what appears to be the latest:


MikeV73_uf2_files.zip


On the telegram group it is only builds for Murmulator 2.0 board.
I'm in progress to provide others.
 
hhtg1968
Senior Member

Joined: 25/05/2023
Location: Germany
Posts: 288
Posted: 05:35pm 02 Nov 2026
Copy link to clipboard 
Print this post

ok. I don't want to rush you...
 
MikeV73
Newbie

Joined: 03/07/2025
Location: Ukraine
Posts: 25
Posted: 05:45pm 02 Nov 2026
Copy link to clipboard 
Print this post

UPD:
RC1: https://github.com/DnCraptor/pico-mm/releases/tag/PicoMite-V7.0.00b8-tcc-elf-RC1

N.B. tested on Murmulator 2.0 board only (for now).
Pls. notify, in case you have some issues, or not )) And on what build.
 
MikeV73
Newbie

Joined: 03/07/2025
Location: Ukraine
Posts: 25
Posted: 07:11pm 02 Nov 2026
Copy link to clipboard 
Print this post

picomite-lifepx.zip

to compare:

run "picomite-lifepx.c"


vs (gcc -O3):

run "picomite-lifepx.elf"


vs

run "picomite-lifepx.bas"


Also, you may try:

tcc "picomite-lifepx.c"
run "picomite-lifepx.elf"
 
hhtg1968
Senior Member

Joined: 25/05/2023
Location: Germany
Posts: 288
Posted: 07:58pm 02 Nov 2026
Copy link to clipboard 
Print this post

wow!

100 times faster!

a video (sorry 480p):

video at youtube


but:

I love to code in basic. mmbasic on cmm1 (1!) ist mostly fast enough for me.

I code in c too, but basic is so cool, so I will see how to code on picomite or in mmbasic in future. i would be cool to integrate some pure c (compiled) procedures (sorry for the ancient name for a sub). therefore I have to read the complete integration in mmbasic...

for programs like a cellular automation this is SO GREAT...
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 1169
Posted: 07:50am 03 Nov 2026
Copy link to clipboard 
Print this post

  MikeV73 said  
  Frank N. Furter said  The site isn't working for me...

Build for what hardware you prefer?

Current list:
PICO
PICOUSB
PICOMIN
VGA
M2P1VGA
VGAUSB
WEB
PICORP2350
PICOUSBRP2350
VGARP2350
VGAUSBRP2350
WEBRP2350
HDMI
M2P2HDMI
HDMIUSB
PICOBTRP2350
PICOBTHRP2350
HDMIBTH
HDMIWEB
PC3

But actually tested by me for now: M2P1VGA (2040) and M2P2HDMI (2350)


Hi Mike,

a simple version for the RP2350 would be great!

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