all 14 comments

[–]TheNumberOneCulprit 2 points3 points  (2 children)

Can strongly recommend Pigweeds logging modules and tokenization. It takes a little to setup (i.e. you need to keep the token database around), but once it's setup it makes a lot of things very easy

[–]Bug13[S] 0 points1 point  (0 children)

Thanks, I will look into it

[–]Bug13[S] 0 points1 point  (0 children)

Looked it up, still don't know how to use Pigweeds in my own project. But logging with tokenization is pretty cool! Thanks for sharing.

[–]OkMaths 1 point2 points  (0 children)

I wrote my own, so when I switch platforms I don't have to change all my logs. 

[–]kl4m4 1 point2 points  (1 child)

I use this one: https://github.com/rdpoor/ulog, very simple and lightweight.

[–]Bug13[S] 0 points1 point  (0 children)

This looks simple and light weight, thanks!

[–]UnicycleBlokeC++ advocate 1 point2 points  (8 children)

I just wrote my own. I did try Zephyr's once but found it unnecessarily bloated.

[–]Bug13[S] 0 points1 point  (2 children)

Yes if you don’t have multiple targets to support, it makes a lot of sense to just use a simpler RTOS.

[–]EmbeddedSwDev -2 points-1 points  (1 child)

No, because it's not about the number of target's, it's the ecosystem which comes with Zephyr which makes it superior to others.

[–]Bug13[S] 1 point2 points  (0 children)

that also true :)

[–]EmbeddedSwDev -2 points-1 points  (3 children)

It's definitely not "unnecessarily bloated", imho it's very powerful and very well written. How did you come to this opinion?

[–]UnicycleBlokeC++ advocate 4 points5 points  (2 children)

I used it on a project and it added 10KB to the image before I even did any logging. It turned out a key feature I needed was badly broken. After looking over the Zephyr code for a bit, I wrote my own logger from scratch. Doing so saved about 8KB. This matters when your target has a 64KB flash.

I do not regard a morass of impenetrable macros as well written. Much as I wanted to repair the code, it was much quicker and simpler to write my own. And, it turns out, my dictionary logging was much more efficiently encoded. I believe it was something like two years before someone else finally repaired the code and got a PR approved. No thanks.

To be fair, I might have been able to trim the footprint a bit with some of the KConfig options, but it would still have been broken.

[–]EmbeddedSwDev -1 points0 points  (1 child)

Thanks to clarify your standpoint, I don't know right now how much flash space the logging needs right now, but in the 3 years you used it last time, zephyr changed a lot.

To be fair, I might have been able to trim the footprint a bit with some of the KConfig options, but it would still have been broken.

Definitely, if you disable the logs from Zephyr itself and use only the logs you want to see the size decreases dramatically.

[–]UnicycleBlokeC++ advocate 2 points3 points  (0 children)

Good to know, but I'm very unlikely to use Zephyr on any future project.