-
Notifications
You must be signed in to change notification settings - Fork 178
Update Rtos.md - DO NOT MERGE (before mbed-os 5.7 release) #340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Removed all RTX mention and added reference to importer script
@sg- RTX references are removed. As per jira: There is lots of good content for api/rtos/rtos (not relevant to porting). Please list what else should be covered in rtos.md page. |
Make minor copy edits for active voice, brevity and tone.
@deepikabhavnani We recently updated this, so the 5.6 branch is the live 5.6 docs on the web, and this new_engine branch is the working branch that we will create 5.7 from. Is it OK if I remove the "code dependency" label and merge this after @sg- reviews it? |
Yes @AnotherButler we can merge it after review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of comments and the table of config values doesnt even seem right, at least I hope its still not right.
@@ -1,6 +1,6 @@ | |||
### RTOS | |||
|
|||
CMSIS/RTX code is imported from <a href="https://github.com/ARM-software/CMSIS_5/" target="_blank">the original CMSIS repository</a>. | |||
CMSIS/RTX code is imported from <a href="https://github.com/ARM-software/CMSIS_5/" target="_blank">the original CMSIS repository</a> with the help of Python script in the `mbed-os` repository `mbed-os\tools\importer\importer.py`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
original should be 'upstream development'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
further down there is generic system would should be 'platform operating system'
`CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_*` | `mbed-os/rtos/TARGET_CORTEX/rtx5` | RTX sources | | ||
`CMSIS_5/CMSIS/RTOS2/RTX/Source/svc_user.c` | `mbed-os/rtos/rtx2/TARGET_CORTEX_M/` | RTX SVC user table | | ||
`CMSIS_5/CMSIS/RTOS2/RTX/Source/{ARM,GCC,IAR}/` | `mbed-os/rtos/TARGET_CORTEX/rtx5/TARGET_{M0,M0P,M3,RTOS_M4_M7,M23,M33}/TOOLCHAIN_{ARM,GCC,IAR}` | Toolchain and core specific exception handlers | | ||
Due to differences in how the Mbed OS and CMSIS directory structures look, you can't import the original code directly using `importer.py` and configuration file `cmsis_importer.json`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence seems wrong, you cant import using a tool we created?
Copy edit, mostly for active voice and inclusion of articles.
@deepikabhavnani I think that got forgotten. |
@bulislaw - Changes are done, waiting for @sg- to review and approve. |
|
||
#### Memory considerations | ||
|
||
Please note that Arm Mbed OS doesn't use any of the RTX memory models, which are based on static carveouts (memory pools). This approach is not ideal for generic systems, such as Mbed OS, because calculating required numbers of RTOS objects is impossible. To avoid declaring arbitrary large buffers carved out at compile time, limiting the amount of available memory, Mbed OS shifts the responsibility of supplying the backing memory to CMSIS-RTOS2 users. | ||
Please note that Arm Mbed OS doesn't use any of the RTX memory models, which are based on static carveouts (memory pools). This approach is not ideal for platform operating systems, such as Mbed OS, because calculating required numbers of RTOS objects is impossible. To avoid declaring arbitrary large buffers carved out at compile time, limiting the amount of available memory, Mbed OS shifts the responsibility of supplying the backing memory to CMSIS-RTOS2 users. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what the platform operating systems
are to be fair.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bulislaw - That change was review comment by @sg- https://github.com/ARMmbed/Handbook/pull/340/files/d827afd63fab6edc4021eec3ddce567217a229d6#diff-d3a387b212d57c83382162e66ce314a0R3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough.
`OS_TIMER_THREAD_STACK_SIZE` | 768B | Timer thread stack set to 768B that's necessary to support the C++ wrappers (4 instances), but it may require changing to support larger number of active timers. | | ||
`OS_IDLE_THREAD_STACK_SIZE` | 512B | Required to handle Mbed OS wrappers | | ||
`OS_DYNAMIC_MEM_SIZE` | 0 | RTX dynamic memory is disabled. | | ||
`OS_MUTEX_OBJ_MEM` | 1 or 0 | For ARMC, use 1; for other toolchains, it's 0. ARMC uses statically allocated mutexes internally. | | ||
`OS_MUTEX_NUM` | 6 or 0 | For ARMC, use 6; for other toolchains, it's 0. ARMC uses statically allocated mutexes internally. | | ||
`OS_TICK_FREQ` | 1000 | OS Tickrate must be 1000 for system timing. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change that note to something like: Mbed OS requires 1ms system tick?
`CMSIS_5/CMSIS/RTOS2/RTX/Source/rtx_*` | `mbed-os/rtos/TARGET_CORTEX/rtx5` | RTX sources | | ||
`CMSIS_5/CMSIS/RTOS2/RTX/Source/svc_user.c` | `mbed-os/rtos/rtx2/TARGET_CORTEX_M/` | RTX SVC user table | | ||
`CMSIS_5/CMSIS/RTOS2/RTX/Source/{ARM,GCC,IAR}/` | `mbed-os/rtos/TARGET_CORTEX/rtx5/TARGET_{M0,M0P,M3,RTOS_M4_M7,M23,M33}/TOOLCHAIN_{ARM,GCC,IAR}` | Toolchain and core specific exception handlers | | ||
Due to differences in the Mbed OS and CMSIS directory structure, you can't import the original code directly. You should use the `importer.py` and configuration file `cmsis_importer.json` to import upstream CMSIS code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think right now it's mostly down to build system.
`irq_armv8mml.S` | IAR toolchain: added file for Cortex M33 core | | ||
|
||
<span class="notes">**Note:** For all toolchains, Mbed OS uses `irq_cm0.s` for both M0 and M0P cores.</span> | ||
Due to different use cases between Mbed OS and CMSIS, we modified the source code. We upstream our changes to the CMSIS repository, but in cases when they aren't compatible with CMSIS requirements, we maintain a small set of changes. We maintain changes as separate commits in `mbed-os`, and SHAs are in the `commit_sha` section of the `cmsis_importer.json` file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to different use cases between Mbed OS and CMSIS, we modified the source code
that's a bit vogue, which source code?
We upstream our changes to the CMSIS repository, but in cases when they aren't compatible with CMSIS requirements, we maintain a small set of changes. We maintain changes as separate commits in
mbed-os
, and SHAs are in thecommit_sha
section of thecmsis_importer.json
file.
That is a bit confusing. @AnotherButler what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bulislaw What part do you think is confusing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe confusing isn't the best word for that, but we repeat ourselves and it makes it feel like we talk about something else (?) we maintain a small set of changes. We maintain changes
if I'm saying gibberish please ignore :)
Update content with suggested changes from engineering.
Removed all RTX mention and added reference to importer script