Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : mm+ and the source code for 470 chip....
Author | Message | ||||
plasma Guru Joined: 08/04/2012 Location: GermanyPosts: 437 |
i know you need full ( payed) compiler for the 170 chip and mmbasic . but can i compile with the "open" version for mm+ and the 470 chip? |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
Yes, you can. Change the optimisation for gcc to -O1 (level 1). You will also need to go through the source and delete the qualifier __attribute__((mips16)) which is placed in front of some functions. A global search and replace should do it for you. When the source is compiled with a lower optimisation it might not fit in the available flash and in that case you will have to reduce the amount of flash allocated to the BASIC program. You do this by adjusting the value assigned to PROG_FLASH_SIZE which is defined in Flash.h Geoff Geoff Graham - http://geoffg.net |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3659 |
You might be able to use gcc and even keep the attributes. Not having the (MMBasic) source I've not tried it. John |
||||
JohnL Senior Member Joined: 10/01/2014 Location: SeychellesPosts: 128 |
As I understand GCC MIPS does not compile for PIC32, has issues. I know of another open source controller/language platform that are not supporting PIC32 because they can't compile with GCC and they don't want to use crappy and costly microchip compiler with optimization. |
||||
Chris Roper Senior Member Joined: 19/05/2015 Location: South AfricaPosts: 280 |
You can use GCC for the PIC32/MIPS, that is what ChipKit uses. Take a look at this: A guide to build GCC for MIPS / PIC32 I have not personally tried it yet but his step by step guide to getting it up and running on Windows, Mac and Linux platforms looks very comprehensive and even covers linker scripts etc. A very good read even if you don't actually intend to build your own tool chain. Cheers Chris http://caroper.blogspot.com/ |
||||
JohnL Senior Member Joined: 10/01/2014 Location: SeychellesPosts: 128 |
A guide to build GCC for MIPS / PIC32 I can't open that link Chris. Have found reference to that site elsewhere but still can't open it. Do you know if it is still alive? I would definitely be interested in a working GCC compiler setup for PIC32. Apparently the original GCC for MIPS didn't have the startup code and headers for hardware peripherals for PIC32 and possibly some other issues. Thanks John |
||||
Chris Roper Senior Member Joined: 19/05/2015 Location: South AfricaPosts: 280 |
I did try it and it opened for me, try this one instead: http://wise-ware.org/wiki/ I also edited the post above to make them both the same. He used NewLib which is an open source version of the Microchip Libraries. Basically the same Libraries that ChipKit uses. Getting it all integrated into an IDE would be the next step but so far I am still frying my brain with his excellent description of the cryptic linker script format. I wish I had read this befor I built my first PIC32 Bootloader and OTA Uploader, it would have saved me hours. http://caroper.blogspot.com/ |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3659 |
Some more ideas on supporting PIC32 from C: 1. RetroBSD etc 2. Pinguino project 3. Brian Schmalz / maybe AN Other (sorry, it's a long time since I made notes) - I recall a tutorial about patching gcc (the point being that Microchip use gcc to make xc32 etc so MUST by laws release their changes - the hassle being putting it together again I gather) edit: I think it was Phil Burgess's www.paintyourdragon.com/uc/ Thanks for that wiki, new one for me. John |
||||
JohnL Senior Member Joined: 10/01/2014 Location: SeychellesPosts: 128 |
http://www.microchip.com/forums/m789980.aspx Discussion on microchip forum. If example in post #19 (XC8 version) has any truth then it is outrageous what microchip is/was doing. Their expensive full version optimized compiler may have nothing more than omitting the crippling stuffing code that is deliberately inserted in the free version ?? If anyone has full XC32 compiler, may be worth having a look at some disassembled code to compare non optimized and optimized. |
||||
Print this page |