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

Rework of sdcard storage for NXP MIMXRT1060 port #1530

Merged
merged 5 commits into from
Dec 18, 2019

Conversation

morali
Copy link
Contributor

@morali morali commented Dec 17, 2019

I've edited read/write binary and read/write text to open file in working thread. Which is a little bit faster and causes less stutter then previous implementation.
Also there was a problem when file write/read would end with error but the nanoCLR wouldn't get an event, which is also fixed.

Description

Motivation and Context

This bug caused big slowdown of application cycle while read or write was in progress.

How Has This Been Tested?

I've tested above fix with nanoFramework storage sample and with our own application. Storage read/write were successfull and without errors.

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Signed-off-by: morali jeremi.jasinski@gmail.com

@nfbot
Copy link
Member

nfbot commented Dec 17, 2019

Hi @morali,

I'm nanoFramework bot.
Thank you for your contribution!

A human will be reviewing it shortly. 😉

@josesimoes josesimoes added Series: NXP i6 Everything related specifically with NXP targets Type: bug labels Dec 18, 2019
Copy link
Member

@josesimoes josesimoes left a comment

Choose a reason for hiding this comment

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

Question: any reason for replacing the platform_malloc and free?
The correct way is to use the platform_NNNN calls.

@morali morali force-pushed the develop-evk/sdcard branch from d76238a to dbf229c Compare December 18, 2019 10:40
@morali
Copy link
Contributor Author

morali commented Dec 18, 2019

Question: any reason for replacing the platform_malloc and free?
The correct way is to use the platform_NNNN calls.

Yes, we are using different implementation of malloc on our device.
I reverted changes to platform_malloc and platform_free.

@morali morali requested a review from josesimoes December 18, 2019 11:20
@morali
Copy link
Contributor Author

morali commented Dec 18, 2019

I think there was some error with downloading some file. Could you rerun pipeline?

@josesimoes
Copy link
Member

@morali if you have a different implementation of malloc, that's OK. The platform_malloc (and free) are there for exactly that purpose: abstract whatever implementation there is for a plaform.

You have to define those @ targets\FreeRTOS\common\platform_heap.c (which I think it's already there).

Copy link
Member

@josesimoes josesimoes left a comment

Choose a reason for hiding this comment

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

LGTM. I don't have an NXP board to test so I'll default to your testing.

@josesimoes josesimoes merged commit 3f5106e into nanoframework:develop Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Series: NXP i6 Everything related specifically with NXP targets Type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants