Skip to content

ports/atmel-samd/README and README: feather_m0_adalogger readme updates - #460

Merged
tannewt merged 3 commits into
adafruit:masterfrom
stewmystre:adalogger-readme-fixes
Nov 27, 2017
Merged

ports/atmel-samd/README and README: feather_m0_adalogger readme updates#460
tannewt merged 3 commits into
adafruit:masterfrom
stewmystre:adalogger-readme-fixes

Conversation

@stewmystre

Copy link
Copy Markdown

Documentation fixes for #323 and #317:

ports/atmel-samd/README:

  • Added D4 and moved associated SD_CS so that they are paired within list
  • Added D7 and SD_CD which is the SD Card Detect pin
  • Added D8 and GREEN_LED
  • Added RED_LED associated with D13
  • Added Setup information regarding arm complier packages

README:
Updated to reflect that feather_m0_adalogger microSD is supported

[skip ci] doc updates not code

…atch updated pins.c

- Added D4 and moved associated SD_CS so that they are paired within list
- Added D7 and SD_CD which is the SD Card Detect pin
- Added D8 and GREEN_LED
- Added RED_LED associated with D13
- Added Setup information regarding arm complier packages
- [skip ci] doc not code
@tannewt
tannewt self-requested a review November 26, 2017 17:51

@tannewt tannewt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the fix on both branches!

Comment thread ports/atmel-samd/README.rst Outdated
sudo dpkg --add-architecture i386
sudo apt-get update -qq || true
sudo apt-get install -y python3 gcc-multilib pkg-config libffi-dev libffi-dev:i386 qemu-system gcc-mingw-w64
sudo apt-get install -y --force-yes gcc-arm-embedded

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same as #461:

I don't think the middle three are actually required. Please also remove the -y and --force-yes arguments since these will be manually run.

- Setup information regarding arm complier packages was cleaned up
- [skip ci] doc not code
@stewmystre

Copy link
Copy Markdown
Author

Updated as requested and my pleasure...initially did it on the master but ran into issues using the resulting firmware because so much is being updated ... the 2.x branch is more stable and I got the firmware working well with the new pins now exposed for use.

@tannewt tannewt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@tannewt
tannewt merged commit fb1dcd3 into adafruit:master Nov 27, 2017
@stewmystre
stewmystre deleted the adalogger-readme-fixes branch November 27, 2017 05:28
dhalbert pushed a commit that referenced this pull request Jun 10, 2026
… bypass STA_PROTECT while they hold the lock

Since #10659, filesystem_is_writable_by_python() returns false on any
USB-device-capable board after main.c boot (CONCURRENT_WRITE_PROTECTED
and USB_WRITABLE are both set). vfs_fat_diskio.c:disk_ioctl(IOCTL_STATUS)
calls this function and reports STA_PROTECT when it returns false, so
f_open(FA_WRITE) returns FR_WRITE_PROTECTED.

This affects every non-USB-MSC writer that calls f_open directly through
FatFS:

- BLE File Transfer (supervisor/shared/bluetooth/file_transfer.c): all
  WRITE/MOVE/MKDIR/DELETE commands fail with STATUS_ERROR_READONLY even
  when the board has no host on the bus. This is the original #10972
  repro on CLUE running from battery.
- Web workflow PUT/POST/MOVE/DELETE (supervisor/shared/web_workflow):
  same path, web-editor #460/#506 surfaces this as a read-only error.
- storage.remount(readonly=False): can take the lock but then can't
  actually write while the lock is held.

Each of these already calls filesystem_lock() to claim the blockdev
LOCKED flag before writing. USB MSC does NOT go through filesystem_lock;
it grabs LOCKED directly via blockdev_lock() inside tud_msc_is_writable_cb.
So filesystem_lock() is exactly the right place to grant temporary write
permission via IGNORE_WRITE_PROTECTION, mirroring the pattern main.c uses
around boot.py.

After this change:
- filesystem_lock() is the single source of truth for 'I'm the local
  writer right now'. Holders can f_open(FA_WRITE) and operate normally.
- USB MSC continues to be mutually excluded via LOCKED; it never sets
  IGNORE_WRITE_PROTECTION because it doesn't go through filesystem_lock.
- _is_writable_by_python and _is_writable_by_usb are unchanged; the
  symmetric mutex from #10659 is preserved.
- Python direct open(FA_WRITE) without a lock still requires
  storage.disable_usb_drive() or storage.remount(readonly=False) — same
  as current behavior.

Fixes #10972
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