0.15.1 SoC code no longer produces serial output

So I just tried a build with 0.15.1 (aarch64,ReleaseSmall,freestanding,cortex_a53) and my PinePhone SoC serial output is producing some of my characters but mostly garbage, and the phone no longer boots :frowning:

It still works with slightly older version. (zig-aarch64-linux-0.15.0-dev.1184+c41ac8f19). I noticed the elf file is ~28k bigger.

The serial out is just poking some values to a volatile pointer to a hardware register, same technique I’ve been using since 0.8.n.

Could this be anything to do with the changes made to objCopy? I dont see any errors being generated for whatever was regressed. Here is my build step:

const hex = elf.addObjCopy(.{
    .format = .bin,
});
b.default_step.dependOn(&elfCopy.step);

Otherwise I’ll try getting some serial out using assembly tomorrow when I’m feeling a bit fresher and see if I can narrow the problem down.

So I’ve reduced my code down to the minimum, and the .elf files are now identical! but the .bin files are different :frowning: So this does seem to be something to do with objCopy. The strings in the binary are not garbled like I see on the console, so something else is broken in there. But no idea how to solve this one :frowning:

https://ziglang.org/download/0.15.1/release-notes.html#zig-objcopy-regressed

Yes I saw that thanks, but I was expecting to see an error if I’d encroached on something broken. It’s a bit vague to be fair, and I also realised the #number was referring to a bug, but again, not very clear if it can be used or not. Do you know if there an alternative solution please? other than dropping back to my old Zig version.

I don’t have a lot of knowledge about this and the details.

Okay, thanks anyway. At least it looks like more was added than removed, so it seems hopeful it’ll remain a supported feature :slight_smile:

I’ll give the command line tool a try on Monday, just to be sure this is the problem.

So the problem for sure is objcopy. I switched to the command line version, and now things are back to working again :slight_smile: