On Fri, Jan 10, 2014 at 3:43 PM, Johny Johansen <[email protected]> wrote:
> Hi Ytai, > > got one step further, so the program now runs. The checkout from the > App-IOIO0400 > tag gave me the same problem, but checking out from trunk after your 1273 > commit, > This number doesn't tell me anything. I'm using Git. You should too :) (not really, but hey...) > I got the bootloader working with the original app from the board. By > examining the difference between the working and non-working hexfiles, I > found that programming address 54E20 with the value 3C instead of > unprogrammed, got everything working, haven't checked yet what it is, maybe > USB clock calibration value. > It is very likely that that's what it is. The strange thing is that it should have given you the fast-blink, reminding you to connect the IOIO to a host initially for this procedure. > > But I have one big issue left, I am not able to debug using the Pickit 3. > I can use it for small programs like the blinker, but if I try starting the > bootloader, it fails during the chip programming (I know the trick, and > have to use it, moving the highlight from the Pickit 3 serial number to the > Pickit3 in the project properties !!!). If I use the 3 "Descrete Debugger > Operation" steps instead of just "debug project", all three are successful, > but there is no symbolic info/linenumbers loaded. Single stepping goes from > address 0->2->0->2 endlessly. Clicking the "set PC at cursor" does not > change the PC. > > I suspect it has something to do with the protection mechanism you have > made for avoiding overwriting the bootloader via IOIODude/IOIOManager. > > So if you have any advice or hints to get debugging functioning, it will > be greatly appreciated. I will probably end up having only the app, not the > bootloader in the final program, but I am not that far yet. > Yes, debugging is possible (although in many cases not very useful). You should disable code protection in the bootloader (change WPDIS_WPEN to WPDIS_WPDIS in device_bootloader/main.c). Then, add the device bootloader project as a "Loadable" in the app_layer_v1 project. When you compile the app, it will merge the bootloader hex with the app hex and load the symbols from both when debugging. > > Best regards, > Johny > > Den tirsdag den 7. januar 2014 02.08.56 UTC+1 skrev Ytai: >> >> Your build process is correct, this is what I meant. Personally, I >> normally just build all the libraries in all the configurations (there's an >> option in the "Run" menu for batch build) and not have to worry about it, >> or otherwise use tools/make-all to do that from command line. A later >> version of make-all, which I haven't yet pushed even auto-generated the >> makefiles from the project files, but otherwise you just need to build once >> from MPLAB to get them generated. >> >> Anyway, if you're getting different hex files than I did, the options are: >> >> - You're building from different sources. I propose you sync against >> github and use the tagged versions. For example, I built V4.00 of the >> firmware from the App-IOIO0400 tag, etc. By "sources" I also mean the >> project configurations, etc. >> - Your compiler is different in some way, for example, you're using a >> version that has optimizations disabled or something. >> >> >> >> On Mon, Jan 6, 2014 at 10:30 AM, Johny Johansen <[email protected]>wrote: >> >>> Hi Ytai, >>> >>> thanks for the quick reply, and thanks for the great IOIO, have been >>> flying with this a couple of years in my glider. >>> >>> Your suggestion is actually how I started, but it would not link. >>> >>> I have the sources in SVN, so just made a fresh checkout with the >>> original sources, and compiled all libraries without problems. But when >>> building device_bootloader, I get: >>> c:\programmer\microchip\mplab c30\bin\bin\..\bin/pic30-coff-ld.exe: >>> cannot find -lusb >>> >>> The linker command has the following: >>> -l"usb",-L"../libusb/dist/PIC24FJ256GB206_CDC/production" >>> >>> but when examining the libusb project, its active configuration >>> is PIC24FJ128DA106 >>> So I don't see how I can build without changing this MPLAB project >>> setting. >>> >>> Just to be sure, I downloaded the ioio-master.zip file once more, same >>> result. >>> >>> Then tried setting the libusb active conf. to PIC24FJ256GB206_CDC, and >>> rebuilding libusb and device_bootloader. Now it links OK. >>> >>> For the following projects, I also had to change the active >>> configurations like this: >>> AppLayerV1: IOIO0030 >>> libconn, libbtstack and libadb: PIC24FJ256GB206 >>> >>> Recompiling these 3 libs and the AppLayerV1 now results in: >>> c:\programmer\microchip\mplab c30\bin\bin\..\bin/pic30-coff-ld.exe: >>> cannot find -lusb >>> >>> Having this in the linker command: >>> -L"../libusb/dist/PIC24FJ256GB206_OTG/production" >>> >>> So it seems the bootloader and app requires two different libusb configs. >>> Is this correct? >>> >>> So changed the libusb conf. now to PIC24FJ256GB206_OTG, and rebuild >>> libusb and AppLayerV1, which now succeeds. >>> >>> The sad thing: When comparing the two hexfiles produced this way, with >>> the ones I have build previously, they are identical. >>> >>> Is it the starting point that is wrong, downloading the ioio-master.zip >>> from the https://github.com/ytai/ioio >>> ? >>> >>> Sorry for the long mail. >>> >>> Regards, Johny >>> >>>> >>>> -- >>> 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/groups/opt_out. >>> >> >> -- > 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/groups/opt_out. > -- 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/groups/opt_out.
