On 2025-12-19 20:15, John Sarabacha wrote:
Is the latest release for amForth a good starting point to make changes
and
use for CH32X033/035 chips particularly for calling existing C and
assembly
routines? Even though existing work is on going with CH32V307
(amForth-RV), this information is invaluable for a working version for
CH32X033/035 even though flash and ram is less (62k flash 20k sram)
compared to CH32V307. There is a version of forth on ch32v003 on
GitHub,
however my research has shown that amForth should be a better fit for
hybrid deployment, using forth to manage code on remote
microcontrollers.
Any comments would be appreciated.
Regards,
John S
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
[email protected]
https://lists.sourceforge.net/lists/listinfo/amforth-devel
Hello John,
AmForth-RV is experimental, and the latest efforts, mine at least,
have not made it to the svn repo. As the new maintainer-lite (see
mailing list archive) for AmForth, this is something I am working
towards.
On the CH32V307, AmForth-RV is able to call C and external assembly
routines, and additionally handle C and Forth based isr. This is how
it uses the WCH library to provide access to the CH32V307 USBHS
peripheral. Some flash usage data.
C build with USB (AmForth-RV assembly core + external C from WCH)
text data bss dec hex filename
43492 541 15204 59237 e765 ./build/amforth.elf
ASM build (AmForth-RV assembly core only)
text data bss dec hex filename
35544 297 12848 48689 be31 ./build/amforth.elf
Looking at the ASM build, it needs ~36kB of flash. With the removal of
surplus development/debug material perhaps, 32k flash. I have this
running on a CH32V203 which is 64kB/20kB. The C build with USB does
not really fit, and I have not managed to get the USBFS device on
my particular CH32V203 dev board to work yet.
AmForth-RV *really* is experimental, so if you want to experiment with
the CH32X033/035 mcu it might be a good place to start. AmForth-RV in
64kB/20kB with USB would be a very nice milestone.
Best wishes,
Tristan
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
[email protected]
https://lists.sourceforge.net/lists/listinfo/amforth-devel