<!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=US-ASCII" 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/c-mauderer">Christian Mauderer</a>
commented on a
<a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/515#note_125488">discussion</a>:
</p>
<div class="md" style="position: relative; z-index: 1; color: #28272d; word-wrap: break-word;">
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">Thanks for the review.</p>
<h3 dir="auto" style="font-size: 1.3em; margin: 24px 0 16px;" align="initial">
<a href="#regarding-running-from-ram" aria-hidden="true" class="anchor" id="user-content-regarding-running-from-ram" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>Regarding running from RAM</h3>
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">The board has an external RAM connected to OctoSPI. There is also an internal RAM in the controller.</p>
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">The use case for this check is:</p>
<ul dir="auto" style="text-align: initial; list-style-type: disc; margin: 0 0 16px; padding: 0;">
<li style="margin-top: 0; line-height: 1.6em; margin-left: 25px; padding-left: 3px;">A bootloader (running from Flash) loads an application (for example) from SD card into the external OctoSPI RAM</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">The Application executes from there. It must not touch the OctoSPI settings. Otherwise it would loose access to it's own code.</li>
</ul>
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">With the check during startup, you can just use a different linker command file for building the different applications (for example build a bootloader using <code style='font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; margin-top: 0; font-weight: inherit; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 2px 4px;'>linkcmds.flash+</code> and an application using <code style='font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-weight: inherit; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 2px 4px;'>linkcmds.ospi</code>). A compile time constant would make it necessary to compile multiple BSPs for the same thing.</p>
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">Basically any other symbol could be checked too. I selected the <code style='font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; margin-top: 0; font-weight: inherit; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 2px 4px;'>stm32u5_init_octospi</code> because that was the first function where I noted the problem. But the <code style='font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-weight: inherit; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 2px 4px;'>bsp_start_hook_0</code> or the <code style='font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-weight: inherit; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 2px 4px;'>_start</code> symbol would work too.</p>
<h3 dir="auto" style="font-size: 1.3em; margin: 24px 0 16px;" align="initial">
<a href="#null-section" aria-hidden="true" class="anchor" id="user-content-null-section" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>NULL Section</h3>
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">That's a preparation for a NULL pointer protection similar to the one in ATSAM, fvp, i.MXRT and STM32H7 BSPs. The MPU isn't implemented yet.</p>
<h3 dir="auto" style="font-size: 1.3em; margin: 24px 0 16px;" align="initial">
<a href="#hal" aria-hidden="true" class="anchor" id="user-content-hal" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>HAL</h3>
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">You maybe noted, that the BSP is waiting for some cleanup and commit for some time now. I had to wait till the gcc patch for the Cortex M33 managed it into the release. The alternative would have been to add a patch to the RSB which would have been more maintenence effort. Therefore the HAL is an older version.</p>
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">The imported version of the HAL is 1.5.0. The source and version are in the commit message of the HAL files. The current version is 1.6.1. Release notes are here:</p>
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial"><a href="https://htmlpreview.github.io/?https://github.com/STMicroelectronics/stm32u5xx_hal_driver/blob/master/Release_Notes.html" rel="nofollow noreferrer noopener" target="_blank" style="margin-top: 0;">https://htmlpreview.github.io/?https://github.com/STMicroelectronics/stm32u5xx_hal_driver/blob/master/Release_Notes.html</a></p>
<p dir="auto" style="color: #28272d; margin: 0;" align="initial">The changes are a mix of cosmetic changes and relevant fixes. With the current method to import HALs and maintain them inside the RTEMS sources, we will always be outdated (Gedare started a separate ticket for the HAL import method at <a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5282" data-reference-type="issue" data-original="#5282" data-link="false" data-link-reference="false" data-issue="29113" data-project="26" data-iid="5282" data-namespace-path="rtems/rtos/rtems" data-project-path="rtems/rtos/rtems" data-issue-type="issue" data-container="body" data-placement="top" title='Import process for HAL code Follow-up from "bsps/arm/stm32u5: Add a new BSP"' class="gfm gfm-issue" style="margin-top: 0;">#5282</a>). The BSP currently is already tested for some time with the 1.5.0. Therefore I did not update to avoid adding new undiscovered problems. But if you prefer, I can make that update.</p>
</div>


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

<br>
<a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/515#note_125488">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/8e2c13b5cd7c3ddad1de52b72b6cf05c/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>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Merge request","url":"https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/515#note_125488"}}</script>


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