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 : Compiling Maximite Firmware Source Code.
Author | Message | ||||
Jimbo Newbie Joined: 20/06/2011 Location: AustraliaPosts: 8 |
Hi, Has anyone else tried to recompile the Maximite Firmware Source code and had a problem ? I have downloaded the source code from the Web Page, and am trying to compile with MPLAB version 8.70, and MPLAB C32 Lite Version 1.12. I have tried all versions from V2.2 to V2.4, however I receive compile errors concerning the following two functions. /* BSD library functions */ int strcasecmp (const char *s1, const char *s2) and int strncasecmp (const char *s1, const char *s2, size_t n) I notice that these functions are not included in the MPLAB C32 pic32-libs\string.h file, but are infact defined in the pic32-libs\lega-c\string.h file. So ultimately my build fails with a unresolved reference for these functions. I have overcome the problem, by adding my own implementation for these two functions to the source code, but thought there might be an easier way. Compiler option or something to use these lega-c paths and libs instead. Any suggestions or comments would be appreciated. Regards Jimbo. |
||||
haiqu Senior Member Joined: 30/07/2011 Location: AustraliaPosts: 152 |
Hi Jimbo, From Source\Readme.txt: "You should install Microchip MPLAB IDE V8.56 or later and Microchip C32 C Compiler V1.11B Student (or Lite) version. Note that the source does not seem to compile with a later version of the C32 Compiler (this will be investigated when time permits). In the meantime you can find V1.11B at the following location: http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_P AGE&nodeId=1406&dDocName=en023073 " Cheers M8, Rob unzip, strip, touch, finger, grep, mount, fsck, more, yes, fsck, fsck, fsck, umount, sleep |
||||
seco61 Senior Member Joined: 15/06/2011 Location: AustraliaPosts: 205 |
Hi Jimbo, As mentioned above, the source currently will only compile with v1.11. There were some significant changes in v1.12 (see the microchip release notes) and the Maximite source needs to be slightly re-worked to accomodate the changes. regards Gerard (vk3cg/vk3grs) Regards Gerard (vk3cg/vk3grs) |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
Very good job Jimbo, we can have your workaround? Vasi Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
Jimbo Newbie Joined: 20/06/2011 Location: AustraliaPosts: 8 |
To Compile with C32 Lite Version 1.12 I added the missing functions myself. Just add the BSDFunctions.c to the project (Source) directort, and include the BSDFunctions.h file to stop the warnings. I have been compiling with Version 1.12 this way since the start, and it seems to work ok. Just thought it shouldn't have been a problem. But now that I know about the differences between 1.11 and 1.12 I supose it's ok. 2011-07-31_195644_BSDFunctions.zip |
||||
wizard Newbie Joined: 29/07/2011 Location: United StatesPosts: 38 |
hi all, I am compiling and loading my pic32 with a totally open toolchain. It consists of openwrt.org for atheros as done by villagetelco.org. With a custom ld file. (One that you can actually read!) My own debugger loaded with xc3sprog modified. I load the pic VIA jtag. Works very well. It would be MOST nice to be able to compile MMbasic with this totally open source tool chain :). I posted a question at to whether anyone else had done this yet and I guess the answer is not yet! May I suggest a few steps: 1. post symbol table / map file for each version of MMbasic along with the hex file to make customization easier. 2. Consider adding to MMbasic source RAM modifiable patch points in the idle loop and one of the constant rate ticks (timer 3?) so my seperately compiled 'drivers' can keep time and get processor as needed. 3. Make a long term plan to allow loading of elf 'kernel' modules into pic32 memory. i.e.- necessary flags and RAM boundary pointers. I have noticed that with my home grown debugger/disassembler I can find places in ROM that need to be patched without too much effort even without a real symbol table/map file so that is very nice. Now to just make it easier. warm regards, Wiz p.s. A review of the 2.5.hex file will reveal that cfg3 1fc02ff0 is NOT being set according to microchip docs!! Also, there is a jump at 1d004380 or so to the middle of no where? So unless Microchip tools are doing some editing, their tool chain seems to have some problems? Is there a 'regular' e-mail way to post to this list? This on-line editor is NOT fun to use! |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
Thank you very much Jimbo! Vasi Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
Hi WIzard, [quote]It would be MOST nice to be able to compile MMbasic with this totally open source tool chain :). [/quote] What you mean? You didn't succeeded? If you did, why not helping in this area? With your toolchain, you can get a smaller size of the compiled project? What are the benefits apart from having a non-restricted compiler? Vasi P.S. You are using Google Chrome or Chromium? The "bad" formatting of your post it may be from there.... Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
wizard Newbie Joined: 29/07/2011 Location: United StatesPosts: 38 |
Hi Vasi, I haven't given compilation with openwrt tool chain a real try yet. But previous attempts got stuck in the include mess :(. And I have found that non-manufacturer support tools give MUCH less hassle in the long run. So I usually take the rugged road. Any chance of getting a symbol table/ map file for 2.5 posted? warm regards, Wiz |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
Hi Wizard, Here is another alternative to the Microchip C32 compiler. Is named Pinguino32X, it don't have restrictions (full optimization is available), is compiled from the free sources of C32 compiler and as library, the team ported newlib. They also are working to port Arduino library entirely (the team is years ahead of Mpide team which try to do the same and have Microchip technicians support). I think Pinguino32X is a great alternative. But of course, you can't just compile the Maximite sources, needs some configurations regarding to "include/lib" paths. Vasi P.S. they use a newer version of gcc than the one used by the Mpide team. Here is the linux version and a Mac OS X one is planned. Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
wizard Newbie Joined: 29/07/2011 Location: United StatesPosts: 38 |
Hi Vasi, Interesting site. Thanks. I just started to try to compile with my working tool chain. Lots of headers missing or not in build chain. I guess at this point a symbol table/map file would be of help, but so far not in evidence? I gather that compiling with Microchip's tools takes the right version, etc. Sounds like could be quite an effort to get it working. Maybe I can patch 2.5.hex to get it working here? Right now keyboard doesn't work correctly. Seems to be a timing issue since a slower keyboard with the bits coming out slower works a little better? My chip is somewhat old, so this may also be an issue. Wiz |
||||
Print this page |