Jump to content

Linux/Win-Compliant C PIC Prog


Guest Mr.Freeze
 Share

Recommended Posts

Guest Mr.Freeze

I've been using some PIC16F876A µC's at work for one month now, with MicroChip's PICSTART Plus hardware & MPLAB software and PicAnt C2C compiler. Easy way but not for cheapskates... I'd like to find a low-cost solution for my own projects (including MIDIbox ones, that's why I'm here), running on Linux (and Windows if available), in C not ASM!

When it comes to hardware, I've been thinking of C. Tavernier's or El Cheapo's designs. Should the SourceForge couple (SDCC & PP06) help handle that situation, PIC16F support seems to be on its earliest stage... Any replacement idea?

Link to comment
Share on other sites

Guest Mr.Freeze

I've found the aforementionned makefile on the topic "Status of SDCC evaluation" (for those who read posts silently on their own):

 project.hex:      main.c 
       gpasm -c mios_wrapper/mios_wrapper.asm -I mios_wrapper -o mios_wrapper.o 
       sdcc -S -V -mpic16 -p18F452 --pomit-config-words --pomit-ivt -pleave-reset-vector main.c  
       perl tools/fixasm.pl main.asm 
       gpasm -c main.asm 
       gplink main.o mios_wrapper.o -s project.lkr -o project.hex 
       perl tools/hex2syx.pl project.hex

I think I can guess how to remove occurences of the MIOS C Wrapper above as I ain't into MIOS programming for the moment. I'll still be notfied of updates on the other topic for future projects.

Thanks!

Link to comment
Share on other sites

Here's a better one I think ;)

project.syx:    main.c mios_wrapper.o
        sdcc -S -V -mpic16 -p18F452 --pomit-config-words --pomit-ivt -pleave-reset-vector main.c
        perl tools/fixasm.pl main.asm
        gpasm -c main.asm
        gplink main.o mios_wrapper.o -s project.lkr -o project.hex
        perl tools/hex2syx.pl project.hex
        mios_upload.pl project.syx

mios_wrapper.o: mios_wrapper/mios_wrapper.asm
        gpasm -c mios_wrapper/mios_wrapper.asm -I mios_wrapper -o mios_wrapper.o

upload: project.syx
        mios_upload.pl project.syx

Link to comment
Share on other sites

When using Windows, it's more to be considered as a *.bat script than a makefile, isn't it?

Yes I think, but I don't know windows very well.

Why don't you use PP06 instead of GPASM?

PP06 is for programming the chip? gpasm is a pic assembler (needed because SDCC output asm). But I didn't know PP06, I will look after it now ;)

Link to comment
Share on other sites

I use Pikdev for linux, works fine with the midbox design of the JDM. There is a decent open source C compiler in the works too, but I don't think it's done yet.

And gvim for writing the source code, it has syntax highlighting for Microchip Assembly, cool!

iain

Link to comment
Share on other sites

And gvim for writing the source code, it has syntax highlighting for Microchip Assembly, cool!

kwrite has this feature too ;) (and emacs has got an asm mode too)

There is a decent open source C compiler in the works too, but I don't think it's done yet.

This is not SDCC?

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...