-
Notifications
You must be signed in to change notification settings - Fork 3k
realtek rtl8195am Add MCU_target #7704
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
realtek rtl8195am Add MCU_target #7704
Conversation
1, edit "targets.json" to let "REALTEK_RTL8195AM" target inherit from "MCU_RTL8195A"
Isn't this also missing folder structure reorganization? To be specific, PinNames are platform specific so they should be in What I expect to see in |
The result of this PR would be elimination of this tree https://github.com/SigmaDeltaTechnologiesInc/mbed-os/tree/0046800c092cd14fc265573a4ebb635b42bf8561/targets/TARGET_Realtek/TARGET_AMEBA (this diff is taken from #7669 ) |
Could you be more specific about the folder structure reorganization? For the |
This basically creates only json changes but no folder tree. If I create a new target named My assumption would be that this folder https://github.com/ARMmbed/mbed-os/tree/master/targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A needs to be renamed to MCU_RTL8195A, and new folder inside this one to be created named TARGET_RTL8195A (this one contains board specific configuration). To Ilustrate the tree:
Then all I need to do for |
1, edit "targets.json"
@M-ichae-l Fyi, this still looks like it needs some work to pass Travis. |
@0xc0170 |
HAL implementation is generic that could be moved to MCU_ folder? One thing to change there, the peripheral names : https://github.com/M-ichae-l/mbed-os/blob/realtek-rtl8195am-Add-MCU_target-update/targets/TARGET_Realtek/TARGET_AMEBA/TARGET_MCU_RTL8195A/TARGET_RTL8195A/i2c_api.c#L29 - this should be in own code file defined for The example is here https://github.com/M-ichae-l/mbed-os/blob/realtek-rtl8195am-Add-MCU_target-update/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/TARGET_MTS_GAMBIT/PeripheralPins.c for instance. We would have then one HAL implementation for this MCU family, and multiple targets supporting it. |
@0xc0170 |
One last thing I can think of: https://github.com/M-ichae-l/mbed-os/blob/realtek-rtl8195am-Add-MCU_target-update/targets/TARGET_Realtek/TARGET_AMEBA/TARGET_MCU_RTL8195A/serial_api.c#L30 - this pinmap is board specific. Shall it be moved to out of the implementation and inside Look at
|
Yes, There are 4 files are pinmap board specific. |
The file
and |
I've noticed this now that is in line what we are doing here https://github.com/ARMmbed/mbed-os-5-docs/pull/625/files#diff-1b25b067ef8a80bc82c45ca7e4809ec5R73 (docs update ongoing). There's the structure I am describing here! |
@0xc0170 |
@ashok-rao @bentcooke Could I ask for y'alls help here? Looking at the branch's directory structure, the port looks ok, but this is the first time I've looked at the file structure for a port and could use some help. |
@M-ichae-l Making sure, the links in your comment aren't yet pushed to this PR, correct? |
@cmonr |
@cmonr & @M-ichae-l : a minor comment regarding port_api.c, objects.h and device.h -> here ..Can these 3 be moved to the MCU level rather than the board level? Rest all LGTM! Thanks. |
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.
Overall LGTM, I've left 1 comment. Great if you could address this @M-ichae-l . Thanks!
@ashok-rao @cmonr |
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.
Thanks @M-ichae-l .. LGTM!
@M-ichae-l could you please add the following entry to "MCU_RTL8195A"
This prevents the build system from allowing a user to build the target and is typically used for MCU definitions. Users target a board that inherits a MCU, but not the MCU by itself. |
@bentcooke |
@M-ichae-l Is there a reason that this PR doesn't have the new files yet? |
@cmonr |
As that one is in progress, can this be non dependent on it? How can we progress with this MCU target ? We have now new target addition based on this MCU |
Integrated, rebase here or ? |
"inherits": ["MCU_RTL8195A"], | ||
"detect_code": ["4600"], | ||
"extra_labels": ["Realtek", "AMEBA", "RTL8195A", "RTW_EMAC"], | ||
"device_has": ["ANALOGIN", "ANALOGOUT", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SPI", "TRNG", "FLASH"] |
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.
Shouldn't MCU define these ? I imagine ANALOGIN supported for that MCU. If a new derived target does not implement analogin for specific reason, it could remove it. Same for extra_labels - Realtek
is specific for this target or can be applied to MCU_ one ?
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.
"device_has" will move to the under MCU. So do "extra_labels". "extra_labels_add" will add to the specific target.
I am closing this one. |
Description
1, edit "targets.json" to let "REALTEK_RTL8195AM" target inherit from "MCU_RTL8195A"
Pull request type