-
Notifications
You must be signed in to change notification settings - Fork 3k
EP Atlas Target Updates #14325
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
EP Atlas Target Updates #14325
Conversation
|
@AGlass0fMilk, thank you for your changes. |
965907e to
7ae55cb
Compare
|
Tested and building blinky/printf over USB on Atlas 👍 |
7ae55cb to
1cb2ae9
Compare
0xc0170
left a comment
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.
Otherwise LGTM
...ets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_EP_ATLAS/atlas_init.c
Outdated
Show resolved
Hide resolved
1fc52b8 to
d58ee83
Compare
The `mbed_sdk_init` startup hook is implemented at the NRF52-series level and so is unavailable for override. This commit adds an additional startup hook for NRF52 subtargets to perform any other startup initialization required.
This commit introduces an implementation of the `subtarget_sdk_init` startup hook (called during `mbed_sdk_init`) that configures the internal regulators of the nRF52840. The configuration sets up the internal regulator to output 3.3V. If this is not done, the default system voltage may be too low for the on-board indicator LEDs to conduct (ie: system voltage is lower than LED forward voltage).
This commit introduces an option, `ep-atlas.enable-usb-stdio-console`, that will retarget the Mbed stdio console handle to a USBSerial instance if enabled. Please note that if your application uses USB, it will conflict with this option. You should disable this option and implement a composite USB device in your application if you require stdio over USB. This option is disabled by default so it will not cause issues with existing user code.
This commit introduces a default application start address (`0x1000`) and size limitation (`0xDF000`) to accomodate the Nordic USB bootloader. The bootloader consists of a master boot record in flash from address `0x0` to `0x1000` and the actual bootloader application starting at `0xE0000` to the end of flash (`0x100000`). The bootloader enables firmware updates over USB using nRF Connect for Desktop. More documentation regarding the open bootloader can be found here: https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/ble_sdk_app_open_bootloader.html
d58ee83 to
b6478ba
Compare
Alignment issue has been resolved. |
| #if MBED_CONF_EP_ATLAS_ENABLE_USB_STDIO_CONSOLE | ||
|
|
||
| /* Retarget stdio to USBSerial */ | ||
| mbed::FileHandle *mbed::mbed_target_override_console(int fd) { |
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 you run astyle on these new files?
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.
Ran astyle -n --options=.astylerc on the new files and pushed up changes.
b6478ba to
0212fde
Compare
Pull request has been modified.
|
Thanks for the fixes. Can you attach testing logs for both toolchains? |
This target is a bit abnormal. It does not have an on-board debugger. It works more like an nRF52840 dongle. The board is programmed with a bootloader that lets you update it over USB using the nRF Connect software. I'm not sure if Mbed's automated testing tools would support flashing/testing this target... It's mostly based on the nRF52840_DK so think that is sufficient. There are only some small changes (like this PR) to accommodate the bootloader and hardware regulator configuration. |
|
CI started |
Jenkins CI Test : ❌ FAILEDBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
|
I think I need to add the new files to cmake... will have to learn the new tools. |
|
Please do. It should be fairly simple , if any questions, I can assist. |
Pull request has been modified.
| TARGET_EP_ATLAS | ||
| ) | ||
|
|
||
| target_sources(mbed-ep-atlas |
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.
you need to create the library add_library(mbed-ep-atlas INTERFACE) and possibly later here to link it with nrf52xx library to get common drivers,sdks, etc.
dk board should do that below
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.
Ah wait, it's not visible in my view, but I can see it already there
|
This pull request has automatically been marked as stale because it has had no recent activity. @ARMmbed/mbed-os-maintainers, please start CI to get the PR merged. |
|
CI restarted |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Summary of changes
This PR introduces several updates to the
EP_ATLAStarget.Namely, the updates are:
Introduce
subtarget_sdk_initstartup hook.The
mbed_sdk_initstartup hook is implemented at the NRF52-series level and so is unavailable for override. This commit adds an additional startup hook for NRF52 subtargets to perform any other startup initialization required.Configure internal regulators at startup
This commit introduces an implementation of the
subtarget_sdk_initstartup hook (called duringmbed_sdk_init) that configures the internal regulators of the nRF52840.The configuration sets up the internal regulator to output 3.3V. If this is not done, the default system voltage may be too low for the on-board indicator LEDs to conduct (ie: system voltage is lower than LED forward voltage).
Add option to use USBSerial for stdio console
This commit introduces an option,
ep-atlas.enable-usb-stdio-console, that will retarget the Mbed stdio console handle to a USBSerial instance if enabled.Please note that if your application uses USB, it will conflict with this option. You should disable this option and implement a composite USB device in your application if you require stdio over USB.
This option is disabled by default so it will not cause issues with existing user code.
Add default app start and size limitations
This commit introduces a default application start address (
0x1000) and size limitation (0xDF000) to accomodate the Nordic USB bootloader.The bootloader consists of a master boot record in flash from address
0x0to0x1000and the actual bootloader application starting at0xE0000to the end of flash (0x100000). The bootloader enables firmware updates over USB using nRF Connect for Desktop.More documentation regarding the open bootloader can be found here: https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/ble_sdk_app_open_bootloader.html
Impact of changes
The USB stdio console option is disabled by default and so will not have any impact on existing code.
The regulator initialization at startup will fix issues with on-board LED indicators not lighting up due to the system voltage being set too low. Previously, users would have to execute this configuration from their own
mainfunction. This configuration is now implemented as part of the target's initialization code.Migration actions required
Remove regulator initialization from user application, if required.
Documentation
None
Pull request type
Test results
Reviewers
@farrenv @trowbridgec