LCC1802 For The Mac?
I got a fine new MacBook Pro for Christmas and that’s what I’m going to use in Florida this winter. That means I have to get at least the basics of the olduino setup working before I leave home, starting with LCC1802.
I was able to check it out from the repository easily enough and to try building it using directions from here. Sadly, I was pretty cavalier with the source code when i was working on windows so now it’s got the wrong line endings: Windows likes cr-lf and OS X insists on just lf. I would bet that Xcode/llvm would live with the issue but some of the other tools (lburg) can’t I’m going to try just re-saving the .md files with corrected line endings and see what happens.
Once I get it to build I still have to modify some of the unix-specific files as I did for windows and then get the assembler working.
I’m also considering installing bootcamp on the mac to save myself from learning a whole bunch of complicated conversion stuff. It would also avoid crapping up the mac which it would be nice to keep simple (although I’m still going to do the LLVM work on it).
UPDATE: Sadly, i don’t see this going anywhere good. It’s easy enough to convert the line endings on windows but when i transfer them to the mac i get some kind of thing where the file is not terminated properly. Rather than hassle this I may end up bringing both laptops to florida with me.
make ./build/rcc ./build/lburg src/alpha.md build/alpha.c cc -g -c -Isrc -o build/alpha.o ./build/alpha.c ./build/alpha.c:4877:26: warning: '&&' within '||' [-Wlogical-op-parentheses] || i > 0 && strcmp(callee[i-1]->name, "va_alist") == 0; ~~ ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./build/alpha.c:4877:26: note: place parentheses around the '&&' expression to silence this warning || i > 0 && strcmp(callee[i-1]->name, "va_alist") == 0; ^ ( ) ./build/alpha.c:5238:2: error: expected identifier or '(' 8, 8, 0, /* T * */ ^ ./build/alpha.c:5286:1: error: extraneous closing brace ('}') }; ^ ./build/alpha.c:5289:13: error: redefinition of 'rcsid' static char rcsid = "$Id: alpha.md,v 1.1 2002/08/28 23:12:41 drh Exp $"; ^ ./build/alpha.c:5236:13: note: previous definition is here static char rcsid = "$Id: alpha.md,v 1.1 2002/08/28 23:12:41 drh Exp $"; ^ 1 warning and 3 errors generated. make: *** [build/alpha.o] Error 1
I still think this is a dead issue but I do have a handle on what’s going on. If not why. It looks like if I edit a file on windows and save it onto the max desk changing the line terminators from carriage return line feed to just linefeed the file becomes a bit smaller because the extra linefeeds are missing. What seems to happen though is the file is saved with the original length and whatever was originally at the end of the file just gets left there so if it’s C code you just end up with some duplicated C code. Bizarrely the duplication actually shows up on the Windows machine, and if I erase the bottom part of the file and save it again, the problem is still there. It only gets cleared out if I edit the file on the Mac and save it there. Obviously it would be better to find a way to change the line endings on the Mac.
Oh, also, if you’re using TextPad on windows (which I heartily recommend), you have to save files in “Unix” format rather than “Mac” format which is different!