Skip to content

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

Merged
merged 8 commits into from
Feb 27, 2018
Merged

Update Rtos.md - DO NOT MERGE (before mbed-os 5.7 release) #340

merged 8 commits into from
Feb 27, 2018

Conversation

deepikabhavnani
Copy link

Removed all RTX mention and added reference to importer script

 Removed all RTX mention and added reference to importer script
@deepikabhavnani
Copy link
Author

@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.
@AnotherButler AnotherButler requested a review from sg- November 21, 2017 17:02
@AnotherButler
Copy link
Contributor

@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?

@deepikabhavnani
Copy link
Author

Yes @AnotherButler we can merge it after review.

Copy link
Contributor

@sg- sg- left a 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`.
Copy link
Contributor

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'

Copy link
Contributor

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`.
Copy link
Contributor

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?

@bulislaw
Copy link
Member

bulislaw commented Feb 9, 2018

@deepikabhavnani I think that got forgotten.

@deepikabhavnani
Copy link
Author

deepikabhavnani commented Feb 12, 2018

@bulislaw - Changes are done, waiting for @sg- to review and approve. Adding you as reviewer I cannot add reviewer. @AnotherButler Please added @bulislaw as reviewer.


#### 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.
Copy link
Member

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

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. |
Copy link
Member

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.
Copy link
Member

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.
Copy link
Member

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 the commit_sha section of the cmsis_importer.json file.

That is a bit confusing. @AnotherButler what do you think?

Copy link
Contributor

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?

Copy link
Member

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.
@AnotherButler AnotherButler merged commit d270c6a into ARMmbed:new_engine Feb 27, 2018
@deepikabhavnani deepikabhavnani deleted the patch-1 branch February 27, 2018 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants