HackerTrans
TopNewTrendsCommentsPastAskShowJobs

begriffs

no profile record

Submissions

How to build dependable bare-metal ARM firmware with Unix tools

begriffs.com
1 points·by begriffs·3 yıl önce·1 comments

comments

begriffs
·2 yıl önce·discuss
I created a lightweight shell script to check many url combinations on a site for feeds.

https://github.com/begriffs/findrss

The combinations came from what I observed in the big list of blogs I follow. The script works pretty well for most sites.
begriffs
·2 yıl önce·discuss
> DDD is still maintained?

Absolutely. I wrote about its features here https://begriffs.com/posts/2022-07-17-debugging-gdb-ddd.html

Since the article was written, the maintainers fixed the issues I pointed out. No need for many of those workarounds now. Versions 3.4.0 and 3.4.1 are substantial.
begriffs
·2 yıl önce·discuss
I see CMSIS definitions for the RP2040 at https://github.com/raspberrypi/CMSIS-RP2xxx-DFP but none for RP2350. Maybe they'll eventually appear in that repo, given its name is RP2xxx? I thought vendors are legally obligated to provide CMSIS definitions when they license an ARM core.
begriffs
·2 yıl önce·discuss
I have a hard-copy of this book, and it seems like the PDF isn't the final version, judging by the hand drawn illustrations at least.

The book does dive into some old and arcane object file formats, but that's interesting in its own way. Nice to get a comparison of how different systems did things.

After reading that book and other sources, I examined how people typically create libraries in the UNIX/Linux world. Some of the common practices seem to be lacking, so I wrote an article about how they might be improved: https://begriffs.com/posts/2021-07-04-shared-libraries.html

Edit: That covers the dynamic linking side of things at least.
begriffs
·3 yıl önce·discuss
Interesting, maybe it depends on the reader. I tried a channel just now in newsboat and it wasn't smart enough to find the feed, even though I see the page contains

    <link rel="alternate" type="application/rss+xml" title="RSS" href="...">
begriffs
·3 yıl önce·discuss
Oh yeah, gotta love the secret feed link.

    https://www.youtube.com/feeds/videos.xml?channel_id=$FOO
I follow a number of channels this way. I'm grateful and sort of surprised YouTube hasn't killed it off.
begriffs
·3 yıl önce·discuss
I still follow many RSS feeds (about 250). Sometimes it's hard to find the feed on a site, because the feeds aren't always advertised and their URLs can be tricky. Based on the URLs I've seen, I created a simple script to check if a site has a feed:

https://github.com/begriffs/findrss
begriffs
·3 yıl önce·discuss
I've been meaning to give Motif a try for cross-platform C GUIs. Can anyone share their perspective with that, and compare with IUP?
begriffs
·7 yıl önce·discuss
> If your buffer isn't a NUL-terminated, then don't call a function that is only defined for NUL-terminated buffers.

It's not that people want to pass strncpy source buffers that lack NUL termination, it's that strncpy in certain situations will not NUL terminate its results.

https://begriffs.com/posts/2019-01-19-inside-c-standard-lib....

> some people claim strlcpy() is 'broken'

Speaking of strlcpy, it thankfully doesn't have the problem that strncpy does. However strlcpy is not in the C standard or in POSIX, so can't be used portably. In C99 snprintf is a better choice.
begriffs
·7 yıl önce·discuss
> the same expression broke on a lot of compilers as soon as optimization was turned on

C is not a "try it and see" language. If you stray from the spec then things will act differently and break between compilers. Section 7.13.2 specifies that only local variables declared as volatile will have a determinate value after a longjmp.
begriffs
·7 yıl önce·discuss
> you can jump anywhere, not limited to the same function

Outside of the current function, yes. Anywhere, no.

Longjmp allows you to return to places you’ve already been and have saved with setjmp. Also attempting to longjmp to a function that has since returned is undefined behavior. Thus longjmp’s usual use case is like exceptions in other languages, going back up the call chain, skipping intermediate functions.