atsamd icon indicating copy to clipboard operation
atsamd copied to clipboard

bsp: Add defmt feature

Open ianrrees opened this issue 5 months ago • 6 comments

This adds a defmt feature to our T1 BSPs (plus Grand Central M4, as groundwork for @supersimple33 's #902) which enables the HAL's defmt feature and sets the linker argument using build.rs.

I'm a little surprised this seems compatible with the use_rtt feature, inasmuch as the examples still build. @kyp44 if you have a minute, could you please have a look and see if this looks problematic?

Resolves #810

ianrrees avatar Jul 13 '25 08:07 ianrrees

Great idea with the build.rs!

sajattack avatar Jul 13 '25 17:07 sajattack

~~Before merging this, I'd like to add a comment about using DEFMT_LOG near to the defmt feature in Cargo.toml~~

ianrrees avatar Jul 13 '25 18:07 ianrrees

@ianrrees is there something specific you'd like me to look at? I don't use a debugger or defmt, so I am not really tracking any of this stuff.

kyp44 avatar Jul 13 '25 22:07 kyp44

@ianrrees is there something specific you'd like me to look at? I don't use a debugger or defmt, so I am not really tracking any of this stuff.

Nothing specific, just noticed that git blame showed you as touching some lines to do with use_rtt

ianrrees avatar Jul 13 '25 23:07 ianrrees

@ianrrees I did not see this in the git blame, though I have never used that command before until now. I did touch lines related to the rtic feature since I worked on that. in any case, I haven't done any actual work on the use_rtt explicitly so I'm not familiar with it, though maybe at one point I had to touch something for some other reason.

kyp44 avatar Jul 19 '25 14:07 kyp44

@ianrrees I can't find anything wrong with this PR that might need correcting, it all looks good.

Potentially, yes, using RTT Serial and DEFMT could cause issues if used together, I might be able to test this later today and check

rnd-ash avatar Jul 30 '25 06:07 rnd-ash