BitNetPDK icon indicating copy to clipboard operation
BitNetPDK copied to clipboard

What's the issue with newer SDCC? IS there an upstream bug report?

Open spth opened this issue 1 year ago • 7 comments

The README mentions "Use SDCC 4.1.0 to build. Later versions create broken code". What is the problem here? Is there a corresponding ticket in the SDCC bug tracker?

spth avatar May 21 '24 16:05 spth

It's the same issue that I brought up in the free-pdk examples. I haven't been able to pinpoint the error back then.

cpldcpu avatar May 21 '24 21:05 cpldcpu

The one that turned out to be a mov vs. mov.io issue: https://github.com/free-pdk/free-pdk-examples/issues/13 ?

spth avatar May 24 '24 11:05 spth

Yeah, the compatibility-breaking change seems to have been one regarding IO instructions.

My old UART routines compiled without error, but resulted in nonfunctional code. Very annoying and difficult to debug. I solved it by reverting to an older version of SDCC. I may need to find some time to figure out how to make it compatible to the newer SDCC versions.

cpldcpu avatar May 24 '24 16:05 cpldcpu

Then the solution should be easy: in all the I/O that you do via inline asm, change the instructions used to mov.io, set0.io, etc. My recommendation: except for the few places where inline asm really provides an advantage, just use C.

spth avatar May 24 '24 16:05 spth

Just unrelated topic on this side: Any plans to migrate SDCC to git or even github? Would simplify submission of error reports significantly. Nowadays, I (and many others) have very little cross section to SVN and sourceforge and having to work with an unfamiliar system adds significant friction.

cpldcpu avatar May 24 '24 17:05 cpldcpu

AFAIK, there are no plans for a migration. But it looks like we'll get an official git mirror of the svn repo.

spth avatar May 24 '24 17:05 spth

Please check if the free-pdk examples work for you now. If yes, you can port the fixes there to here.

spth avatar May 24 '24 19:05 spth