Skip to content

extmod/modopenamp: Implement MIMXRT port and log handler fixes. #14120

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 4 commits into from
Mar 29, 2024

Conversation

iabdalkader
Copy link
Contributor

@iabdalkader iabdalkader commented Mar 18, 2024

  • Logging is fixed by using the existing metal log handling mechanism instead of overriding the metal_log, which causes build issues when logging is enabled.
  • A port is implemented for mimxrt and tested with IMXRT1176 custom board. A test firmware for M4 can be found here https://github.com/iabdalkader/openamp_vuart (build with make PORT=mimxrt).

Copy link

codecov bot commented Mar 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.39%. Comparing base (b829450) to head (87d821a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #14120   +/-   ##
=======================================
  Coverage   98.39%   98.39%           
=======================================
  Files         161      161           
  Lines       21200    21200           
=======================================
  Hits        20860    20860           
  Misses        340      340           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Code size report:

   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS

@dpgeorge dpgeorge added the extmod Relates to extmod/ directory in source label Mar 21, 2024
@dpgeorge
Copy link
Member

@iabdalkader Is this streaming interface important for your use of the openamp module? If not, then this would be a low priority for us.

@iabdalkader
Copy link
Contributor Author

iabdalkader commented Mar 21, 2024

@iabdalkader Is this streaming interface important for your use of the openamp module? If not, then this would be a low priority for us.

No not at all, it's just something @jimmo asked for in the reviews. However you may want to look at the log issue, second commit.

@dpgeorge
Copy link
Member

However you may want to look at the log issue, second commit.

I had a look at this and see the problem. Can we fix that by using the proper logging interface, and calling metal_set_log_handler() and passing in a function that wraps mp_printf()?

@iabdalkader
Copy link
Contributor Author

Can we fix that by using the proper logging interface

Yes, I'll send it in a different PR.

Is this streaming interface important for your use of the openamp module?

Note the only blocker right now is #14082

@iabdalkader iabdalkader force-pushed the openamp_updates branch 2 times, most recently from 603fb6c to 1c9fe2f Compare March 24, 2024 15:11
@iabdalkader iabdalkader changed the title extmod/modopenamp: Implement streaming protocol for endpoints. extmod/modopenamp: MIMXRT port, Endpoint streaming and Log fixes. Mar 24, 2024
@iabdalkader iabdalkader marked this pull request as ready for review March 24, 2024 15:19
@iabdalkader iabdalkader force-pushed the openamp_updates branch 4 times, most recently from b2e8bdc to e9725de Compare March 24, 2024 20:37
@dpgeorge
Copy link
Member

I see that this now has mimxrt support, which is good, but it means that will be blocked on the streaming part of the API.

If you want to get the logging and/or mimxrt support merged faster then please put them in a separate PR.

@iabdalkader iabdalkader changed the title extmod/modopenamp: MIMXRT port, Endpoint streaming and Log fixes. extmod/modopenamp: Implement MIMXRT port and log handler fixes. Mar 26, 2024
@iabdalkader
Copy link
Contributor Author

If you want to get the logging and/or mimxrt support merged faster then please put them in a separate PR.

I kept them here in this PR and sent a new one for endpoint streaming #14181

@dpgeorge
Copy link
Member

There are some remaining DEBUG_printf in extmod/modopenamp_remoteproc_store.c that should probably be changed to metal_log() calls. Also extmod/modopenamp_remoteproc.c has a #define DEBUG_printf that's never used.

@dpgeorge dpgeorge added this to the release-1.23.0 milestone Mar 28, 2024
@iabdalkader
Copy link
Contributor Author

There are some remaining DEBUG_printf in extmod/modopenamp_remoteproc_store.c that should probably be changed to metal_log() calls. Also extmod/modopenamp_remoteproc.c has a #define DEBUG_printf that's never used.

I removed them all, as well as some debug_printf's in extmod/modopenamp.c that we've missed in the initial review. I think it's much better to control the whole log with a single switch.

Use the existing metal log handling mechanism instead of overriding the
metal_log, which causes build issues when logging is enabled.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
@dpgeorge dpgeorge merged commit 87d821a into micropython:master Mar 29, 2024
61 checks passed
@iabdalkader iabdalkader deleted the openamp_updates branch March 29, 2024 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extmod Relates to extmod/ directory in source
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants