RT-Thread / RT-Thread/rt-thread

Using ymodem on the M0 kernel will cause hardfault problems

Open
#3,387 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

proposal
Dominant language
C
Stars
12.2k
Forks
5.4k
Avg merge
4d 12h
Merged PRs (30d)
40

Description

Because M0 kernel MCU does not support non aligned access, when receiving data to write to on-chip memory, if using 32-bit pointer to access buffer, it will cause failure.

Solution: when the buffer pointer is passed, copy the data to the aligned buffer and pass it again.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the YMODEM receive path and the code that writes received data to on-chip memory on the M0 kernel. Reproduce the hardfault with a non-aligned buffer, then verify that the receive path uses an aligned buffer before passing data onward and that the fault no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.