C development and patching for P01/P59
- antus
- Site Admin
- Posts: 8253
- Joined: Sat Feb 28, 2009 8:34 pm
- cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B - Contact:
Re: C development and patching for P01/P59
personly I think the gnu c compiler is the most industry standard option. thats how we compiled the pcmhammer kernel. but like gampy said the code output is somewhat bloated (for any c compiler, considering the size of the pcm). and the setup time to define the hardware in header files is real. the advantage to using gnu c (gcc) or gnu assembler (gas) and linker (ld) is they'll still be around in the future too. gnu toolchain can convert binary/srec etc too. c++ builder isnt the right tool for this. maybe get the gnu 68k toolchain and compile the pcmhammer kernel and prove your build works then go from there.
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
Re: C development and patching for P01/P59
Ok, trying to do what you suggested and I'm stuck already.
Sorry I'm such a beginner at this.
Code: Select all
C:\Users\bubba2533\Documents\GitHub\PcmHacks\Kernels>make clean
rm -f *.bin *.o *.elf *.asm
process_begin: CreateProcess(NULL, rm -f *.bin *.o *.elf *.asm, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [clean] Error 2
LS1 Boost OS V3 Here. For feature suggestions post in here Development Thread. Support future development ->Patreon.
Re: C development and patching for P01/P59
Not to worry, plenty of help available.
The build process is slightly complicated so it is all wrapped in a Batch file (.cmd file).
Do you have GNU m68k installed in,
The .cmd is important.
The build process is slightly complicated so it is all wrapped in a Batch file (.cmd file).
Do you have GNU m68k installed in,
You want to use Build.cmdc:\SysGCC\m68k-elf
The .cmd is important.
To Clean the Kernel project use Clean.batC:\Users\bubba2533\Documents\GitHub\PcmHacks\Kernels>Build.cmd
-EnjoyC:\Users\bubba2533\Documents\GitHub\PcmHacks\Kernels>Clean
Intelligence is in the details!
It is easier not to learn bad habits, then it is to break them!
If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
It is easier not to learn bad habits, then it is to break them!
If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
Re: C development and patching for P01/P59
YesGampy wrote:Not to worry, plenty of help available.
The build process is slightly complicated so it is all wrapped in a Batch file (.cmd file).
Do you have GNU m68k installed in,c:\SysGCC\m68k-elf
Here is what I got with those commands:
Code: Select all
C:\Users\bubba2533\Documents\GitHub\PcmHacks\Kernels>Clean
Deleting common-readwrite.o
Deleting common.o
Deleting crc.o
Deleting flash-amd.o
Deleting flash-intel.o
Deleting main.o
Deleting write-kernel.o
Deleting kernel.disassembly
Deleting kernel.bin
Deleting kernel.elf
C:\Users\bubba2533\Documents\GitHub\PcmHacks\Kernels>Build.cmd
..\Apps\PcmHammer\bin\debug
The system cannot find the path specified.
0 file(s) copied.
LS1 Boost OS V3 Here. For feature suggestions post in here Development Thread. Support future development ->Patreon.
Re: C development and patching for P01/P59
That error is due to the fact that PCMHammer project is not built ... No problem, we can work around that very simply.
Add a "-c" to the Build.cmd command line.
Add a "-c" to the Build.cmd command line.
The kernel is actually built at that point and it's just failing to copy the resulting kernel.bin to the PCMHammer build directory.C:\Users\bubba2533\Documents\GitHub\PcmHacks\Kernels>Build.cmd -c
Intelligence is in the details!
It is easier not to learn bad habits, then it is to break them!
If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
It is easier not to learn bad habits, then it is to break them!
If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
Re: C development and patching for P01/P59
Yay! no errors!
LS1 Boost OS V3 Here. For feature suggestions post in here Development Thread. Support future development ->Patreon.
Re: C development and patching for P01/P59
Awesome ...
I have modified Build.cmd and Clean.bat for you, please replace your existing ones with these.
What I have done is,
Fix Clean.bat so it will remove ".i" files ...
Added a "-t" option to Build.cmd so you can have it "save-temps" therefore you can look at the intermediate ASM ... it's the same as "-S" without halting the process. Obviously you need to remove the .txt extension when saving ...
You'll want to have a look at the .s files in kernel directory after running Build.cmd.
FYI, Build.cmd has simple Help ... use -h as the last command line option.
Examples:
I have modified Build.cmd and Clean.bat for you, please replace your existing ones with these.
What I have done is,
Fix Clean.bat so it will remove ".i" files ...
Added a "-t" option to Build.cmd so you can have it "save-temps" therefore you can look at the intermediate ASM ... it's the same as "-S" without halting the process. Obviously you need to remove the .txt extension when saving ...
You'll want to have a look at the .s files in kernel directory after running Build.cmd.
FYI, Build.cmd has simple Help ... use -h as the last command line option.
Examples:
will show the default option settings.Build.cmd -h
will show the current option settings.Build.cmd -c -d -t -h
Intelligence is in the details!
It is easier not to learn bad habits, then it is to break them!
If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
It is easier not to learn bad habits, then it is to break them!
If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
Re: C development and patching for P01/P59
Awesome thanks. Now I just have to learn C++ :shock:
LS1 Boost OS V3 Here. For feature suggestions post in here Development Thread. Support future development ->Patreon.
Re: C development and patching for P01/P59
I'm sure this is subjective to ones opinion ... However I would loose the ++ and stick to pure C.
I suspect the ++ will bloat the assembly a bit more, though I must admit age and oxygen deprivation has made me forget the results of testing long past ...
Sure would be nice if Godbolt added m68k to Compiler Explorer, that would be the cats meow ...
I was going to email him about it and never did, I suspect it would be extremely simple for one that has the tools setup and knows the addition process.
I suspect the ++ will bloat the assembly a bit more, though I must admit age and oxygen deprivation has made me forget the results of testing long past ...
Sure would be nice if Godbolt added m68k to Compiler Explorer, that would be the cats meow ...
I was going to email him about it and never did, I suspect it would be extremely simple for one that has the tools setup and knows the addition process.
Intelligence is in the details!
It is easier not to learn bad habits, then it is to break them!
If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
It is easier not to learn bad habits, then it is to break them!
If I was here to win a popularity contest, their would be no point, so I wouldn't be here!
Re: C development and patching for P01/P59
I'm not sure I really know the difference as of yet. But I already own this book since I was planning on trying to learn some C++ so I figured I already have it.
LS1 Boost OS V3 Here. For feature suggestions post in here Development Thread. Support future development ->Patreon.