<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style='--code-editor-font: var(--default-mono-font, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;'>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>
GitLab
</title>

<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>

<style>img {
max-width: 100%; height: auto;
}
body {
font-size: .875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px;
}
body {
font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style='font-size: inherit; -webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px; font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";'>
<div class="content">

<p style="color: #777777;">
<a href="https://gitlab.rtems.org/l1zard">Sameer Srivastava</a>
<a href="https://gitlab.rtems.org/groups/rtems/-/work_items/22#note_129429">commented</a>:
</p>
<div class="md" style="position: relative; z-index: 1; color: #3a383f; word-wrap: break-word;">
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">Updated the <a href="https://gitlab.rtems.org/l1zard/micropython/-/issues/1#note_129428" data-reference-type="issue" data-original="issue" data-link="true" data-link-reference="true" data-issue="29173" data-project="403" data-iid="1" data-namespace-path="l1zard/micropython" data-project-path="l1zard/micropython" data-issue-type="issue" data-container="body" data-placement="top" title="MicroPython Tests" class="gfm gfm-issue" style="margin-top: 0;">issue</a> tracking tests (594/594 passing tests).</p>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">We had plans to enable <code style='font-size: 90%; color: #18171d; word-wrap: break-word; border-radius: .25rem; background-color: #ececef; margin-top: 0; font-weight: inherit; white-space: break-spaces; word-break: break-all; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: break-word; padding: 0.125rem 0.25rem;'>zlib</code>, but it is being replaced with <code style='font-size: 90%; color: #18171d; word-wrap: break-word; border-radius: .25rem; background-color: #ececef; font-weight: inherit; white-space: break-spaces; word-break: break-all; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: break-word; padding: 0.125rem 0.25rem;'>deflate</code>, which is easy to enable, but on the port we currently don't have streams because we are developing it on qemu-pc686. Streams are required by the only class provided in deflate - DeflateIO. More <a href="https://docs.micropython.org/en/latest/library/deflate.html#classes" rel="nofollow noreferrer noopener" target="_blank">here</a>.</p>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial"><code style='font-size: 90%; color: #18171d; word-wrap: break-word; border-radius: .25rem; background-color: #ececef; margin-top: 0; font-weight: inherit; white-space: break-spaces; word-break: break-all; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: break-word; padding: 0.125rem 0.25rem;'>binascii</code> has been enabled.</p>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">The latest updates have been pushed to the <a href="https://gitlab.rtems.org/l1zard/micropython/-/tree/port-files/ports/rtems" style="margin-top: 0;">port-files</a> branch.</p>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">Update on <code style='font-size: 90%; color: #18171d; word-wrap: break-word; border-radius: .25rem; background-color: #ececef; margin-top: 0; font-weight: inherit; white-space: break-spaces; word-break: break-all; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: break-word; padding: 0.125rem 0.25rem;'>_thread</code>:<br>
I was able to successfully create and run MicroPython threads using a Tasks based implementation.</p>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">Initially locks were implemented using RTEMS Semaphores, but since that would have limited the total number of locks that can be allocated, based on Chris' suggestion I switched to <code style='font-size: 90%; color: #18171d; word-wrap: break-word; border-radius: .25rem; background-color: #ececef; margin-top: 0; font-weight: inherit; white-space: break-spaces; word-break: break-all; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: break-word; padding: 0.125rem 0.25rem;'>rtems_mutex</code>, which made locks work much better (more passing tests), but now the threads don't run immediately. I can create a thread and the task gets created, it gets added to the linked-list tracking thread state, but it only runs when I allocate a new lock and call its <code style='font-size: 90%; color: #18171d; word-wrap: break-word; border-radius: .25rem; background-color: #ececef; font-weight: inherit; white-space: break-spaces; word-break: break-all; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: break-word; padding: 0.125rem 0.25rem;'>acquire()</code> method. I suspect that this is due to interrupts not being configured properly. Awaiting feedback on this. The latest threads code is in the <a href="https://gitlab.rtems.org/l1zard/micropython/-/tree/threads_experiments/ports/rtems">threads_experiments</a> branch.</p>
<p dir="auto" style="color: #3a383f; margin: 0;" align="initial">I have also created a <a href="https://gitlab.rtems.org/l1zard/micropython/-/commits/code-cleanup" style="margin-top: 0;">code-cleanup</a> branch with updated history to better follow RTEMS <a href="https://docs.rtems.org/docs/main/eng/coding-conventions.html" rel="nofollow noreferrer noopener" target="_blank">coding conventions</a> (comments use <code style='font-size: 90%; color: #18171d; word-wrap: break-word; border-radius: .25rem; background-color: #ececef; font-weight: inherit; white-space: break-spaces; word-break: break-all; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: break-word; padding: 0.125rem 0.25rem;'>/* */</code> instead of <code style='font-size: 90%; color: #18171d; word-wrap: break-word; border-radius: .25rem; background-color: #ececef; font-weight: inherit; white-space: break-spaces; word-break: break-all; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: break-word; padding: 0.125rem 0.25rem;'>//</code>), add include guards, etc.</p>
</div>


</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #626168;">

<br>
<a href="https://gitlab.rtems.org/groups/rtems/-/work_items/22#note_129429">View it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.rtems.org">gitlab.rtems.org</a>. <a href="https://gitlab.rtems.org/-/sent_notifications/1e980f95283cdda249a5192f74d6a8fa/unsubscribe" target="_blank" rel="noopener noreferrer">Unsubscribe</a> from this thread · <a href="https://gitlab.rtems.org/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.rtems.org/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
<span style="color: transparent; font-size: 0; display: none; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0;">
Notification message regarding https://gitlab.rtems.org/groups/rtems/-/work_items/22#note_129429 at 1756150980
</span>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Work item","url":"https://gitlab.rtems.org/groups/rtems/-/work_items/22#note_129429"}}</script>


</p>
</div>
</body>
</html>