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

Simplify flash.c #136

Merged
merged 1 commit into from
Dec 9, 2020
Merged

Simplify flash.c #136

merged 1 commit into from
Dec 9, 2020

Conversation

dbrgn
Copy link
Contributor

@dbrgn dbrgn commented Dec 8, 2020

The manual for-loop looked a bit funny :)

(A memcpy would probably work as well, but is less easy to read and also results in a larger binary.)

The manual for-loop looked a bit funny :)
@dbrgn dbrgn requested a review from hannobraun December 8, 2020 20:45
Copy link
Contributor

@hannobraun hannobraun left a comment

Choose a reason for hiding this comment

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

Thanks!

Did you call compile.sh? If it generates different code, we should update the binary also.

@dbrgn
Copy link
Contributor Author

dbrgn commented Dec 9, 2020

On master:

$ ./compile.sh && sha1sum libflash.a
0f720d2f86e55e2fe2e05bc639c18eef595a45fa  libflash.a

On this branch:

$ ./compile.sh && sha1sum libflash.a
0f720d2f86e55e2fe2e05bc639c18eef595a45fa  libflash.a

...so I didn't commit the rebuilt binary, especially considering that the checked-in binary is 896 bytes, while the one my compiler generates is 900 bytes. Probably because a different gcc version was used.

@hannobraun
Copy link
Contributor

Makes sense, thank you.

@hannobraun hannobraun merged commit ecf5cc4 into master Dec 9, 2020
@hannobraun hannobraun deleted the flash-for-loop branch December 9, 2020 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants