Skip to content
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

Update CMSIS/RTX with Cortex-A support #5312

Closed
wants to merge 20 commits into from
Closed

Conversation

bulislaw
Copy link
Member

Description

This PR introduces updates to RTX/CMSIS and brings Cortex-A support back into mbed OS

Status

IN DEVELOPMENT

ToDo

  • Validation
  • uVisor sanity check
  • v8 sanity check
  • IAR support for Cortex-A

CC
@Patater could you have a look at my merges of your old uVisor commits
@deepikabhavnani could you see how much this breaks v8 support? and possibly try to fix it?

This includes Cortex A support and directory reshuffle.
@bulislaw
Copy link
Member Author

/morph test

@@ -438,23 +438,23 @@ uint32_t osKernelSysTick (void);
/// \param instances number of possible thread instances.
/// \param stacksz stack size (in bytes) requirements for the thread function.
#if defined (osObjectsExternal) // object is external
#define osThreadDef(name, priority, instances, stacksz) \
#define osThreadDef(name, priority, stacksz) \
Copy link
Member

Choose a reason for hiding this comment

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

Could you remove the instances parameter from the function documentation ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

@pan-
Copy link
Member

pan- commented Oct 12, 2017

Why is there two versions of the heap and stack test, one in the root TEST directory and another in the rtos directory ?

@bulislaw
Copy link
Member Author

Cause I've copied it instead of moving :) Good catch!

bulislaw and others added 18 commits October 13, 2017 12:04
mbed OS used older RTX4 version and with osThreadDef accepting only 3
parameters, to preserve compatibility we hardcode the 'instances'
parameter to 1.
This implementation of timer conflicts with the default ptim, we will
keep the default and let the timer override the implmenetation if
needed.
These tests are not compatible with Cortex A due to __get_MSP usage.
This fixes #4602 issue, mbed_main should be invoked right before the real main
Only set the SVCall priority if uVisor is not present. If uVisor is
present, keep using whatever priorities it has already set up.
Add the OsEventObserver mechanism. A client interested in receiving
notifications on certain OS events can register to receive notifications
with osRegisterForOsEvents. This is useful for clients like the secure
memory allocator, which observes thread switching events in order to
swap in and out different memory allocator objects.
OsEventObserver objects expect a context to be maintained per thread on
their behalf. Add this context to the thread control block and extend
the thread creation functions with the ability to supply a context.
@adbridge
Copy link
Contributor

@bulislaw what is the status of this now ?

@deepikabhavnani
Copy link

ARM-software/CMSIS_5#260 pull request should be included for v8, in case it is not merged in CMSIS by 5.7

@bulislaw
Copy link
Member Author

That shouldn't be merged, this PR exists as a reference, there's more work that needs to be done by Renesas to reintroduce their platforms.

CMSIS repo does not support pre-processor defines, hence multiple assembly
files are added for secure/non-secure and floating point tools.

Mbed-os tools do pre-processing of assembly files and defines are handled in tool
sections. Hence removing additional assembly files as we can have just one per
target.
@TomoYamanaka
Copy link
Contributor

@bulislaw
I attempted to build and test uging this PR source code, it did NOT work at all.
To be honest, the code is too much different from my expectation, I faced to many build errors by both ARMCC and GCC_ARM, couldn't reach the test.
This situation is the same as you provided at the end of July (Reference).
I have expected to obtain the build successfully code at least by this PR,
how did you create this PR? (using GR-PEACH? How about was test?)

By the way,
I think that the cause of build error is the lack of reflection from my branch code that I advised at previously.
The applicable three commits are below.

  • Commit 1
    /rtos/rtx5/RTX/Source/rtx_lib.c
    /rtos/rtx5/RTX/Source/TOOLCHAIN_GCC/TARGET_CORTEX_A/irq_ca.S
    /TESTS/mbedmicro-rtos-mbed/malloc/main.cpp

  • Commit 2
    /cmsis/TARGET_CORTEX_A/
    /targets/TARGET_RENESAS/TARGET_RZ_A1H/

  • Commit 3
    /cmsis/TARGET_CORTEX_A/
    /targets/TARGET_RENESAS/TARGET_RZ_A1H


For this reason, I ask you to reflect my commits with this PR so that the build can be successfully, and I can test using this PR source code.

@toyowata

Please help me to go ahead with the above.

@bulislaw
Copy link
Member Author

This PR is newest version of CMSIS/RTX on top of master of mbed OS. I didn't touch or test GR-Peach code.

@bulislaw
Copy link
Member Author

/morph build

@mbed-ci
Copy link

mbed-ci commented Oct 17, 2017

Build : ABORTED

Build number : 211
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5312/

@mbed-ci
Copy link

mbed-ci commented Oct 17, 2017

Build : FAILURE

Build number : 212
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5312/

@bulislaw
Copy link
Member Author

@bulislaw
Copy link
Member Author

/morph build

@mbed-ci
Copy link

mbed-ci commented Oct 18, 2017

Build : FAILURE

Build number : 230
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5312/

@studavekar
Copy link
Contributor

Doesn't look like an CI issue

        Link: sleep_manager
        [DEBUG] Link: /usr/local/ARM_Compiler_5.06u6/bin/armlink --via /builds/ws/mbed-os-build-matrix/b77abcb4/mbed-os/BUILD/tests/ARCH_PRO/ARM/./TESTS/mbed_hal/sleep_manager/.link_files.txt
        [DEBUG] Return: 1
        [DEBUG] Errors: Error: L6200E: Symbol _mutex_initialize multiply defined (by /builds/ws/mbed-os-build-matrix/b77abcb4/mbed-os/BUILD/tests/ARCH_PRO/ARM/rtos/TARGET_CORTEX/rtx5/RTX/Source/rtx_lib.o and /builds/ws/mbed-os-build-matrix/b77abcb4/mbed-os/BUILD/tests/ARCH_PRO/ARM/rtos/TARGET_CORTEX/mbed_boot.o).
        [DEBUG] Errors: Not enough information to list the image map.
        [DEBUG] Errors: Finished: 1 information, 0 warning and 1 error messages.

@bulislaw bulislaw closed this Oct 18, 2017
@bulislaw bulislaw deleted the feature_cortex_a branch October 18, 2017 16:31
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.

10 participants