Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 23:28 06 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 4 of 4    
Author Message
bfwolf
Senior Member

Joined: 03/01/2025
Location: Germany
Posts: 264
Posted: 11:56am 05 Nov 2026
Copy link to clipboard 
Print this post

I think, this will be an interesting possibility:

https://www.thebackshed.com/forum/ViewTopic.php?TID=19209&P=1#260985

"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"
https://github.com/DnCraptor/pico-mm/blob/tcc/Bas/pm_library_csub_tcc.bas
 
ville56
Guru

Joined: 08/06/2022
Location: Austria
Posts: 660
Posted: 02:19pm 05 Nov 2026
Copy link to clipboard 
Print this post

Please help a C beginner ... what's wrong here?

>
> list "x.c
#include <stdio.h>
int main(int argc, char **argv)
{
   printf("Hello from C, argc=%d\n", argc);
   For (int i = 1; i < argc; i++)
       printf("  argv[%d] = %s\n", i, argv[i]);
   Return 0;
}
>
>
> run "x.c
x.c:6: warning: implicit declaration of function 'For'
x.c:6: error: identifier expected
Error : C compilation failed
>

Tnx,
Gerald
                                                                 
73 de OE1HGA, Gerald
 
MikeV73
Newbie

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

  ville56 said  Please help a C beginner ... what's wrong here?

>
> list "x.c
#include <stdio.h>
int main(int argc, char **argv)
{
   printf("Hello from C, argc=%d\n", argc);
   For (int i = 1; i < argc; i++)
       printf("  argv[%d] = %s\n", i, argv[i]);
   Return 0;
}
>
>
> run "x.c
x.c:6: warning: implicit declaration of function 'For'
x.c:6: error: identifier expected
Error : C compilation failed
>

Tnx,
Gerald


capitalisation. C is case secisitive lang.
it should be "for", not "For", and "return", not "Return"
 
ville56
Guru

Joined: 08/06/2022
Location: Austria
Posts: 660
Posted: 02:31pm 05 Nov 2026
Copy link to clipboard 
Print this post

ouch ... thank you.

Had a C/C++ course 30 years ago. Used it only once in 1999 to get a DCF77 NTP server Y2k ready which the vendor refused to do saying it was impossible. Was rather trivial then. But now all memories of C have faded away.
                                                                 
73 de OE1HGA, Gerald
 
MikeV73
Newbie

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

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

What's new since RC2

1. Resident keyboard remapping
- New C API for remapping physical keyboard input (PS/2 and USB).
- Key press, release, repeat and modifier events.
- Callbacks remain active across BASIC RUN and END.
- New printable-character classification hook for console, EDIT and FM.

2. Russian keyboard support (KeyRus)
- Resident EN/RU keyboard remapper using Windows-1251.
- Ctrl+Shift switches between layouts.
- Includes an 8x16 Cyrillic font (#10).
- Works on RP2350 (TinyCC) and RP2040 (precompiled ELF).
- Includes install, start and stop scripts.
- Supports automatic startup with OPTION AUTORUN ON.

Source: KeyRus files and examples

3. C syntax highlighting in EDIT
- Syntax colours for .c and .h files.
- Keywords, directives, comments, strings and numbers.
- Recognises native PicoMite C API functions.
- Different colours for functions unavailable or restricted in CSUB.
- Works on the local display and ANSI terminals.

4. Console font API
- Added pm_set_console_font() for resident-controlled console fonts.
- Custom fonts can be used in the console and EDIT.
- Fixed lost FM colours when using custom fonts in video mode 1.

Bug fixes

- OPTION LOGGING no longer writes extra bytes or garbage after error messages (#139).
- MM.INFO(USB VID/PID n) now returns 0 for unused channels (#142).
- PLAY TONE and PLAY SOUND now play at the correct speed and pitch after WAV/MOD playback or a USB connection sound (#145).
- Fixed Python detection when embedding TinyCC headers during RP2350 builds.

Native C API

Updated to API v35, adding keyboard remapping, printable-character classification and console font control.

KeyRus quick start

Copy the KeyRus files to the PicoMite filesystem, then run:


RUN "key_rus_install.bas"


To stop:

RUN "key_rus_stop.bas"


To enable automatic startup, load key_rus_start.bas into the program memory and use:

OPTION AUTORUN ON


Changes since RC2

Full comparison: RC2 to RC3

RC3 source commit: 67a9e5477
Edited 2026-11-06 02:06 by MikeV73
 
MikeV73
Newbie

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

Actually, any language may be provided, and russian with cp1251 - just techno demo.
 
PhenixRising
Guru

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

  ville56 said  ouch ... thank you.

Had a C/C++ course 30 years ago. Used it only once in 1999 to get a DCF77 NTP server Y2k ready which the vendor refused to do saying it was impossible. Was rather trivial then. But now all memories of C have faded away.


I just take MMBasic code and have Gemini translate to C  

I also set:

  Quote  >OPTION CASE LOWER
 
ville56
Guru

Joined: 08/06/2022
Location: Austria
Posts: 660
Posted: 04:39pm 05 Nov 2026
Copy link to clipboard 
Print this post

nah, want to write my own C code in the first place. AI may come later after I have understood C a bit more.
But tnx for the hint with option case lower.
                                                                 
73 de OE1HGA, Gerald
 
     Page 4 of 4    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026