Skip to content

MicroPython: the assert handler links on stm32 - #14

Merged
bdbarnett merged 1 commit into
mainfrom
fix/assert-no-strrchr
Nov 8, 2026
Merged

bdbarnett merged 1 commit into
mainfrom
fix/assert-no-strrchr

Conversation

@bdbarnett

Copy link
Copy Markdown
Contributor

The assert handler from #13 trimmed the file name with strrchr, which the stm32 port's C library doesn't provide, so the Arduino GIGA build stopped linking (undefined reference to strrchr). A short loop keeps the same behaviour: it takes what follows the last / or \\, or the whole name when there is neither. Checked the loop alone on gcc with a Unix path, a Windows path and a bare name; the GIGA build itself is checked when the firmware repository moves its pin to this commit.

lv_micropython_assert_failed used strrchr to trim the file name, and the stm32 port's C library has none, so the Arduino GIGA build failed to link. A loop does the same job.
@bdbarnett
bdbarnett merged commit 8fd5c3f into main Nov 8, 2026
5 checks passed
@bdbarnett
bdbarnett deleted the fix/assert-no-strrchr branch November 8, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant