Hi Ytai, I am using MPLAB-X IDE v2.20 and Lite version of C30-3.30b compiler. I have a IOIO OTG board which is having PIC24FJ256GB206 MCU. I have not changed any code as of now.
I have compiled the Bootloader for SPRK0020 configuration. Then I have added the Bootloader HEX file in the loadables section of the AppLayerV1 project and built it for IOIO0030. Now I have a "app_layer_v1.production.unified.hex" file which is of size 391KB and want to flash it to the IOIO OTG board using a PICKit and debug the code for my understanding. Individually compiled the "app_layer_v1.production.hex" is 323KB and "bootloader.production.hex" is 89KB. The Program Memory of PIC24FJ256GB206 is only 256KB, so how will I fit this binary on to the chip? Please help! On Friday, December 16, 2011 1:52:58 PM UTC+5:30, Ytai wrote: > > First, a disclaimer: *this is not intended for most users!* This is only > for people that want to change the standard behavior of IOIO and come up > with custom firmware. > > A few people have asked on this topic lately, thought I'll make it clearer. > > First, get MPLAB X (Beta 7.12) and C30 compiler (V3.30c). > Open the following projects in MPLAB: > > - All the library projects, under firmware/lib* > - firmware/app_layer_v1 > - firmware/bootloader if you also want to build the bootloader > > MPLAB will complain about not having selected a toolchain. Go to each > project properties on every configuration (sucks, I know...) and select > your C30 V3.30c installation. > At this point, MPLAB generated a set of makefiles that you can use in > command line. > To build everything from command line, run > tools/make-all all > To clean-build, run > tools/make-all clobber all > If you don't care about any of the targets, get rid of them. Simply edit > tools/make-all, it is pretty straightforward. > Note that the makefiles don't have an explicit dependency between the app > and the libraries, so if you change any library you need to explicitly > clean-build the app. If anyone knows how to declare the app project so that > it'll depend on the library let me know please. > > If you want to build from within MPLAB, you have two problems: > > 1. Because MPLAB doesn't know that app depends on the libraries, you > need to manually build the libraries *before* building the app. All > the errors in the style of "ld.exe: cannot find -lconn" or -lusb or > -ladb or -lbtstack are a result of the same thing: the linker looks for a > libraries that do not exist, because you haven't built them yet. > 2. The app builds OK (I hope), but then MPLAB tries to load it and > hangs while doing so. It is a bug confirmed by Microchip which is supposed > to be fixed on the next MPLAB release. Note that this is specific to > building coff files, so one might think that moving to elf will fix it. > Alas, there is a different bug in the C30 compiler, which is specific to > elf, and will prevent the code from compiling [sigh] > > Once everything is built, a few tools worth knowing: > If you built for the application and the bootloader and want to merge them > into a single hex file, tools/merge-hex is your friend. Example usage: > tools/merge-hex path/to/bootloader.hex path/to/app.hex > > path/to/merged/output.hex > > If you want to use IOIO Manager to install your app, > tools/make-ioio-bundle is your friend. Example usage: > tools/make-ioio-bundle firmware/app_layer_v1/dist MyOutputBundle.ioioapp > IOIO0022 IOIO0023 > will build app_layer_v1 (the standard app) for platforms IOIO0022 and > IOIO0023 (which are V1.5 and V1.6 boards, running Bootloader V3.x) and > package them in a file called MyOutputBundle.ioioapp > You can do the exact same with bootloader images, simply name the output > file .ioioimg > > Note that you'll have to build the hex2ioio tool before anything works, by > running: > make -C tools/hex2ioio > > To those of you using Windows, get Cygwin and install make and gcc (and a > bunch of other stuff to make you regret that you haven't been using Linux > in the first place :D ). > -- You received this message because you are subscribed to the Google Groups "ioio-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/ioio-users. For more options, visit https://groups.google.com/d/optout.
