Skip to content

Target msp432 support #11117

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 2 commits into from
Sep 20, 2019
Merged

Target msp432 support #11117

merged 2 commits into from
Sep 20, 2019

Conversation

Terstegge
Copy link

@Terstegge Terstegge commented Jul 28, 2019

Description

New support for MSP432 targets (specifically the MSP432 Launchpad from TI).
Most functionality (ANALOGIN, I2C, I2C_ASYNCH, I2CSLAVE, INTERRUPTIN,
PORTIN, PORTINOUT, PORTOUT, PWMOUT, SERIAL, SPI, SPI_ASYNCH,
SPISLAVE, STDIO_MESSAGES, USTICKER) is implemented.
The MSP432 Launchpad does not support the DAPLink protocol, so binaries have to
be downloaded with the DSLite tool from TI. This is also the reason why greentea
testing could not be done. But all available testcases (86) were tested manually.

Pull request type

[ ] Fix
[ ] Refactor
[X] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

Release Notes

@ciarmcom ciarmcom requested review from maclobdell and a team July 28, 2019 21:00
@ciarmcom
Copy link
Member

@Terstegge, thank you for your changes.
@maclobdell @ARMmbed/mbed-os-crypto @ARMmbed/mbed-os-pan @ARMmbed/mbed-os-storage @ARMmbed/mbed-os-wan @ARMmbed/mbed-os-hal @ARMmbed/mbed-os-ipcore @ARMmbed/mbed-os-maintainers @ARMmbed/mbed-os-test @ARMmbed/mbed-os-core @ARMmbed/mbed-os-tls @ARMmbed/mbed-os-tools please review.

@SeppoTakalo
Copy link
Contributor

@Terstegge Please cleanup the Git branch. You have a merge commit in your history, which makes review a bit annoying. Please remove the merge commit and rebase your changes on top of master branch. It makes history look cleaner, and review looks correct.

@Terstegge Terstegge changed the base branch from master to mbed-os-5.13 July 31, 2019 19:51
@Terstegge Terstegge changed the base branch from mbed-os-5.13 to master July 31, 2019 19:52
@Terstegge Terstegge changed the base branch from master to mbed-os-5.12 July 31, 2019 19:53
@Terstegge Terstegge changed the base branch from mbed-os-5.12 to master July 31, 2019 19:54
@Terstegge
Copy link
Author

Okay - finally managed to clean up the branch by rebasing to upstream/master and manually deleting some commits... Hope the branch is okay now.

@SeppoTakalo
Copy link
Contributor

Hi @Terstegge
Can you explain the reason for couple of naming changes?
For example member variable CS to _CS

Or DIR_H macro to _DIR_H

@Terstegge
Copy link
Author

Hi @Terstegge
Can you explain the reason for couple of naming changes?
For example member variable CS to _CS

Or DIR_H macro to _DIR_H

The changes were done because of name clashes. The file msp432p401r.h is the official register definition file as distributed by TI. Changes to this file are therefore not the first choice, because this file will be updated on a regular basis. In line 1353 you find the CS macro for the Clock System (CS) subsystem. Without the changes in the mbed OS code you will get compile errors. The same is true for DIR_H (line 605).

@Terstegge
Copy link
Author

I just found a way to leave CS and DIR_H as they are, so renaming is not necessary any more (see 3rd commit).

@Terstegge
Copy link
Author

I do not understand the problem in the file targets/TARGET_TI/mbed_rtx.h.
The file was changed for MSP432, but the conflict implied it should be changed to another target???

@0xc0170 0xc0170 removed request for a team August 20, 2019 13:47
@Terstegge
Copy link
Author

Terstegge commented Aug 28, 2019

Latest commit removes MPU. All 86 tests pass now without error: Logfile

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 29, 2019

Latest commit removes MPU. All 86 tests pass now without error: Logfile

Very nice ! We are close to 5.14 code freeze, I might review this in more detail the next week.

@0xc0170 0xc0170 self-requested a review August 29, 2019 11:50
@Terstegge
Copy link
Author

Last commit cleans up the linker script (removal of VECTORS stuff) and introduces a common startup file.

Andreas Terstegge added 2 commits September 3, 2019 11:19
Removed private TODO file.

Fixed cmsis.h so that renaming of CS and DIR_H is not necessary any more.

Leave pinmap.h unchanged although it should include stdint.h
Moved stdint.h to PinNames.h instead, where it is also used.

Reworked system startup (clock configuration) to be more flexible
(different clock sources for MCLK and SMCLK, configurable clock dividers).

Fixed Copyright headers

Changed default clock settings for MSP432 Launchpad to
MCLK 48 MHz (HFXT) and SMCLK 24 MHz (HFXT)

Remove mbed_rtx.h

Added common mbed_rtx.h file (merge with lastest master)

Added support for IAR toolchain

Fixed some astyle problems.

Added support for ARM C5/C6 toolchains

Small changes to us_ticker implementation after port testing.

Changed default clock configuration to DCO (MCLK 48MHz, SMCLK 24MHz).
De-configured the LFXT crysal, because this made the system_reset() test to time out.

Removed MPU from device_has list. Changed clock source to HFXT.

Reworked startup_msp432p401r.c -> now only one startup file for all compilers.
Changed all linker scripts to delete VECTORS stuff (not needed).

Moved position of MSP432 in targets.json so TI stuff is in one block.
@0xc0170 0xc0170 requested a review from linlingao September 3, 2019 12:04
@0xc0170
Copy link
Contributor

0xc0170 commented Sep 4, 2019

CI started

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 4, 2019

@MarceloSalazar Can you review as well?

@mbed-ci
Copy link

mbed-ci commented Sep 4, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 2
Build artifacts

@Terstegge
Copy link
Author

Please let me know if I should do a rebase, in case the review process will take longer. CI would have to be repeated, I guess.

@Terstegge
Copy link
Author

What are the plans on ARM side for this PR? Two weeks have gone without any progress.

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 19, 2019

I'll restart CI and should be good to go.

@mbed-ci
Copy link

mbed-ci commented Sep 19, 2019

Test run: FAILED

Summary: 1 of 11 test jobs failed
Build number : 3
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_mbed2-build-IAR

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 19, 2019

Internal CI error, will restart once we complete rc3 PR

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 20, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Sep 20, 2019

Test run: FAILED

Summary: 1 of 11 test jobs failed
Build number : 4
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_dynamic-memory-usage

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 20, 2019

memory usage restarted

@0xc0170 0xc0170 merged commit 1f5a124 into ARMmbed:master Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants