nsunier Posted March 3, 2008 Report Posted March 3, 2008 Hello,I'm trying to compil the ain64_din128_dout128_v2_0 C example code. I use Windows XP SP2. I've installed GPUTILS 0.13.5; POSIX; SDCC 2.7.0.I go in source code directory and type make:Makefile generated.Makefile.bat generated.Assembling MIOS SDCC wrapper==========================================================================Compiling pic18f452.cat 1: warning 117: unknown compiler option '--fstack' ignored_output\pic18f452.asm:168:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:171:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:174:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:177:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:180:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:186:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:189:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:192:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:195:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:198:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:204:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:207:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:210:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:213:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:216:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:222:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:225:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:228:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:231:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:234:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:237:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:243:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:252:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:255:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:264:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:272:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:277:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:285:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:288:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:293:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:296:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:299:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:304:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:309:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:314:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:317:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:320:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:323:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:329:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:334:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:360:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:363:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:366:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:378:Warning [231] No memory has been reserved by this instruction.==========================================================================Compiling main.cat 1: warning 117: unknown compiler option '--fstack' ignored==========================================================================Linking project==========================================================================Converting to project.syxBlock 003000-0033FF allocated - Checksum: 06Block 003400-0037FF allocated - Checksum: 26Block 003800-003BFF allocated - Checksum: 34==========================================================================SUCCESS!I'm wondering what's going wrong with this '--fstack' command. Can anyone help me?Another question: I use a PIC 18F4620 instead of 18F452. Should I modifiy only 'main.c' (#include "pic18f452.h" -> #include "pic18f4620.h")?Thanks! ;)nsunier Quote
audiocommander Posted March 3, 2008 Report Posted March 3, 2008 Hi,you cannot compile PIC18F452 code for a PIC18F4620. I guess you know that there are also different MIOS-versions for these chips. Due to a higher memory capacity of the -4620, it has different memory addresses. Please search the forum and/or the wiki and you'll find some (probably not very illuminating) informations on how to adapt the program for the PIC18F4620.If you want my opinion: Unless you're a dedicated programmer, take the easy way and use a PIC18F452; two days fiddling around, normally isn't worth 6$ ;)Best,Michael Quote
nsunier Posted March 3, 2008 Author Report Posted March 3, 2008 Ok, I understand.I've also ordered PIC18F452. So it's not a problem. But I've used the PIC18F4620 because I was thinking: 'I'll have less limitations in the future.' So, I'll go back with the PIC18F452.And now, about the compilation problem? I haven't modified yet the source code. So it's a PIC18F452 source code. It should work?!Kind regards,nsunier Quote
audiocommander Posted March 3, 2008 Report Posted March 3, 2008 hmm, if you compile the unchanged source, there should be no error.I'm using GPUtils 0.13.3b and SDCC 2.7.4 (on the mac) and can compile without problems:[tt]% makeperl tools/hex2syx.pl project.hexBlock 003000-0033FF allocated - Checksum: 02Block 003400-0037FF allocated - Checksum: 37Block 003800-003BFF allocated - Checksum: 34[/tt]Have you changed any file?Best,Michael Quote
nsunier Posted March 3, 2008 Author Report Posted March 3, 2008 Have you changed any file?No. Just to be sure, I've deleted every project files and re-downloaded them. It generates exactly the same error.Do you think, I should use another version of GPutils and SDCC? (Where have you find SDCC 2.7.4? On this page, I can see that the latest version (even for Mac) is 2.7.0)nsunier Quote
nsunier Posted March 3, 2008 Author Report Posted March 3, 2008 I've just tried with SDCC 2.5.0. The '--fstack' error disappeared. But the output still shows warnings:Makefile generated.Makefile.bat generated.Assembling MIOS SDCC wrapper==========================================================================Compiling pic18f452.cProcessor: 18F452_output\pic18f452.asm:168:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:171:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:174:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:177:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:180:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:186:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:189:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:192:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:195:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:198:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:204:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:207:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:210:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:213:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:216:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:222:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:225:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:228:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:231:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:234:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:237:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:243:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:252:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:255:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:264:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:272:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:277:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:285:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:288:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:293:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:296:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:299:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:304:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:309:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:314:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:317:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:320:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:323:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:329:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:334:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:360:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:363:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:366:Warning [231] No memory has been reserved by this instruction._output\pic18f452.asm:378:Warning [231] No memory has been reserved by this instruction.==========================================================================Compiling main.cProcessor: 18F452==========================================================================Linking project==========================================================================Converting to project.syxBlock 003000-0033FF allocated - Checksum: 06Block 003400-0037FF allocated - Checksum: 26Block 003800-003BFF allocated - Checksum: 34==========================================================================SUCCESS!nsunier Quote
nsunier Posted March 3, 2008 Author Report Posted March 3, 2008 And now, I've changed GPutils to 0.13.3b version:Makefile generated.Makefile.bat generated.Assembling MIOS SDCC wrapper==========================================================================Compiling pic18f452.cProcessor: 18F452==========================================================================Compiling main.cProcessor: 18F452==========================================================================Linking project==========================================================================Converting to project.syxBlock 003000-0033FF allocated - Checksum: 06Block 003400-0037FF allocated - Checksum: 26Block 003800-003BFF allocated - Checksum: 34==========================================================================SUCCESS!It seems to be working?!Just a last question:Block 003000-0033FF allocated - Checksum: 02Block 003400-0037FF allocated - Checksum: 37Block 003800-003BFF allocated - Checksum: 34[/tt]I don't have the same checksum like you. Is it a problem?nsunier Quote
audiocommander Posted March 3, 2008 Report Posted March 3, 2008 good to hear :)To be honest, I dunno if the checksums are a problem. I would have expected them to be the same, but as you can't damage the µC by uploading this program, I'd simply test it ;)Best,Michael Quote
nsunier Posted March 3, 2008 Author Report Posted March 3, 2008 I'll try it as soon as I have built the AIN/DIN/DOUT modules. Now, only the CORE one is built. I've uploaded the program and I receive MIDI messages. It seems to work well.A big thank you for your help. :)nsunier Quote
TK. Posted March 3, 2008 Report Posted March 3, 2008 PIC18F452 is only a subset, PIC18F4620 is compatible, but provides more flash, more RAM, and more bugs ;)Means: you are able to run programs compiled for PIC18F452 on a PIC18F4620 without changes.With the upcoming project setup (which is still not completely documented), it will be much easier to change the processor type.See apps/examples/ain64_din128_dout128_v2_0, how clear an application does look meanwhile :)So, in order to change the processor, you would only need to change the PROCESSOR variable, and pic18f452.o file in the Makefile - thats all.E.g., the register file of the processor is not included directly into main.c anymore, instead we are using <pic18fregs.h>, which internally selects the register file depending on the PROCESSOR argument, which has been predefined in the MakefileAlso the Linker File will be selected automatically, so that you don't need to take care about this :)Best Regards, Thorsten. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.