This was triggered by moving log_init and adding i2c_init on top of
the existing ethernet setup/init after the timer setup and enable.
Thanks @cjbe for debugging.
Also move the RCC peripheral enable calls out of i2c and eth setup.
close#55
supersedes #62
49: fix memory safety issue in ethernet interface (closes#33) r=jordens a=cjbe
The CPU is allowed to implement normal memory writes out-of-order. Here
the write to the OWN flag in the DMA descriptor (normal memory) was
placed after the DMA tail pointer advance (in device memory, so not
reorderable). This meant the ethernet DMA engine stalled as it saw
a descriptor it did not own, and only restarted and sent the packet
when the next packet was released.
This fix will work as long as the CPU data cache is disabled. If we
want to enable the cache, the simplest method would be to mark SRAM3
as uncacheable via the MPU.
Co-authored-by: Chris Ballance <chris.ballance@physics.ox.ac.uk>
The CPU is allowed to access normal memory writes out-of-order. Here
the write to the OWN flag in the DMA descriptor (normal memory) was
placed after the DMA tail pointer advance (in device memory, so not
reorderable). This meant the ethernet DMA engine stalled as it saw
a descriptor it did not own, and only restarted and sent the packet
when the next packet was released.
This fix will work as long as the CPU data cache is disabled. If we
want to enable the cache, the simplest method would be to mark SRAM3
as uncacheable via the MPU.
53: build(deps): bump cortex-m-rtfm from v0.5.0-beta.1 to v0.5.0 r=jordens a=dependabot-preview[bot]
Bumps [cortex-m-rtfm](https://github.com/rtfm-rs/cortex-m-rtfm) from v0.5.0-beta.1 to v0.5.0.
<details>
<summary>Changelog</summary>
*Sourced from [cortex-m-rtfm's changelog](https://github.com/rtfm-rs/cortex-m-rtfm/blob/master/CHANGELOG.md).*
> ## v0.5.0 - 2019-11-14
>
> ### Added
>
> - Experimental support for homogeneous and heterogeneous multi-core
> microcontrollers has been added. Support is gated behind the `homogeneous` and
> `heterogeneous` Cargo features.
>
> ### Changed
>
> - [breaking-change][] [RFC 155] "explicit `Context` parameter" has been
> implemented.
>
> [RFC 155]: [rtfm-rs/cortex-m-rtfm#155](https://github-redirect.dependabot.com/rtfm-rs/cortex-m-rtfm/issues/155)
>
> - [breaking-change][] [RFC 147] "all functions must be safe" has been
> implemented.
>
> [RFC 147]: [rtfm-rs/cortex-m-rtfm#147](https://github-redirect.dependabot.com/rtfm-rs/cortex-m-rtfm/issues/147)
>
> - All the queues internally used by the framework now use `AtomicU8` indices
> instead of `AtomicUsize`; this reduces the static memory used by the
> framework.
>
> - [breaking-change][] when the `capacity` argument is omitted, the capacity of
> the task is assumed to be `1`. Before, a reasonable (but hard to predict)
> capacity was computed based on the number of `spawn` references the task had.
>
> - [breaking-change][] resources that are appear as exclusive references
> (`&mut-`) no longer appear behind the `Exclusive` newtype.
>
> - [breaking-change][] the `timer-queue` Cargo feature has been removed. The
> `schedule` API can be used without enabling any Cargo feature.
>
> - [breaking-change][] when the `schedule` API is used the type of
> `init::Context.core` changes from `cortex_m::Peripherals` to
> `rtfm::Peripherals`. The fields of `rtfm::Peripherals` do not change when
> Cargo features are enabled.
>
> - [breaking-change][] the monotonic timer used to implement the `schedule` API
> is now user configurable via the `#[app(monotonic = ..)]` argument. IMPORTANT:
> it is now the responsibility of the application author to configure and
> initialize the chosen `monotonic` timer during the `#[init]` phase.
>
> - [breaking-change][] the `peripherals` field is not include in `init::Context`
> by default. One must opt-in using the `#[app(peripherals = ..)]` argument.
>
> - [breaking-change][] the `#[exception]` and `#[interrupt]` attributes have been
> removed. Hardware tasks are now declared using the `#[task(binds = ..)]`
> attribute.
></tr></table> ... (truncated)
</details>
<details>
<summary>Commits</summary>
- [`6b0a2df`](6b0a2df41c) Merge [#272](https://github-redirect.dependabot.com/rtfm-rs/cortex-m-rtfm/issues/272)
- [`4fcb6ab`](4fcb6ab7cc) v0.5.0 final release
- [`e28294b`](e28294b220) Merge [#271](https://github-redirect.dependabot.com/rtfm-rs/cortex-m-rtfm/issues/271)
- [`2441b7e`](2441b7e389) Minor docs update to monotonic
- [`85463ed`](85463ed6c3) Merge [#268](https://github-redirect.dependabot.com/rtfm-rs/cortex-m-rtfm/issues/268) [#270](https://github-redirect.dependabot.com/rtfm-rs/cortex-m-rtfm/issues/270)
- [`76e2345`](76e234599f) Added struct de-structure-ing example in tips & tricks
- [`e9a8394`](e9a83947bc) fix bash comparison
- [`da9c6a7`](da9c6a714e) run cfail tests only when rustc --version == $MSRV
- [`31b392f`](31b392fe3a) CI: replace compiletest-rs with trybuild
- [`72e84cb`](72e84cb297) Merge [#266](https://github-redirect.dependabot.com/rtfm-rs/cortex-m-rtfm/issues/266)
- Additional commits viewable in [compare view](1fe9767eba...6b0a2df41c)
</details>
<br />
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)
</details>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
50: Fix TCP command interface rx buffer wrapping r=jordens a=dnadlinger
Previously, if a message spanned the end of the
receive ring buffer, the last byte in the buffer
would be missing from the to-be-decoded message,
leading to a parse error or panic.
With this commit, >3M commands were exchanged
over one socket without further issues.
Co-authored-by: David Nadlinger <code@klickverbot.at>
Previously, if a message spanned the end of the
receive ring buffer, the last byte in the buffer
would be missing from the to-be-decoded message,
leading to a parse error or panic.
With this commit, >3M commands were exchanged
over one socket without further issues.
44: build(deps): bump serde from 1.0.101 to 1.0.102 r=jordens a=dependabot-preview[bot]
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.101 to 1.0.102.
<details>
<summary>Release notes</summary>
*Sourced from [serde's releases](https://github.com/serde-rs/serde/releases).*
> ## v1.0.102
> - Support deserializing `PathBuf` from bytes like `&Path` already did, and support deserializing `Box<Path>` ([#1656](https://github-redirect.dependabot.com/serde-rs/serde/issues/1656), thanks [@​heftig](https://github.com/heftig))
</details>
<details>
<summary>Commits</summary>
- [`2ceabad`](2ceabad360) Release 1.0.102
- [`a00aee1`](a00aee1495) Use a dedicated cfg for PathBuf::into_boxed_path
- [`4e31c99`](4e31c9984d) Merge pull request [#1656](https://github-redirect.dependabot.com/serde-rs/serde/issues/1656) from heftig/path-improvements
- [`b8772a1`](b8772a1e40) Deserialize Box\<Path> through PathBuf::into_boxed_path
- [`42990d8`](42990d8264) Deserialize PathBuf from bytes
- [`cf31418`](cf31418555) Resolve unused_self lint
- [`5db72b8`](5db72b8ad9) Ignore must_use_candidate pedantic lint
- [`fe8f8bc`](fe8f8bcf7b) Address needless_doctest_main lint in serde_test
- [`d4d737d`](d4d737de8d) Resolve redundant_clone lint
- [`52f6e96`](52f6e96ee8) Ignore needless_doctest_main lint
- Additional commits viewable in [compare view](https://github.com/serde-rs/serde/compare/v1.0.101...v1.0.102)
</details>
<br />
[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=serde&package-manager=cargo&previous-version=1.0.101&new-version=1.0.102)](https://dependabot.com/compatibility-score.html?dependency-name=serde&package-manager=cargo&previous-version=1.0.101&new-version=1.0.102)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)
</details>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
40: build(deps): bump serde from 1.0.100 to 1.0.101 r=jordens a=dependabot-preview[bot]
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.100 to 1.0.101.
<details>
<summary>Release notes</summary>
*Sourced from [serde's releases](https://github.com/serde-rs/serde/releases).*
> ## v1.0.101
> - Report errors on malformed serde attributes, like `#[serde(rename =)]` -- the compiler used to reject these itself, but when the compiler relaxed its requirements on attribute syntax these malformed attributes began silently being ignored by serde_derive
>
> - Eliminate unused variable warning when using skip_serializing inside a tuple variant of an adjacently tagged enum ([#1617](https://github-redirect.dependabot.com/serde-rs/serde/issues/1617), thanks [@​arilotter](https://github.com/arilotter))
>
> - Support skip attribute inside of newtype variants ([#1622](https://github-redirect.dependabot.com/serde-rs/serde/issues/1622), thanks [@​Xaeroxe](https://github.com/Xaeroxe))
</details>
<details>
<summary>Commits</summary>
- [`4aba6fa`](4aba6fae78) Release 1.0.101
- [`fe06bc2`](fe06bc2f88) More concise explanation of allow(unused_variables)
- [`8dfb4cd`](8dfb4cd02f) Merge pull request [#1617](https://github-redirect.dependabot.com/serde-rs/serde/issues/1617) from arilotter/master
- [`d1ade37`](d1ade37827) Ignore new too_many_lines lint
- [`9de4924`](9de49241fb) Bug fix for [#1610](https://github-redirect.dependabot.com/serde-rs/serde/issues/1610)
- [`b24d501`](b24d50160a) Remove use of ref keyword from serde_derive
- [`e46463e`](e46463e69f) Add tests for attribute parse errors
- [`a3157c9`](a3157c9572) Produce errors on attr that fails to parse as Meta
- [`0d47226`](0d4722680a) Use flatten() to iterate serde meta items
- [`7ab1259`](7ab12597bb) Un-wrap error message strings for better grepping
- Additional commits viewable in [compare view](https://github.com/serde-rs/serde/compare/v1.0.100...v1.0.101)
</details>
<br />
[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=serde&package-manager=cargo&previous-version=1.0.100&new-version=1.0.101)](https://dependabot.com/compatibility-score.html?dependency-name=serde&package-manager=cargo&previous-version=1.0.100&new-version=1.0.101)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)
Finally, you can contact us by mentioning @dependabot.
</details>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
38: Fix system time counter r=jordens a=cjbe
Previously the time counter was incrementing every 0.5ms, versus the expected 1ms.
Co-authored-by: Chris Ballance <chris.ballance@physics.ox.ac.uk>