Interpreted languages have many advantages, especially if you can interact with the board in real time to perform tests.
FORTH is incredible in that regard. Very small, self-compiling, fast, and powerful. It's a shame that it's so complicated.
Currently, LUA and MicroPython are the most commonly used compiled language options in practice (only for medium and large microprocessors).
I have been looking for an alternative for smaller microcontrollers for some time, but BASIC (with line numbers) seems to be the only option available.
QuoteCurrently, LUA and MicroPython are the most commonly used compiled language options in practice (only for medium and large microprocessors).
They are not compiled, they are interpreted.
QuoteQuoteCurrently, LUA and MicroPython are the most commonly used compiled language options in practice (only for medium and large microprocessors).
They are not compiled, they are interpreted.My fault. I meant interpreted languages.
QuoteQuoteCurrently, LUA and MicroPython are the most commonly used compiled language options in practice (only for medium and large microprocessors).
They are not compiled, they are interpreted.My fault. I meant interpreted languages.You are not wrong. Lua and Micropython compile the code into bytecode and execute that. There is also the option to pre-compile a program to bytecode so you can leave the compiler out and thus saving flash space and the time needed to compile the program. But the latter happens pretty quick though.
[PIC] inability to call a ROM function via a pointer.
Quote[PIC] inability to call a ROM function via a pointer.
You can jump to a pointer, by movf or movwf to the PC (and appropriate bank manipulation.)
Interactive interpreted languages are problematic on microcontrollers with small RAM. There just isn't any place to put source code that you might type in, much less that plus the byte-code compiled version plus working memory.
2k seems to be about 50 lines of BASIC, for instance (looking at one of my old BASIC programs.)
You won't be able to fit all the functions you might want to call into a single page.
CALLI: ; enter using "call CALLI", with dest16 in desth:destl
; destroys W
movf desth, W
movwf PCLATH
movf destl, W
movwf PCL ; jump indirect to code by storing into PC
; return will go to caller.
(I think. It's been a long time since I've actually programmed a PIC in ASM.)Note that there are at least three almost completely independent things here:
1) what the human-written source code looks like: BASIC, C, Pascal, Forth, Lua, JavaScript, ...
2) how the program code is represented at runtime: native machine code, native threaded code ([almost] exclusively a sequence of JSRs), address-threaded code, token-threaded code (bytecode), parse tree
3) the execution model for data values: stack, numbered registers, names in a dictionary
Pretty much all combinations are viable.
There is also early (parse / compile time) or late (runtime) lookup/binding of variable and function names to locations.
There are some tiny LISP implementations.
Probably not great for the tiny microcontrollers, since AFAIK LISP would tend to be RAM and Pointer intensive.

Some time ago, when Microchip acquired Atmel, I also had doubts about the continuity of Atmega, but for now it does not appear that they will be discontinued.
I just hope the same thing happens with Arduino.
Did anyone try the new Uno?
Did anyone try the new Uno?
Also, what could be their strategy for future boards? Now they have an Uno, great job. What's next? Do we get boards with Qualcomm microcontrollers or only processors with huge BOM list?
Did anyone try the new Uno?I've got the board just to look at Renesas devices, but then I actually read the datasheet and lost any interest in even trying. You can pay your way for marketing, but if the product us bad, you can't force people to adopt it.Also, what could be their strategy for future boards? Now they have an Uno, great job. What's next? Do we get boards with Qualcomm microcontrollers or only processors with huge BOM list?There was an FCC leak fro their next product - it is a white label of some ESP32 + TFT display in a plastic case. Looks more like a finished product, but the point if it is not clear.
An interactive Forth is even harder on PIC16 and below due to the inability to execute code from RAM and inability to call a ROM function via a pointer. You could do token-threaded with a jump table for ROM routines. The poor support for stacks in RAM and the inaccessible 8 level function call stack in hardware are also very limiting. Maybe a fully-interpreted language is in fact the best you can do there.
An interactive Forth is even harder on PIC16 and below due to the inability to execute code from RAM and inability to call a ROM function via a pointer. You could do token-threaded with a jump table for ROM routines. The poor support for stacks in RAM and the inaccessible 8 level function call stack in hardware are also very limiting. Maybe a fully-interpreted language is in fact the best you can do there.
Parking the Forth aspect to one side (I was once a Forth programmer in the late 1980s, so I'm not a Luddite regarding Forth), your comments on PIC16 is based on pretty old devices. In the "enhanced mid-range" devices (all those introduced over the past 15 years or so)