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 : Building ColourMM in MBLAB X IDE v2.0
Author | Message | ||||
TinkersALot Regular Member Joined: 20/11/2012 Location: United StatesPosts: 72 |
While I am waiting for some gear to arrive for the micromite beta, I thought I would mess around with compiling maximite code. I let the IDE convert the project to see if it would build (not any expert at microchip tools). As luck would have it I am getting a linker error (using the x32 compiler). make[1]: Leaving directory `C:/Users/swartz/__MJS_Projects/Maximite/4.3/Maximite/MPLAB/ _converted_ColourMM.X' c:/program files (x86)/microchip/xc32/v1.31/bin/../lib/gcc/pic32mx/4.5.2/../. ./../../pic32mx/bin/ld.exe: Link Error: attributes for input section '.bss._excep_peek' conflict with output section '.bss' collect2: ld returned 1 exit status make[2]: *** [dist/default/production/_converted_ColourMM.X.production.hex] Error 1 make[1]: *** [.build-conf] Error 2 make: *** [.build-impl] Error 2 BUILD FAILED (exit value 2, total time: 1s) From the online help I can find, it is some kind of memory segment overlay ? gone awry .... does anyone have any notions what this means or how I might try to fix this? |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
I have not yet converted the source to MPLAB X so you are on your own. Why not just build it under MPLAB? Geoff Geoff Graham - http://geoffg.net |
||||
TinkersALot Regular Member Joined: 20/11/2012 Location: United StatesPosts: 72 |
I can try that next -- just fetched what was latest from their site. Proving once again that: it is never easy |
||||
TinkersALot Regular Member Joined: 20/11/2012 Location: United StatesPosts: 72 |
alright -- downloaded older version tools from their archives. the build worked, but "something was turned on" that only has 60 days to live |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
He he, make your plans carefully, compile all bootloaders you need, for all microcontrollers you have or plan to buy, and after 60 days, God help us ... not to migrate! ____ Well, according to some Microchip people, we have to wait a little as there are some open-source stacks underway (USB, TCP/IP, etc.) and we will have a complete solution. Then, maybe Geoff will port the project - hopefully, the compiler performance will be comparable to the commercial one. Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3805 |
60 days time limit for GPL C compiler (gcc) sounds to break GPL. Anyone know how Microchip claim to get away with that? GPL is simple: if you use it you abide by it. That's the law. So, how do Microchip get away with this? Tempting to move to the real gcc... No time limit on same mips-version gcc in Pinguino project. John |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
Hi Geoff, Some sort of good news... The last version of MMBasic (sources) I have from you is 3.0A. I succeeded compiling it (UBW32 variant) with pic32-tools (the compiler from MPIDE + MPLAB-X) after: - manually including libm.a library (the linker complained about those math functions like atan, etc.); - manually including the path to "include" folder (I have the compiler installed in C:\pic32-tools); - setting optimization to -Os level (size optimization - it does not fit without). The bad news is that I can't test it, as I have chipkit max32 board (it have a serial bootloader supported by avrdude), unsupported by you Vasi Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3805 |
If you have a PICkit3 (or 2, I think) you can just overwrite that bootloader. Its hex is available, so you can just reflash it if you wish. John |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
I still need to make a shield for the USB connection but my last USB connector was used in this project. No approvals from my General for extra funds for awhile so I'm stuck for now. A linker script from Geoff and serial console "redirected" for the board specific would help using the board at maximum capacity (Pic32Lua have the required support). Anyway, no problems if that is not possible (I tried before but the board didn't got support). I will replace the bootloader with the first occasion. And, all things I tried can be done by anyone having the required board so, really no problems here. Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3805 |
It's a PIC32MX795F512L and has no true USB connector to it? Whatever were they "thinking"? John |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
In many cases, a serial connection is better than USB (is better to let other microcontrollers to deal with USB connection and his requirements). Anyway, they wanted 100% compatibility with the Arduino IDE. BTW, I think the MPIDE compiler does not support MIPS16 code generation (don't know if Geoff use this for full Maximite MMBasic but for some compilers this is a vital requirement - even MPIDE community needs a commercial compiler for their bootloaders). As Micromite requires MPIS16, there is no open-source solution for it. There is no problem in importing the project in MPLAB-X if you continue to use the old C32 compiler Geoff use (there are differences between MPLAB C32 compiler and XC32 compiler - at least, different gcc versions). Now, the compiler from Pinguino project can support MIPS16 if you apply a patch, but no PLIB support. See this comment from their forum: [quote]The Bootloader occupys 16kbyte on the flash so you could only use about 12kbyte. You can shrink code size as follows: 1. Apply Update-EasyPack http://forum.pinguino.cc/showthread.php?tid=3836&highlight=p ack and enable MIPS16 option in Makefile.wn32. 2. In Makefile.win32 , change line 90 (change "-O3" to "-Os") from: ELF_FLAGS = -EL -O3 ...... to: ELF_FLAGS = -EL -Os ......[/quote] It may be the solution for the future, if Geoff can live without PLIB... or, if the same patch can be adapted to MPIDE compiler. Anyway, my investigations regarding a free compiler for Maximite/Micromite ends here. If this path is what Geoff desire, I'm sure he will find a solution. ____ One last observation. The Microchip came with a full open-source compiler with no restrictions regarding to optimizations ... well that is what everybody thought at the beginning. Digging inside, you can see that things are very different. As long as there are differences between Microchip compilers, then there are different measurement units. So, you can't compare it with what AVR/ARM community have. Not yet, not with actual Microchip management team. Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3805 |
Open source gcc supports -mips16 I think you'll find. John |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
If you are referring to the one from Pinguino project, there is still some work to do. _____ Edit: AFAIK, the MPIDE libraries are not MIPS16 compiled. You will get errors if you try to compile with that option. Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3805 |
Not on gcc as far as I can see. The project could use -mips16 if it chose to but hasn't done. Should work fine for 'mites if needed. Don't know if Geoff uses mips16. Personally I don't need -Os or -mips16 John |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
MPLAB C32 can be uninstalled and installed again after expiring the 60-day PRO trial. With MPLAB XC32 that is not possible anymore. The solution is to remain in the gray zone and use C32 v2.02 ... for the benefit of both parties and as Microchip quietly "advices" us. After all, this is not such a big discomfort for the one who needs to recompile the Maximite/uMite firmware, right? Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3194 |
I use MIPS16 in the Micromite but not the Maximite/Duinomite family. Geoff Geoff Graham - http://geoffg.net |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3805 |
Or install xc32 in a virtual machine. Fresh VM and it'll have to give you another 60 days. Yuck! John |
||||
TinkersALot Regular Member Joined: 20/11/2012 Location: United StatesPosts: 72 |
Not sure of all the side effects of this project level edit -- but this seems to make the linker happy: (extra linker arguments related to the persistent variables in the program) --unique=.bss._excep_peek,--unique=.bss._excep_code,--unique =.bss._excep_addr |
||||
TinkersALot Regular Member Joined: 20/11/2012 Location: United StatesPosts: 72 |
interesting...is it possible that there is a bug in MPLABX? The tool creates a command file from the project and it refers to the linker script like this: --script=..\..\LinkScripts\UBW32.ld which then generates this error during the build: ld.exe: cannot open linker script file ....LinkScriptsUBW32.ld: No such file or directory Notice the distinct lack of back slashes in the error above However, if I hand edit the path to be like this: --script=../../LinkScripts/UBW32.ld The error is gone from the build. This seems like too rookie of an error to be in a released professional tool from a big time company -- so what is going on here? |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3805 |
It's not a professional tool from a big time company. They may know silicon. If they do then that's what they should get on with instead of diverting to make a mess of software. John |
||||
Print this page |