I’m just starting writing a bit of code for my midiBox (currently under construction).
I’m working in MacOSX, so converted the batch files to a makefile which seems to work well. I’ve attatched the makefile I used to compile the analog-toolkit. To compile others, just check the defines at the top match those in make.bat, and set OBJS to match the file list (adding .o on the end). You don’t need to include mios_wrapper, or pic18*.o, as the makefile adds them in automatically.
You may need to use gmake, rather than make if you’re running this on other platforms.
When I compiled a few things the hex files were SLIGHTLY different to those included in the package. This may be due to a different build of the compiler/assembler, or maybe just some config options. I haven’t been able to test any compiled apps, as my hardware is still not ready.
hope others find this helpfull.
Ian
p.s. watch out for the tabs - that have become spaces in the html version. If you copy/paste this you’ll need to turn any spaces at the start of lines into tabs, otherwise it won’t work.
Due to the crappy support of Makefiles in a windows environment (e.g. GNU make cannot reference external commands without absolute path), I will propably write a makefile generator which generates a simpler make.bat as the one currently used (because it doesn’t work under Win98 and WinME), and a Makefile for Unix/Mac
Due to the crappy support of Makefiles in a windows environment (e.g. GNU make cannot reference external commands without absolute path), I will propably write a makefile generator which generates a simpler make.bat as the one currently used (because it doesn’t work under Win98 and WinME), and a Makefile for Unix/Mac
I have spent about 4 hours trying to get the makefile to work in WinME… and the best I could do, was to find workaround for the problem with having a string defined with an = character in it. Just split the string in two or three, around the offensive = symbol, and when you execute the strings later on, add the = symbol.
For example,
[tt]
set MIOS_WRAPPER_DEFINES=-DSTACK_HEAD
set MIOS2=0x37f -DSTACK_IRQ_HEAD
set MIOS3=0x33f
%GPASM% %MIOS_WRAPPER_DEFINES%=%MIOS2%=%MIOS3%
[/tt]
Crude, but this works.
Now my problems seem to have become much worse - my system hangs when I run the make.bat file. Haven’t had much time to fight this… would rather solder boards really.
I’ve implemented the makefile generator, which should help to make the build process compatible to Unix and all Windows versions.
Gerald: could you please check it with your windows version?
I tried it - but something terrible is happening, I believe with SDCC - I keep getting general protection faults, and other errors that crash my computer HARD. I was getting these errors with the previous version of the makefile.bat, and I suspect it is something about windoze ME. I’d love to keep fighting with this, but I worry about corrupting my hard-disk with so many hard-boots. Maybe I should make a DOS boot disk, and try to run it without windows in the background?
With a such rock solid filesystem as WinME has, I wouldn’t worry so much about harddisk corruption.. You know, my 98SE only loses the data it’s writing to disk when the crash comes. ;D
hum … maybe there’s a huge lack of very important information inside my head, but I couldn’t do anything with this “OS X”-Makefile. So I converted the existing makefile.bat from the 1.0.c skeleton into a bash-script for os x:
here is the same post along with some more instructions
I hope this is to some use for someone.
If this isn’t the ‘right’ way, please feel free to correct things, at least this is simply working without the need of having VPC and PC-Stuff installed…
thanks for your contribution, good to hear that it works in principle with the Mac.
Well, the problem with your static make.sh script is, that it won’t be automatically enhanced if additional source files are added to the project. Thats the reason, why I’ve implemented a makefile generator, which generates a “Makefile” for Unix, and a “make.bat” for DOS.
-> see tools/mkmk.pl and “MAKEFILE.SPEC”
I would propose to get use of this generator in order to guarantee the compatibility with complex C application (it would also be more newbie-friendly)
There are two ways: either the mkmk.pl script generates a make.sh file for MacOSX, or we are trying to improve the generated Makefile, so that it runs under Linux and MacOSX
Did you try out the Makefile? “make -f Makefile” should also work on the Mac, no?