<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">The brand spanking new RP2350 uses the ARM Cortex M33, an ARMv8M, which supports a Protected Memory System Architecture (PMSA).<div><br><div>Does that offer what the CCL garbage collector needs?</div><div><br id="lineBreakAtBeginningOfSignature"><div dir="ltr">--Tim</div><div dir="ltr"><br><blockquote type="cite">On Jul 28, 2024, at 13:11, Ron Garret <ron@flownet.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><meta http-equiv="Content-Type" content="text/html; charset=utf-8">1. Obtain a tool chain for the Pico and get hello-world running.<div class=""><br class=""></div><div class="">2. Use that tool chain to compile the CCL sources using the Arm32 Makefile.</div><div class=""><br class=""></div><div class="">3. Write stubs for all the undefined symbols. The stubs should all be breakpoints.</div><div class=""><br class=""></div><div class="">4 Recompile.</div><div class=""><br class=""></div><div class="">5. Run the resulting binary and see what happens. If you're lucky, you will hit a breakpoint in one of your stubs. Write a functional version of that stub.</div><div class=""><br class=""></div><div class="">6. Goto 4.</div><div class=""><br class=""></div><div class="">My guess is that the biggest challenge you're going to face is that the ARM Cortex M0 doesn't have an MMU. AFAIK, the modern CCL GC depends on that.</div><div class=""><br class=""></div><div class="">rg</div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 28, 2024, at 8:37 AM, Jon Boone <<a href="mailto:ipmonger@delamancha.org" class="">ipmonger@delamancha.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<title class=""></title>
<div class="">
<div name="messageBodySection" class="">
<div dir="auto" class="">For those who might be interested in such a project, where would one start? </div>
</div>
<div name="messageSignatureSection" class=""><br class="">
— jb</div>
<div name="messageReplySection" class="">On Jul 28, 2024 at 10:54 -0400, Tim McNerney <<a href="mailto:mc@media.mit.edu" class="">mc@media.mit.edu</a>>, wrote:<br class="">
<blockquote type="cite" style="border-left-color: grey; border-left-width: thin; border-left-style: solid; margin: 5px 5px;padding-left: 10px;" class="">
<div dir="ltr" class="">The popular Raspberry Pi Pico chip (RP2040) is a remarkable microprocessor with <i class="">memory resources</i> not dissimilar from the Mac 512k, CCL’s debut target. Here are some quick facts.
<div dir="ltr" class="">
<div class="">
<ul style="-webkit-text-size-adjust: auto; box-sizing: border-box; font-family: Roboto, sans-serif;" class="">
<li style="box-sizing: border-box;" class=""><p style="box-sizing: border-box; margin: 0px 0px 15px; padding: 0px; font-size: 0.95em; line-height: 1.5em;" class="">Dual ARM Cortex-M0+ @ 133MHz</p>
</li>
<li style="box-sizing: border-box;" class=""><p style="box-sizing: border-box; margin: 0px 0px 15px; padding: 0px; font-size: 0.95em; line-height: 1.5em;" class="">264kB on-chip SRAM in six independent banks</p>
</li>
<li style="box-sizing: border-box;" class=""><p style="box-sizing: border-box; margin: 0px 0px 15px; padding: 0px; font-size: 0.95em; line-height: 1.5em;" class="">Support for up to 16MB of off-chip Flash memory via dedicated QSPI bus</p>
</li>
</ul>
<div class="">Some might argue it’s not comparable to a Mac 512. I claim it is: consider that the RAM would <i class="">only</i> used for the heap, stack(s), and housekeeping? It is the off-chip flash support that makes all the difference. That’s where you can store static code and data segments that make up the bulk of a CCL image. </div>
<div class=""><br class=""></div>
<div class="">My big questions:</div>
<div class=""><br class=""></div>
<div class="">1) Could this chip run CCL?</div>
<div class=""><br class=""></div>
<div class="">2) Would it be worth the effort?</div>
<div class=""><br class=""></div>
<div class="">I think <b class="">yes</b> on both fronts. A lot of embedded code is truly modest, so a small heap is useful enough. This is the arena where microPython shines—itself sporting a garbage collector. </div>
<div class=""><br class=""></div>
<div class="">3) Does anyone want to try?</div>
<div class=""><br class=""></div>
<div class="">CCL already has 32-bit ARM support. There is no OS interfacing work to do here (only work to make up for the <i class="">lack</i> of OS). </div>
<div class=""><br class=""></div>
<div class="">This could be a fun little project that would a great way to become familiar with CCL internals without a lot of distractions from OS and GUI issues. First get it working from a serial port console (over Bluetooth maybe?) and focus on embedded applications. Slash and burn the rest, at least for starters. </div>
<div class=""><br id="lineBreakAtBeginningOfSignature" class="">
<div dir="ltr" class="">--Tim</div>
<div dir="ltr" class=""><br class="">
<blockquote type="cite" class="">On Jul 28, 2024, at 01:32, R. Matthew Emerson <<a href="mailto:rme@clozure.com" class="">rme@clozure.com</a>> wrote:<br class="">
<br class=""></blockquote>
</div>
<blockquote type="cite" class="">
<div dir="ltr" class=""><span class=""></span><br class="">
<span class=""></span><br class="">
<blockquote type="cite" class=""><span class="">On Jul 27, 2024, at 8:23 PM, Grégory Vanuxem <<a href="mailto:g.vanuxem@gmail.com" class="">g.vanuxem@gmail.com</a>> wrote:</span><br class=""></blockquote>
<blockquote type="cite" class=""><span class=""></span><br class=""></blockquote>
<blockquote type="cite" class=""><span class="">In FriCAS built on top of Clozure CL I obtain this output in a terminal (WSL2)</span><br class=""></blockquote>
<blockquote type="cite" class=""><span class=""></span><br class=""></blockquote>
<blockquote type="cite" class=""><span class="">(gamma(x) âÃÂàreals && Re(x) > 0) || (x âÃÂàintegers &&</span><br class=""></blockquote>
<blockquote type="cite" class=""><span class="">gamma(x) âÃÂàreals)</span><br class=""></blockquote>
<blockquote type="cite" class=""><span class=""></span><br class=""></blockquote>
<blockquote type="cite" class=""><span class="">instead of (SBCL)</span><br class=""></blockquote>
<blockquote type="cite" class=""><span class=""></span><br class=""></blockquote>
<blockquote type="cite" class=""><span class="">(gamma(x) ∈ reals && Re(x) > 0) || (x ∉ integers && gamma(x) ∈ reals)</span><br class=""></blockquote>
<blockquote type="cite" class=""><span class=""></span><br class=""></blockquote>
<blockquote type="cite" class=""><span class="">if I (print ...) a string with, for example, ∈, in a pure Clozure CL</span><br class=""></blockquote>
<blockquote type="cite" class=""><span class="">(recently git cloned) this is correctly printed, no problem.</span><br class=""></blockquote>
<blockquote type="cite" class=""><span class=""></span><br class=""></blockquote>
<blockquote type="cite" class=""><span class="">So I wonder if I have to modify the output stream character encoding</span><br class=""></blockquote>
<blockquote type="cite" class=""><span class="">or the output routine.</span><br class=""></blockquote>
<span class=""></span><br class="">
<span class="">Check that the external format of the FriCAS output stream is what you expect. In other words, if you pass an explicit :external-format argument to cl:open, make sure it matches what your terminal requires.</span><br class="">
<span class=""></span><br class="">
<span class="">Doing (describe *terminal-io*) might show something interesting. Here’s what it shows for me:</span><br class="">
<span class=""></span><br class="">
<span class="">? (describe *terminal-io*) </span><br class="">
<span class="">#<ECHOING-TWO-WAY-STREAM input #<BASIC-CHARACTER-INPUT-STREAM UTF-8 (TTY/0) #x1824C7D6>, output #<BASIC-CHARACTER-OUTPUT-STREAM UTF-8 (TTY/1) #x1824C2A6> #x1825FBE6></span><br class="">
<span class="">Class: #<STANDARD-CLASS ECHOING-TWO-WAY-STREAM></span><br class="">
<span class="">Wrapper: #<CLASS-WRAPPER ECHOING-TWO-WAY-STREAM #x18039A16></span><br class="">
<span class="">Instance slots</span><br class="">
<span class="">SHARED-RESOURCE: NIL</span><br class="">
<span class="">OPEN-P: T</span><br class="">
<span class="">INPUT-STREAM: #<BASIC-CHARACTER-INPUT-STREAM UTF-8 (TTY/0) #x1824C7D6></span><br class="">
<span class="">OUTPUT-STREAM: #<BASIC-CHARACTER-OUTPUT-STREAM UTF-8 (TTY/1) #x1824C2A6></span><br class="">
<span class=""></span><br class="">
<span class="">The default external format has been #<EXTERNAL-FORMAT :UTF-8/:UNIX #x18249C6E> for quite a long time now.</span><br class="">
<span class=""></span><br class="">
<span class=""><a href="https://ccl.clozure.com/docs/ccl.html#characters-and-external-formats" class="">https://ccl.clozure.com/docs/ccl.html#characters-and-external-formats</a></span><br class="">
<span class=""></span><br class="">
<span class=""></span><br class="">
<blockquote type="cite" class=""><span class=""></span><br class=""></blockquote>
<blockquote type="cite" class=""><span class="">And more importantly, how can I achieve that?</span><br class=""></blockquote>
<blockquote type="cite" class=""><span class=""></span><br class=""></blockquote>
<blockquote type="cite" class=""><span class="">- Greg</span><br class=""></blockquote>
<blockquote type="cite" class=""><span class=""></span><br class=""></blockquote>
<blockquote type="cite" class=""><span class="">PS:</span><br class=""></blockquote>
<blockquote type="cite" class=""><span class="">(1) -> )lisp CCL:*DEFAULT-EXTERNAL-FORMAT*</span><br class=""></blockquote>
<blockquote type="cite" class=""><span class="">Value = :UNIX</span><br class=""></blockquote>
<span class=""></span><br class="">
<span class=""></span><br class=""></div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div></blockquote></div><br class=""></div></div></blockquote></div></div></body></html>