(ADVANCED) Building the IOIO firmware

3,744 vistas
Ir al primer mensaje no leído

Ytai Ben-Tsvi

no leída,
16 dic 2011, 3:22:58 a.m.16/12/11
para ioio-...@googlegroups.com
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 ).

Gatzo

no leída,
5 abr 2012, 4:47:32 a.m.5/4/12
para ioio-...@googlegroups.com
Hi,
First, nice work with your IOIO board.

Then, I modified the firmware and I would like to download it in an IOIO board. Unfortunately, my ICD2 don't recognized the PIC, so I tried to download the new firmware with an another IOIO board.
Unfortunately, when I execute the command
   tools/make-ioio-bundle firmware/app_layer_v1/dist MyOutputBundle.ioioapp IOIO0022 IOIO0023
the terminal show IOIO022, the nothing, it's stay stuck at this point.

Did I missed something ?

Thanks

Ytai Ben-Tsvi

no leída,
5 abr 2012, 11:02:58 a.m.5/4/12
para ioio-...@googlegroups.com

Have you built hex2ioio?

--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/uNiNFdHfyaIJ.
To post to this group, send email to ioio-...@googlegroups.com.
To unsubscribe from this group, send email to ioio-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ioio-users?hl=en.

Gatzo

no leída,
6 abr 2012, 7:46:02 a.m.6/4/12
para ioio-...@googlegroups.com
Yes I built the hex2ioio with make -C tools/hex2ioio command.

PS : I tried on windows whith cygwin and on a virtual machine with ubuntu

Ytai Ben-Tsvi

no leída,
6 abr 2012, 8:28:09 a.m.6/4/12
para ioio-...@googlegroups.com

Oh, do you have both images built? Are they in the right path?

Gatzo

no leída,
6 abr 2012, 8:49:11 a.m.6/4/12
para ioio-...@googlegroups.com

Yes, for both configuration, I had the hex2ioio.exe created in the same folder than the hex2ioio and the Makefile.


Ytai Ben-Tsvi

no leída,
6 abr 2012, 9:16:47 a.m.6/4/12
para ioio-...@googlegroups.com

Can you make sure the hex files are where the script wants them?
You may want to try to run individual commands of the script manually, so you see where it gets stuck.

On Apr 6, 2012 5:49 AM, "Gatzo" <gattuso...@gmail.com> wrote:

Yes, for both configuration, I had the hex2ioio.exe created in the same folder than the hex2ioio and the Makefile.


--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/wZzdxJqMoHoJ.

Gatzo

no leída,
6 abr 2012, 9:52:10 a.m.6/4/12
para ioio-...@googlegroups.com
Maybe it's the problem
If I type

tools/make-ioio-bundle hex/ myapp123.ioioapp IOIO0022 IOIO0023

Where the hex file should be ?

(now, there ara in a folder named hex at the same level than the tools folder)


Ytai Ben-Tsvi

no leída,
6 abr 2012, 11:46:33 a.m.6/4/12
para ioio-...@googlegroups.com

You should give the path to firmware;app_layer_v1/dist instead.

--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/p4xOb1vutv8J.

Ytai Ben-Tsvi

no leída,
6 abr 2012, 11:46:42 a.m.6/4/12
para ioio-...@googlegroups.com

/ instead of ; of course ...

On Apr 6, 2012 8:38 AM, wrote:

Dude

no leída,
15 may 2012, 2:00:54 p.m.15/5/12
para ioio-...@googlegroups.com
Great job on IOIO.
 
I'm attempting to use MPLAB X v1.10 with C30 compiler V3.31.  The individual sub projects, such as usb, adb compile fine, but I cannot build the bootloader; I get unresolved references for all the "extern" variable declarations which are all defined in the bootloader project in main.c. 
 
Can you tell me specifically what compiler and platform you're testing on? 
 
I'm building on Windows 7, but will be using Ubuntu in Virtualbox to run the bash scripts in the tools directory for hex merging and whatnot.
 
I'm trying to duplicate the image on the sparkfun IOIO board from source to put it on a custom board with the same schematic as the sparkfun board.
 
Thank you for any help or info you can provide. 
 
Much appreciated.

Ytai Ben-Tsvi

no leída,
15 may 2012, 9:28:34 p.m.15/5/12
para ioio-...@googlegroups.com
I'm using the same setup sometimes. My guess is that you're building the right libraries but in the wrong configurations.
Try tools/make-all if you just want to build everything in all configs.

--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/TXm7J3ofAawJ.

Dude

no leída,
16 may 2012, 12:39:36 a.m.16/5/12
para ioio-...@googlegroups.com
Thank you for your quick reply;
 
I checked the build configurations for all of the supporting libraries for the Bootloader and believe I am using the correct ones (PIC24FJ256DA206-ADB for libusb & PIC24FJ256DA206 for all the rest.)  My Bootloader fails to build due to unresolved extern'ed variable declarations which are defined in main.c of the bootloader project itself. 
 
What do you think I'm doing wrong?
 
Output follows:
-------------------------------------------------------------------------------------------------------------------------------------------------------------

CLEAN SUCCESSFUL (total time: 173ms)
make -f nbproject/Makefile-SPRK0016.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `C:/Users/S. Salvaggio/Documents/ytai-ioio-4c563f6/firmware/bootloader'
make  -f nbproject/Makefile-SPRK0016.mk dist/SPRK0016/production/bootloader.production.hex
make[2]: Entering directory `C:/Users/S. Salvaggio/Documents/ytai-ioio-4c563f6/firmware/bootloader'
"C:\Program Files (x86)\Microchip\mplabc30\v3.31\bin\pic30-gcc.exe" -g -omf=coff -x c -c -mcpu=24FJ256DA206 -fno-short-double -Wall -DBOARD_VER=1016 -DNDEBUG -I. -I.. -I../blapi -I../common -I../libadb -I../microchip/include -I../libusb -mlarge-data -mconst-in-data -Os -MMD -MF build/SPRK0016/production/auth.o.d -o build/SPRK0016/production/auth.o auth.c
"C:\Program Files (x86)\Microchip\mplabc30\v3.31\bin\pic30-gcc.exe" -g -omf=coff -x c -c -mcpu=24FJ256DA206 -fno-short-double -Wall -DBOARD_VER=1016 -DNDEBUG -I. -I.. -I../blapi -I../common -I../libadb -I../microchip/include -I../libusb -mlarge-data -mconst-in-data -Os -MMD -MF build/SPRK0016/production/dumpsys.o.d -o build/SPRK0016/production/dumpsys.o dumpsys.c
"C:\Program Files (x86)\Microchip\mplabc30\v3.31\bin\pic30-gcc.exe" -g -omf=coff -x c -c -mcpu=24FJ256DA206 -fno-short-double -Wall -DBOARD_VER=1016 -DNDEBUG -I. -I.. -I../blapi -I../common -I../libadb -I../microchip/include -I../libusb -mlarge-data -mconst-in-data -Os -MMD -MF build/SPRK0016/production/flash.o.d -o build/SPRK0016/production/flash.o flash.c
"C:\Program Files (x86)\Microchip\mplabc30\v3.31\bin\pic30-gcc.exe" -g -omf=coff -x c -c -mcpu=24FJ256DA206 -fno-short-double -Wall -DBOARD_VER=1016 -DNDEBUG -I. -I.. -I../blapi -I../common -I../libadb -I../microchip/include -I../libusb -mlarge-data -mconst-in-data -Os -MMD -MF build/SPRK0016/production/ioio_file.o.d -o build/SPRK0016/production/ioio_file.o ioio_file.c
"C:\Program Files (x86)\Microchip\mplabc30\v3.31\bin\pic30-gcc.exe" -g -omf=coff -x c -c -mcpu=24FJ256DA206 -fno-short-double -Wall -DBOARD_VER=1016 -DNDEBUG -I. -I.. -I../blapi -I../common -I../libadb -I../microchip/include -I../libusb -mlarge-data -mconst-in-data -Os -MMD -MF build/SPRK0016/production/version.o.d -o build/SPRK0016/production/version.o version.c
"C:\Program Files (x86)\Microchip\mplabc30\v3.31\bin\pic30-gcc.exe" -g -omf=coff -x c -c -mcpu=24FJ256DA206 -fno-short-double -Wall -DBOARD_VER=1016 -DNDEBUG -I. -I.. -I../blapi -I../common -I../libadb -I../microchip/include -I../libusb -mlarge-data -mconst-in-data -Os -MMD -MF build/SPRK0016/production/xml.o.d -o build/SPRK0016/production/xml.o xml.c
"C:\Program Files (x86)\Microchip\mplabc30\v3.31\bin\pic30-gcc.exe" -g -omf=coff -x c -c -mcpu=24FJ256DA206 -fno-short-double -Wall -DBOARD_VER=1016 -DNDEBUG -I. -I.. -I../blapi -I../common -I../libadb -I../microchip/include -I../libusb -mlarge-data -mconst-in-data -Os -MMD -MF build/SPRK0016/production/_ext/1270477542/logging.o.d -o build/SPRK0016/production/_ext/1270477542/logging.o ../common/logging.c
"C:\Program Files (x86)\Microchip\mplabc30\v3.31\bin\pic30-gcc.exe" -g -omf=coff -x c -c -mcpu=24FJ256DA206 -fno-short-double -Wall -DBOARD_VER=1016 -DNDEBUG -I. -I.. -I../blapi -I../common -I../libadb -I../microchip/include -I../libusb -mlarge-data -mconst-in-data -Os -MMD -MF build/SPRK0016/production/_ext/1537399865/uart2.o.d -o build/SPRK0016/production/_ext/1537399865/uart2.o ../microchip/common/uart2.c
bootloader_conn.c: In function 'BootloaderConnInit':
bootloader_conn.c:89: warning: unused variable 'res'
"C:\Program Files (x86)\Microchip\mplabc30\v3.31\bin\pic30-gcc.exe" -g -omf=coff -x c -c -mcpu=24FJ256DA206 -fno-short-double -Wall -DBOARD_VER=1016 -DNDEBUG -I. -I.. -I../blapi -I../common -I../libadb -I../microchip/include -I../libusb -mlarge-data -mconst-in-data -Os -MMD -MF build/SPRK0016/production/bootloader_conn.o.d -o build/SPRK0016/production/bootloader_conn.o bootloader_conn.c
"C:\Program Files (x86)\Microchip\mplabc30\v3.31\bin\pic30-gcc.exe" -g -omf=coff -x c -c -mcpu=24FJ256DA206 -fno-short-double -Wall -DBOARD_VER=1016 -DNDEBUG -I. -I.. -I../blapi -I../common -I../libadb -I../microchip/include -I../libusb -mlarge-data -mconst-in-data -Os -MMD -MF build/SPRK0016/production/main.o.d -o build/SPRK0016/production/main.o main.c
"C:\Program Files (x86)\Microchip\mplabc30\v3.31\bin\pic30-as.exe" usb_int.s -o build/SPRK0016/production/usb_int.o -omf=coff -p=24FJ256DA206 --defsym=__MPLAB_BUILD=1 -g -MD build/SPRK0016/production/usb_int.o.d -I..
"C:\Program Files (x86)\Microchip\mplabc30\v3.31\bin\pic30-gcc.exe"   -omf=coff -mcpu=24FJ256DA206  -o dist/SPRK0016/production/bootloader.production.cof build/SPRK0016/production/auth.o build/SPRK0016/production/dumpsys.o build/SPRK0016/production/flash.o build/SPRK0016/production/ioio_file.o build/SPRK0016/production/version.o build/SPRK0016/production/xml.o build/SPRK0016/production/_ext/1270477542/logging.o build/SPRK0016/production/_ext/1537399865/uart2.o build/SPRK0016/production/bootloader_conn.o build/SPRK0016/production/main.o build/SPRK0016/production/usb_int.o   ..\libusb\dist\PIC24FJ256DA206\production\libusb.a ..\libconn\dist\PIC24FJ256DA206\production\libconn.a ..\libbtstack\dist\PIC24FJ256DA206\production\libbtstack.a ..\libadb\dist\PIC24FJ256DA206\production\libadb.a     -Wl,--defsym=__MPLAB_BUILD=1,--heap=512,--no-handles,--gc-sections,-l"adb",-L"../libadb/dist/PIC24FJ256DA206/production",-L"../libusb/dist/PIC24FJ256DA206/production",-L"../libconn/dist/PIC24FJ256DA206/production",-L"../libbtstack/dist/PIC24FJ256DA206/production",-Map=".map",--report-mem,--script="..\common\dummy.gld",-Tboot_IOIO0023.gld

Program Memory  [Origin = 0x200, Length = 0x4c80]
section                    address   length (PC units)   length (bytes) (dec)
-------                    -------   -----------------   --------------------
.text                        0x200               0x670           0x9a8  (2472)
.const                       0x870               0x640           0x960  (2400)
.text.USBHostTasks           0xeb0               0x9d0           0xeb8  (3768)
.text                       0x1880               0x2ac           0x402  (1026)
.text.ADBTasks              0x1b2c               0x276           0x3b1  (945)
.text._USB_ParseConfigurationDescriptor    0x1da2               0x248           0x36c  (876)
.text                       0x1fea               0x244           0x366  (870)
.text._USB_FindNextToken    0x222e               0x20c           0x312  (786)
.text                       0x243a               0x36c           0x522  (1314)
.dinit                      0x27a6               0x160           0x210  (528)
.text.ADBFileCallback       0x2906               0x132           0x1cb  (459)
.text.ADBPacketTasks        0x2a38               0x108           0x18c  (396)
.text                       0x2b40                0xfc           0x17a  (378)
.text._USB_SetBDT           0x2c3c                0xf2           0x16b  (363)
.text.USBHostIssueDeviceRequest    0x2d2e                0xd6           0x141  (321)
.text.USBHostBluetoothInit    0x2e04                0xbe           0x11d  (285)
.text                       0x2ec2                0xba           0x117  (279)
.text.USBHostBluetoothTasks    0x2f7c                0xb2           0x10b  (267)
.text                       0x302e                0x8e            0xd5  (213)
.text._USB_FindDeviceLevelClientDriver    0x30bc                0x8c            0xd2  (210)
.text._USB_FindClassDriver    0x3148                0x8a            0xcf  (207)
.text._USB_FindServiceEndpoint    0x31d2                0x86            0xc9  (201)
.text                       0x3258                0x76            0xb1  (177)
.text.ADBOpen               0x32ce                0x6c            0xa2  (162)
.text.USBHostRead           0x333a                0x66            0x99  (153)
.text.USBHostWrite          0x33a0                0x66            0x99  (153)
.text.USBHostAndroidInitInterface    0x3406                0x60            0x90  (144)
.text.USBHostAndroidTasks    0x3466                0x60            0x90  (144)
.text.USBHostTransferIsComplete    0x34c6                0x5e            0x8d  (141)
.text._USB_NotifyClients    0x3524                0x5c            0x8a  (138)
.text.USBHostBluetoothCallback    0x3580                0x5a            0x87  (135)
.text._USB_InitRead         0x35da                0x58            0x84  (132)
.text._USB_InitWrite        0x3632                0x58            0x84  (132)
.text._USB_InitControlWrite    0x368a                0x54            0x7e  (126)
.text.ADBFileRead           0x36de                0x54            0x7e  (126)
.text.USBHostBluetoothWrite    0x3732                0x4e            0x75  (117)
.text.ADBFileTasks          0x3780                0x4a            0x6f  (111)
.text._USB_InitControlRead    0x37ca                0x48            0x6c  (108)
.text._USB_FreeConfigMemory    0x3812                0x46            0x69  (105)
.text._USB_SendToken        0x3858                0x3e            0x5d  (93)
.text.ADBPacketSend         0x3896                0x3e            0x5d  (93)
.text._USB_ResetDATA0       0x38d4                0x3a            0x57  (87)
.text.USBHostSetDeviceConfiguration    0x390e                0x3a            0x57  (87)
.text.USBHostAndroidRead    0x3948                0x38            0x54  (84)
.text.USBHostDeviceStatus    0x3980                0x36            0x51  (81)
.text._USB_CheckCommandAndEnumerationAttempts    0x39b6                0x34            0x4e  (78)
.text.USBHostAndroidWrite    0x39ea                0x34            0x4e  (78)
.text.ADBPacketRecvStatus    0x3a1e                0x34            0x4e  (78)
.text._USB_TransferInProgress    0x3a52                0x32            0x4b  (75)
.text._USB_FreeMemory       0x3a84                0x32            0x4b  (75)
.text.USBHostInit           0x3ab6                0x32            0x4b  (75)
.text.USBHostAndroidInitDevice    0x3ae8                0x32            0x4b  (75)
.text._USB_FindEndpoint     0x3b1a                0x30            0x48  (72)
.text.USBHostSetNAKTimeout    0x3b4a                0x30            0x48  (72)
.text.USBHostShutdown       0x3b7a                0x30            0x48  (72)
.text.ADBReset              0x3baa                0x30            0x48  (72)
.text.USBHostBluetoothEventHandler    0x3bda                0x2a            0x3f  (63)
.text.USBHostBluetoothRead    0x3c04                0x2a            0x3f  (63)
.text.hci_transport_mchpusb_instance    0x3c2e                0x2a            0x3f  (63)
.text.USBHostClearEndpointErrors    0x3c58                0x28            0x3c  (60)
.text.USBHostVbusEvent      0x3c80                0x26            0x39  (57)
.text.ADBChecksum           0x3ca6                0x24            0x36  (54)
.text.usb_send_packet       0x3cca                0x22            0x33  (51)
.text.USBHostTerminateTransfer    0x3cec                0x20            0x30  (48)
.text.USBHostAndroidEventHandler    0x3d0c                0x20            0x30  (48)
.text.usb_can_send_packet    0x3d2c                0x20            0x30  (48)
.text.ADBChannelReady       0x3d4c                0x20            0x30  (48)
.text.USBHostResumeDevice    0x3d6c                0x1e            0x2d  (45)
.text.USBHostSuspendDevice    0x3d8a                0x1e            0x2d  (45)
.text.USBHostAndroidRxIsComplete    0x3da8                0x1e            0x2d  (45)
.text.hci_transport_mchpusb_tasks    0x3dc6                0x1e            0x2d  (45)
.text.ADBFileClose          0x3de4                0x1e            0x2d  (45)
.text.USBHostResetDevice    0x3e02                0x1c            0x2a  (42)
.text.USBHostAndroidTxIsComplete    0x3e1e                0x1a            0x27  (39)
.text.ADBBufferUnref        0x3e38                0x18            0x24  (36)
.text.ADBClose              0x3e50                0x16            0x21  (33)
.text.ADBWrite              0x3e66                0x16            0x21  (33)
.text.ADBPacketSendStatus    0x3e7c                0x12            0x1b  (27)
.text.USBHostAndroidReset    0x3e8e                 0xe            0x15  (21)
.text.USBHostBluetoothReset    0x3e9c                 0xe            0x15  (21)
.text.ADBConnected          0x3eaa                 0xe            0x15  (21)
.text.ADBInit               0x3eb8                 0xe            0x15  (21)
.text.ADBFileInit           0x3ec6                 0xe            0x15  (21)
.text.USBHostBluetoothGetDeviceId    0x3ed4                 0xc            0x12  (18)
.text.USBHostDeviceSpecificClientDriver    0x3ee0                 0xa             0xf  (15)
.text.USBHostBluetoothReadBulk    0x3eea                 0xa             0xf  (15)
.text.USBHostBluetoothReadInt    0x3ef4                 0xa             0xf  (15)
.text.USBHostBluetoothWriteBulk    0x3efe                 0xa             0xf  (15)
.text.USBHostBluetoothWriteControl    0x3f08                 0xa             0xf  (15)
.text.ADBBufferRef          0x3f12                 0x8             0xc  (12)
.text.ADBPacketReset        0x3f1a                 0x8             0xc  (12)
.text.ADBAttached           0x3f22                 0x6             0x9  (9)
.text.ADBPacketRecv         0x3f28                 0x6             0x9  (9)
.text.USBHostGetDeviceInfo    0x3f2e                 0x4             0x6  (6)
.text.usb_register_packet_handler    0x3f32                 0x4             0x6  (6)
.text.usb_get_transport_name    0x3f36                 0x4             0x6  (6)
.text.usb_open              0x3f3a                 0x2             0x3  (3)
.text.usb_close             0x3f3c                 0x2             0x3  (3)
                     Total program memory used (bytes):         0x5bdd  (23517) 80%

Data Memory  [Origin = 0x800, Length = 0x17800]
section                    address      alignment gaps    total length  (dec)
-------                    -------      --------------    -------------------
.bss                         0x800                   0          0x13aa  (5034)
.data                       0x1baa                   0            0x38  (56)
.bss                        0x1be2                   0            0x52  (82)
.bss                        0x1c34                   0           0x16c  (364)
.bss                        0x1da0                   0            0x5c  (92)
.bss                        0x1dfc                   0             0x4  (4)
_02ffb2304fb323ea           0x1e00                   0            0x10  (16)
.dconst                     0x1e10                   0            0x66  (102)
.bss                        0x1e76                   0            0x72  (114)
.dconst                     0x1ee8                   0            0x24  (36)
.data                       0x1f0c                   0            0x2a  (42)
.bss                        0x1f36                   0            0x10  (16)
.data                       0x1f46                   0            0x14  (20)
.dconst                     0x1f5a                   0             0x6  (6)
.data                       0x1f60                   0             0x8  (8)
.bss                        0x1f68                   0             0x2  (2)
bootdata                    0x1ffe                   0             0x2  (2)
.heap                       0x2000                   0           0x200  (512)
                        Total data memory used (bytes):         0x196c  (6508) 6%

Dynamic Memory Usage
region                     address                      maximum length  (dec)
------                     -------                      ---------------------
heap                        0x2000                               0x200  (512)
stack                       0x2200                              0x5e00  (24064)
..\libusb\dist\PIC24FJ256DA206\production\libusb.a(usb_host.o)(.text.USBHostTasks+0x786): In function `USBHostTasks':
C:\Users\S. Salvaggio\Documents\ytai-ioio-4c563f6\firmware\libusb\..\microchip\usb\usb_host.c:2371: undefined reference to `accessoryDescs'
                        Maximum dynamic memory (bytes):         0x6000  (24576)
make[2]: Leaving directory `C:/Users/S. Salvaggio/Documents/ytai-ioio-4c563f6/firmware/bootloader'
make[1]: Leaving directory `C:/Users/S. Salvaggio/Documents/ytai-ioio-4c563f6/firmware/bootloader'
make[2]: *** [dist/SPRK0016/production/bootloader.production.hex] Error 255
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 26s)
 
Thanks again for any insight you can provide.
To unsubscribe from this group, send email to ioio-users+unsubscribe@googlegroups.com.
To unsubscribe from this group, send email to ioio-users+unsubscribe@googlegroups.com.

Dude

no leída,
16 may 2012, 12:47:59 a.m.16/5/12
para ioio-...@googlegroups.com
Ah hah!
 
I was linking against the wrong libusb.a file.  I needed to be linking against the ADB version;
 
Sorry about the mistake, and thanks again for your previous post.  It definitely put me on the right path.  Everything builds fine now.

Ytai Ben-Tsvi

no leída,
16 may 2012, 12:48:19 a.m.16/5/12
para ioio-...@googlegroups.com
Seems to me like your MPLABX project got messed up, possibly by attempts you made to fix the problem:

"C:\Program Files (x86)\Microchip\mplabc30\v3.31\bin\pic30-gcc.exe"   -omf=coff -mcpu=24FJ256DA206  -o dist/SPRK0016/production/bootloader.production.cof build/SPRK0016/production/auth.o build/SPRK0016/production/dumpsys.o build/SPRK0016/production/flash.o build/SPRK0016/production/ioio_file.o build/SPRK0016/production/version.o build/SPRK0016/production/xml.o build/SPRK0016/production/_ext/1270477542/logging.o build/SPRK0016/production/_ext/1537399865/uart2.o build/SPRK0016/production/bootloader_conn.o build/SPRK0016/production/main.o build/SPRK0016/production/usb_int.o   ..\libusb\dist\PIC24FJ256DA206\production\libusb.a ..\libconn\dist\PIC24FJ256DA206\production\libconn.a ..\libbtstack\dist\PIC24FJ256DA206\production\libbtstack.a ..\libadb\dist\PIC24FJ256DA206\production\libadb.a     -Wl,--defsym=__MPLAB_BUILD=1,--heap=512,--no-handles,--gc-sections,-l"adb",-L"../libadb/dist/PIC24FJ256DA206/production",-L"../libusb/dist/PIC24FJ256DA206/production",-L"../libconn/dist/PIC24FJ256DA206/production",-L"../libbtstack/dist/PIC24FJ256DA206/production",-Map=".map",--report-mem,--script="..\common\dummy.gld",-Tboot_IOIO0023.gld

libbtstack and libconn are not part of the bootloader. libusb for the bootloader relies on the -ADB configuration.

To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/gt4prpVuE7UJ.

To post to this group, send email to ioio-...@googlegroups.com.
To unsubscribe from this group, send email to ioio-users+...@googlegroups.com.

doomer

no leída,
16 may 2012, 12:20:32 p.m.16/5/12
para ioio-...@googlegroups.com
Hi ! I need make minor changes in  firmware in order to allow IOIO board control RS485  PHY DE/RE#  pin. 
I've downloaded project tree. How can I open each required project in MPLAB in order to build firmware if their 
subdirectories don't contain MPLAB project files. I use MPLAB v 8.3.  
Do I have to create a new project and add all form the specific  subdirectory files to it.
==================================================================

Ytai Ben-Tsvi

no leída,
17 may 2012, 1:38:48 a.m.17/5/12
para ioio-...@googlegroups.com
The code has projects for MPLAB X. Install this as well as the latest C30 compiler. Build the libraries before building the executables (bootloader, app_layer_v1). If you're not sure about which configurations of the libraries you need, build all of them.

--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/8qCLM4VuBG0J.

doomer

no leída,
17 may 2012, 11:50:06 a.m.17/5/12
para ioio-...@googlegroups.com
Hi Ytai ! Thanks for response ! already figure out that sources was for MPLABX. I compiled all libraries and after that build app_layer_v1 and flash it to MCU. But after that IOIO board lost it's functionality and Android doesn't recognize it like USB debugging connect as it was before, and an application doesn't see it. Do I have to flash it within bootloader ?
How should I combine bootloader and App_layer_v1 hex files in order to obtain correct firmware image ?
===============================================================================================================

Ytai Ben-Tsvi

no leída,
17 may 2012, 12:02:51 p.m.17/5/12
para ioio-...@googlegroups.com
tools/merge-hex.
Make sure you use the right versions (most likely bootloader SPRK0016 and app IOIO0023 configs).

To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/llCEDOADSA4J.

doomer

no leída,
30 may 2012, 11:43:36 a.m.30/5/12
para ioio-...@googlegroups.com
Hello Ytai !

I've been trying to modify firmware in order to transmit data over RS485 using UART and IO pin for DE/RE# signal.
I've modified both static void TXInterrupt(int uart_num) handler and void UARTTransmit( int uart_num, const void* data, int size) in file uart.c

static void TXInterrupt(int uart_num){
  volatile UART * reg = uart_reg[uart_num];
  UART_STATE * uart = &uarts[uart_num];
  BYTE_QUEUE * q = &uart->tx_queue;
  while( ByteQueueSize(q)) && !( reg->uxsfa & 0x0200)) {
    SetUTXIF[uart_num](0);
    reg->uxtxreg = ByteQueuePullByte(q);
    ++uart->num_tx_since_last_report;
  }
  Set_UTXIE[uart_num](ByteQueue(q) !=0);
  if( !ByteQueueSize(q)) PinSetLat(5,0);   // clear digital IO 5 ( PORT D, pin 10) when last byte is transmitted
}

void UARTTransmit( int uart_num, const void * data, int size){
  log_printf( "UARTTransmit(%d,%p,%d)"), uart_num, data, size);
  SAVE_UART_FOR_LOG( uart_num);
  BYTE_QUEUE * q = &uarts[uart_num].tx_queue;
  BYTE prev = SyncInterruptLevel(4);
  ByteQueuePushBuffer(q,data,size);
  PinSetLat( 5, 1);   // set digital IO 5 ( PORT D, pin 10) when last byte is transmitted 
  Set_UTXIE[uart_num](1)
  SyncInterruptLevel(prev);
}

  Digital IO pin 5 which is used as DE/RE# line for RS485 driver, and it's properly configured form Android 
application before any packets through UART would have been issued to IOIO board.

Application with changes mentioned above has been compiled and converted to ioio application bundle.
After installation through bootloader, no any activity on digital pin 5 was found during sending packets through UART.
I also tried to use LATD |=(1<<10) and LATD &=~(1<<10) for the same thing but with the same result.

Could you clarify, in what places do I have to insert PinSetLat() call in order to get proper operation of digital IO pin ?

=====================================================================================
Best regards, Vyacheslav
 

On Friday, December 16, 2011 2:22:58 AM UTC-6, Ytai wrote:

Ytai Ben-Tsvi

no leída,
31 may 2012, 12:55:44 a.m.31/5/12
para ioio-...@googlegroups.com
A few problems with your code:
  1. ByteQueue(q) should be  ByteQueueSize(q)  - probably just a typo since I don't think this thing would compile.
  2. You probably forgot to set the pin to output (see SetPinDigitalOut).

--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/YTz1gYCsfasJ.

doomer

no leída,
31 may 2012, 6:58:48 p.m.31/5/12
para ioio-...@googlegroups.com
Yes, it must be  ByteQueueSize(q) , I've mistyped.
I see very interesting situation with modifying application layer firmware and programming it using IOIO Manager on Android tablet.
It looks like Application manager on tablet program out some kind of default image instead of my modified app_layer_v1.
For instance, I added infinite loop to UARTInit() subroutine, which is called in SoftReset, when interrupts are disabled, but after I flashed ioio bundle prepared from such hex using make-ioio-bundle script, I found that it works fine and response to all commands from tablet.

Modyfied UARTInit() looks like:

void UARTInit(){
  int i;
  for( i=0;i<NUM_UART_MODULES;++i){
    UARTConfigInternal( i, 0, 0, 0, 0, 0);
    Set_URXIP[i](4);
    Set_UTXIP[i](4);
  }
  for( ;;){ asm volatile("NOP";)}
}


Any clues ?

Best regards, Vyacheslav.

Ytai Ben-Tsvi

no leída,
31 may 2012, 9:31:43 p.m.31/5/12
para ioio-...@googlegroups.com
There's no default firmware in IOIO Manager. What probably happened is that your firmware didn't program at all and you're just left with the existing one. Possible causes:
  1. Your bundle doesn't contain the correct configuration (you need IOIO0022 if your PIC is PIC24FJ128xxx and IOIO0023 if PIC24FJ256xxx).
  2. You're using IOIO Manager wrong. Your bundle needs to have a .ioioapp suffix and should be added to the main screen of IOIOManager (not the programmer screen). It should then be starred and the IOIO should be power cycled and connected to the Android.
  3. Your Android has something weird that prevents the IOIO from finding the new firmware. There was one case reported when a certain Android phone had a non-standard directory tree, which prevented firmware upgrades.

To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/u0FOn6A8JjkJ.

Ytai Ben-Tsvi

no leída,
13 ago 2012, 11:03:20 a.m.13/8/12
para ioio-...@googlegroups.com

Please join ioio-dev and search there.

On Aug 13, 2012 7:26 AM, "khoon bootrat" <kak...@gmail.com> wrote:
Hi i'am khoon bootrach 
I try build bootloader 
error

c:\program files\microchip\mplab c30\bin\bin\..\bin/pic30-coff-ld.exe: cannot find -ladb
make[2]: Leaving directory `C:/ytaiioio/firmware/bootloader'
make[1]: Leaving directory `C:/ytaiioio/firmware/bootloader'
make[2]: *** [dist/SPRK0016/production/bootloader.production.hex] Error 255
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 5s)

thank you
--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/SMXp74BLjckJ.

JFDionne

no leída,
14 oct 2012, 3:22:08 p.m.14/10/12
para ioio-...@googlegroups.com
Hmm, you are using colormake now? any idea where I can get that on cygwin?

Ytai Ben-Tsvi

no leída,
14 oct 2012, 10:18:06 p.m.14/10/12
para ioio-...@googlegroups.com

I probably mistakenly pushed it to git... Just change it back to make in the script.

--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/_JeAMvDAxEkJ.

Ytai Ben-Tsvi

no leída,
15 oct 2012, 12:34:02 a.m.15/10/12
para ioio-...@googlegroups.com
Done. Sorry about that.

Dan Christian

no leída,
16 oct 2012, 10:12:57 a.m.16/10/12
para ioio-...@googlegroups.com
This is how I patched it to fall back to make and let me override with
an environment variable.
-Dan
makeall.patch

Gopi Natarajan

no leída,
18 jul 2013, 1:12:41 a.m.18/7/13
para ioio-...@googlegroups.com
hi ytai,

i am new to ioio projects and i would like to program my ioio board to communicate with android powered devices. 

i have successfully compiled both the bootloader and application_v1 projects and got both the header files in their locations. i have a small issue that my ioio contains pic24fj256da206 microcontroller which has only flash memory of 256kb. but the code size i obtained from compiling your source code is around 270kb+80kb (application + bootloader hex files). 

is there any way to optimize the code size?

also, i would like to know why are we converting hex files into ioioapps

Ytai Ben-Tsvi

no leída,
18 jul 2013, 1:44:12 a.m.18/7/13
para ioio-...@googlegroups.com
The size of the hex file is not the size of the binary. Which one are you talking about?


--
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 ioio-users+...@googlegroups.com.

To post to this group, send email to ioio-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

iwl

no leída,
21 jul 2013, 11:55:03 a.m.21/7/13
para ioio-...@googlegroups.com
Hi,

I checked out your latest ioio project from git and got it completely compiled with MPLAB X.
I have a V1 BOARD SPRK0016 Bootloader 306 Firmware 326.
BTW the IOIO Hardware Tester only works via ADB with on my Galaxy S 2 Android 4.1.2
while the HeloIOIO App I compiled myself works via OpenAccessory (AndroidDebug/Develop off)
I just removed BlueTooth and ADB support from the Project to get Code and RamSize down to fit
into a PIC24FJ64GB002 (22KWords Flash, 8KWords Ram), FlashSize fits now but Ram is still at
16KWords (24 before) and need to be cut down be another half.
I would like to test if the firmware still works on my Board before further changes.
Question ist what is the Right Configuration for my V1 Board and can I detroy something
choosing a wrong one. There are configurations IOIO0021,22,23,30.
Can I flash the firmware hex without the bootloader?
Do you have some hints what firmware parts use much Ram (large static buffers)
I've read AD samples into buffers, is there one buffer for each pin?

iwl

Ytai Ben-Tsvi

no leída,
22 jul 2013, 8:14:11 p.m.22/7/13
para ioio-...@googlegroups.com
The IOIO002{1,2,3} are for PIC24FJ{128DA106, 128DA206, 256DA206} respectively IIRC. They are all "V1" boards, which '23 being the commercially available one.
IOIO0030 is for the IOIO-OTG.

You can flash the firmware using a programmer. You can mess with the linker scripts to make the application work without the bootloader, but you'll also need to look at a small area where the application is reading some Flash memory to figure out the bootloader and hardware versions as well as move the configuration bits from the bootloader to the app (and modify flash protection).

Most of the RAM is used by USB buffers, UART / I2C / SPI buffers. ADC doesn't use its own buffers.


tiestoss

no leída,
24 jul 2013, 10:19:13 a.m.24/7/13
para ioio-...@googlegroups.com
Do I have to use Hex2ioio even if I am flashing the device using an ICD3 programmer ? or it only to be able to use IOIOManager or IOIODude ?

thank you very much

Ytai Ben-Tsvi

no leída,
25 jul 2013, 2:34:41 a.m.25/7/13
para ioio-...@googlegroups.com
You don't need to use hex2ioio if using a programmer.
Consider using tools/merge-hex if you want to join the bootloader with the app. You can otherwise add the bootloader image to the Loadables section of the app project for the same effect.


--

tiestoss

no leída,
26 jul 2013, 8:10:39 a.m.26/7/13
para ioio-...@googlegroups.com
By image do you mean the Hex ?

thank you very much

Ytai Ben-Tsvi

no leída,
26 jul 2013, 10:58:02 a.m.26/7/13
para ioio-...@googlegroups.com

Yes

iwl

no leída,
29 jul 2013, 7:40:13 p.m.29/7/13
para ioio-...@googlegroups.com

I have descreased the USB-Buffers from 8192 to 2048 Bytes and without ADB, Bluetooth and the lesser UARTS, SPIs, I2Cs (less buffers) of the PIC24FJ64GB002 it now fits into the 8192 Bytes Ram of. I have also smaller Heap of 512 and Stack of 882.
At least it compiles now.
I still have to rework all that Pin to Devices and revers tables and some little modifications for little hardware-differences (only High-Pullups ...)
I think having understood the main things of the firmware and will get it working if the USB-Module is similar because the most complex thing and rework would take longer. The Code is very well written.
I use no linker script now and hope it just runs main then.
Currently work on another ioio project - next weeks.

Se borró el mensaje

Johny Johansen

no leída,
5 ene 2014, 3:47:30 p.m.5/1/14
para ioio-...@googlegroups.com
Hi,

I am not able to get the compiled bootloader and app working.My setup:
IOIO-OTG with PIC24FJ256GB206
MPLAB-X 1.95
C30 v 3.30b

Using the following configurations:
libusb: PIC24FJ256GB206_CDC
DeviceBootLoader: SPRK0020
AppLayerV1: IOIO0030

I have added library dependencies on libusb in as well DeviceBootLoader as AppLayerV1 to get them to compile, and everything compiles (with a few warnings).

But when comparing the generated hex files with what is on the board, or downloaded from https://github.com/ytai/ioio/wiki/Downloads: 4.00 + App V3.30 (recommended for IOIO-OTG)
there are lots of differences. (Even if I program and read them out again to get more easily comparable hex files)

What is worse: If I program the IOIO with the hexfiles I have build, they don't work, I am not called in setup(). If I reinstall the original hex file to the board, it works again.

I am using Pickit3, and I have the problem regardless if I program either the bootloader, the app or both, on top of the working hexfile. Clearing the chip and loading both bootloader and app, also fails.

Reason for compiling is to generate a standalone application that works also if the Android is not connected.
(see attached picture, where IOIO is hiding between the two prints).
IMG_20140105_223343.jpg

Ytai Ben-Tsvi

no leída,
5 ene 2014, 11:13:51 p.m.5/1/14
para ioio-...@googlegroups.com
Try getting back to a clean version of what you got from github (git clean -xdf is your friend, use with caution), then do not make any modifications to the project (such as adding libraries), but rather build the libraries first and then the executable projects.
The reason for this hacky project structure is the MPLAB-X had some bugs related to properly supporting library dependencies. It is possible that those have already been fixed, and if so, I will un-hack this soon.


--

Johny Johansen

no leída,
6 ene 2014, 1:30:39 p.m.6/1/14
para ioio-...@googlegroups.com
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 libadbPIC24FJ256GB206

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

Ytai Ben-Tsvi

no leída,
6 ene 2014, 8:08:56 p.m.6/1/14
para ioio-...@googlegroups.com
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.


Johny Johansen

no leída,
10 ene 2014, 6:43:22 p.m.10/1/14
para ioio-...@googlegroups.com
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, 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.

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.

Best regards,
Johny

Ytai Ben-Tsvi

no leída,
11 ene 2014, 2:28:36 a.m.11/1/14
para ioio-...@googlegroups.com
On Fri, Jan 10, 2014 at 3:43 PM, Johny Johansen <john...@gmail.com> 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.

Johny Johansen

no leída,
11 ene 2014, 7:49:32 a.m.11/1/14
para ioio-...@googlegroups.com
Hi Ytai,


This number doesn't tell me anything. I'm using Git. You should too :) (not really, but hey...)
It was committed Jan 7th. Will probably switch when we do at my work :-)

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.

I got the fast-blink, that's why I guessed on that. But it is a bit cumbersome to connect to anything but the Dell Streak 5, that the hardware is build for.


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.

Thanks a lot, will save me some hours of reading, (I have already combined the two parts as you suggest). I think the debugger will be handy until I get my logging system working. I have wireless logging from the Android to a log server, so I guess, I can make use of the logging you have made, using one of the uarts, forwarding it to the log server.

Thanks again,
Johny

Johny Johansen

no leída,
11 ene 2014, 8:38:46 a.m.11/1/14
para ioio-...@googlegroups.com
Also had to change ICS_PGx2 into ICS_PGx1, to match the hardware, so now it works :-)

Ytai Ben-Tsvi

no leída,
11 ene 2014, 11:51:07 a.m.11/1/14
para ioio-...@googlegroups.com
Glad to hear!
Re logging: you gave me an idea - the logging can be presented to the Android as a fake UART when enabled - instead of wasting two UART peripherals, this will use 0.
Re clock calibration: well, you need some process to do that. Hard-coding one value might be OK during development but will not give you good precision if you're trying to run this same firmware on a different board. Of course, you can either add an a crystal to the board, or otherwise come up with a different calibration process (all that you need really is an external clock provided for a short period during initial setup).


On Sat, Jan 11, 2014 at 5:38 AM, Johny Johansen <john...@gmail.com> wrote:
Also had to change ICS_PGx2 into ICS_PGx1, to match the hardware, so now it works :-)

Johny Johansen

no leída,
11 ene 2014, 3:24:36 p.m.11/1/14
para ioio-...@googlegroups.com


Den lørdag den 11. januar 2014 17.51.07 UTC+1 skrev Ytai:
Glad to hear!
Re logging: you gave me an idea - the logging can be presented to the Android as a fake UART when enabled - instead of wasting two UART peripherals, this will use 0.

Yes, this was the kind of hack I was thinking about, but would waste the UART in my hack. Using a fake UART would certainly be better for people needing all the UARTs. But maybe it would be prettier to add some simple logging API? One thing that is nice to have, is timestamps, but they should be as resource scarce as possible on the target, formatting can be done on the Android, or in my case on the log server. Don't know if there is a counter available in the PIC for something like this, or you have to allocate one.
 
Re clock calibration: well, you need some process to do that. Hard-coding one value might be OK during development but will not give you good precision if you're trying to run this same firmware on a different board. Of course, you can either add an a crystal to the board, or otherwise come up with a different calibration process (all that you need really is an external clock provided for a short period during initial setup).

Well, I had the calibration value present in the hexfile from the board before I changed anything, but anyway, took the hardware apart to attach a USB cable to a PC. It calibrated OK, with the same value already present in the hexfile. Hopefully I am not going to change the IOIO, so I can live with this procedure.

Johny Johansen

no leída,
11 ene 2014, 3:40:19 p.m.11/1/14
para ioio-...@googlegroups.com
Second thought on the timestamping. This is probably quite OK to add on the Android side, will probably have sufficient resolution for most purposes. There will be some jitter of course, but for logging purposes this is probably not a big issue.

Ytai Ben-Tsvi

no leída,
11 ene 2014, 5:17:57 p.m.11/1/14
para ioio-...@googlegroups.com
Well, since logging is a firmware-development-time feature, and since I often need it to function without having the USB working (e.g. when debugging the USB stack itself) I don't think I'll spend any time making this feature too fancy.
Another really handy tool that I'm using for firmware development is a shell environment which presents a console to a host PC. Together with the device bootloader, this is a really awesome framework for developing drivers and other pieces of logic, which can later be integrated into the IOIO firmware as soon as they are complete. I haven't yet gotten permission from the original developer of the shell code to share it, but he's working on making that happen.


On Sat, Jan 11, 2014 at 12:40 PM, Johny Johansen <john...@gmail.com> wrote:
Second thought on the timestamping. This is probably quite OK to add on the Android side, will probably have sufficient resolution for most purposes. There will be some jitter of course, but for logging purposes this is probably not a big issue.

--

Eric Lee

no leída,
31 ene 2014, 1:18:44 a.m.31/1/14
para ioio-...@googlegroups.com
Hi!  Cool board!  I have a home automation application where I need synchronous dimmer control, for which I think I need to modify the firmware.  But I can't find the development environment.  Where do you get MPLAB X 7.12 and the C30 compiler.  They don't seem to be available on Microchip's website anymore.

Thanks for any info,
Eric 

Ytai Ben-Tsvi

no leída,
31 ene 2014, 8:14:31 p.m.31/1/14
para ioio-...@googlegroups.com
Here's where you download MPLAB-X (free):


C30 seems to no longer be available. You can get XC16 and convert the projects from here:

I have no idea why they did that... Pretty annoying.

--

Garry Peterson

no leída,
31 ene 2014, 11:03:14 p.m.31/1/14
para ioio-...@googlegroups.com
Anyone else getting errors like this with XC16?

coff-cc1: error: ../microchip/include: Value too large for defined data type
coff-cc1: fatal error: usb_config.c: Value too large for defined data type
compilation terminated.

Dujana Ahmed

no leída,
1 feb 2014, 10:31:00 a.m.1/2/14
para ioio-...@googlegroups.com
Hy All n yati     Look  what i have done with ioio in 2012 

Garry Peterson

no leída,
2 feb 2014, 1:01:44 p.m.2/2/14
para ioio-...@googlegroups.com
I tried again on a 32-bit CentOS install (was previously using 64-bit) and now it builds fine.

Léopold Arnault

no leída,
25 ago 2014, 7:54:40 p.m.25/8/14
para ioio-...@googlegroups.com
Hello Ytai,

I use MPLAB v1.41 with C30 compiler v3.30C. I selected this compiler in MPLAB in the projects properties, as well as the right build configurations (PIC24FJ256DA206_ADB for libusb and PIC24FJ256DA206 for all the other ones).

I installed Cygwin with make and gcc ("make: The GNU version of the 'make' utility" and "gcc-g++:GNU Compiler Collection") and I downloaded the "ioio-master folder".

When I run  "tools/make-all all", I have this message:


===========================================
libusb
===========================================
tools/make-all: line 15: prjMakefilesGenerator.bat : commande introuvable
WARNING: failed to regenerate Makefiles.
make: Entering directory '/cygdrive/c/Users/critias/ARP/IOIODude/ioio-master/firmware/libusb'
make SUBPROJECTS= CONF=PIC24FJ256DA206_ADB build
make[1]: Entering directory '/cygdrive/c/Users/critias/ARP/IOIODude/ioio-master/firmware/libusb'
make -f nbproject/Makefile-PIC24FJ256DA206_ADB.mk SUBPROJECTS= .build-conf
make[2]: Entering directory '/cygdrive/c/Users/critias/ARP/IOIODude/ioio-master/firmware/libusb'



and it doesn't continue with the other libraries, like if it is "blocked" here.

Did I missed something?

Thanks

Ytai Ben-Tsvi

no leída,
25 ago 2014, 10:15:45 p.m.25/8/14
para ioio-...@googlegroups.com

This batch file that it cannot find is somewhere in the MPLABX install directory. It is possible that your MPLAB version is older than when this feature was introduced so try upgrading.

--
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 ioio-users+...@googlegroups.com.
To post to this group, send email to ioio-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

Léopold Arnault

no leída,
26 ago 2014, 4:15:16 p.m.26/8/14
para ioio-...@googlegroups.com
I installed the most recent version and uninstalled the older one. The prjMakefilesGenerator.bat file is in the MPLABX directory, but it still gives me the same error.
Any idea where it comes from?

Ytai Ben-Tsvi

no leída,
1 sept 2014, 1:16:08 a.m.1/9/14
para ioio-...@googlegroups.com

Make sure the directory where the batch file lives is in your PATH.

On Aug 26, 2014 1:15 PM, "Léopold Arnault" <leopold...@gmail.com> wrote:
I installed the most recent version and uninstalled the older one. The prjMakefilesGenerator.bat file is in the MPLABX directory, but it still gives me the same error.
Any idea where it comes from?

--

Léopold Arnault

no leída,
3 sept 2014, 3:06:26 p.m.3/9/14
para ioio-...@googlegroups.com
Le lundi 1 septembre 2014 01:16:08 UTC-4, Ytai a écrit :

Make sure the directory where the batch file lives is in your PATH.

Thanks for your quick response, I completely forgot to do that, I should have noticed it. Now that this is done, cygwin stays stuck at the same point with this message :


$ tools/make-all clobber all
===========================================
libusb
===========================================
make: Entering directory '/cygdrive/c/Users/critias/ARP/ioio-master/firmware/libusb'
/usr/bin/make SUBPROJECTS= CONF=PIC24FJ256DA206_ADB clean
make[1]: Entering directory '/cygdrive/c/Users/critias/ARP/ioio-master/firmware/libusb'
/usr/bin/make -f nbproject/Makefile-PIC24FJ256DA206_ADB.mk SUBPROJECTS= .clean-conf
make[2]: Entering directory '/cygdrive/c/Users/critias/ARP/ioio-master/firmware/libusb'


Under MPLAB-X, all the libraries, the Bootloader and AppLayerV1 build fine.
I also tried to do the same thing on Linux. As I could not find a version of the C30 compiler on the internet, I installed XC16 compiler (I read on this forum that it should work even if it produces larger code size). After typing the same command, I have these informations:


===========================================
libusb
===========================================
make: entrant dans le répertoire « /home/critias/MPLABXProjects/ioio-master/firmware/libusb »
make SUBPROJECTS= CONF=PIC24FJ256DA206_ADB build
make[1]: entrant dans le répertoire « /home/critias/MPLABXProjects/ioio-master/firmware/libusb »

make -f nbproject/Makefile-PIC24FJ256DA206_ADB.mk SUBPROJECTS= .build-conf
make[2]: entrant dans le répertoire « /home/critias/MPLABXProjects/ioio-master/firmware/libusb »
make  -f nbproject/Makefile-PIC24FJ256DA206_ADB.mk dist/PIC24FJ256DA206_ADB/production/libusb.a
make[3]: Entering directory '/home/critias/MPLABXProjects/ioio-master/firmware/libusb'
"/opt/microchip/xc16/v1.21/bin/xc16-gcc"   usb_config.c  -o build/PIC24FJ256DA206_ADB/production/usb_config.o  -c -mcpu=24FJ256DA206  -MMD -MF "build/PIC24FJ256DA206_ADB/production/usb_config.o.d"      -mno-eds-warn  -g -omf=coff -ffunction-sections -mlarge-data -mconst-in-data -Os -I"." -I"../microchip/include" -I"../microchip/include/USB" -I"../common" -DDISABLE_BLUETOOTH -DDISABLE_ACCESSORY -DCONFIGURE_UNKNOWN_DEVICE -DNDEBUG -DUSB_SUPPORT_HOST -msmart-io=1 -Wall -msfr-warn=off
Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
In file included from ../microchip/include/USB/usb_hal.h:101:0,
                 from ../microchip/include/USB/usb.h:130,
                 from usb_config.c:40:
../microchip/include/USB/usb_hal_pic24.h:288:13: warning: 'packed' attribute ignored for field of type 'BYTE'
"/opt/microchip/xc16/v1.21/bin/xc16-gcc"   ../microchip/usb/usb_host.c  -o build/PIC24FJ256DA206_ADB/production/_ext/455219722/usb_host.o  -c -mcpu=24FJ256DA206  -MMD -MF "build/PIC24FJ256DA206_ADB/production/_ext/455219722/usb_host.o.d"      -mno-eds-warn  -g -omf=coff -ffunction-sections -mlarge-data -mconst-in-data -Os -I"." -I"../microchip/include" -I"../microchip/include/USB" -I"../common" -DDISABLE_BLUETOOTH -DDISABLE_ACCESSORY -DCONFIGURE_UNKNOWN_DEVICE -DNDEBUG -DUSB_SUPPORT_HOST -msmart-io=1 -Wall -msfr-warn=off
Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
In file included from ../microchip/include/USB/usb_hal.h:101:0,
                 from ../microchip/include/USB/usb.h:130,
                 from ../microchip/usb/usb_host.c:73:
../microchip/include/USB/usb_hal_pic24.h:288:13: warning: 'packed' attribute ignored for field of type 'BYTE'
"/opt/microchip/xc16/v1.21/bin/xc16-gcc"   usb_host_android.c  -o build/PIC24FJ256DA206_ADB/production/usb_host_android.o  -c -mcpu=24FJ256DA206  -MMD -MF "build/PIC24FJ256DA206_ADB/production/usb_host_android.o.d"      -mno-eds-warn  -g -omf=coff -ffunction-sections -mlarge-data -mconst-in-data -Os -I"." -I"../microchip/include" -I"../microchip/include/USB" -I"../common" -DDISABLE_BLUETOOTH -DDISABLE_ACCESSORY -DCONFIGURE_UNKNOWN_DEVICE -DNDEBUG -DUSB_SUPPORT_HOST -msmart-io=1 -Wall -msfr-warn=off
Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
In file included from ../microchip/include/USB/usb_hal.h:101:0,
                 from ../microchip/include/USB/usb.h:130,
                 from usb_host_android.c:34:
../microchip/include/USB/usb_hal_pic24.h:288:13: warning: 'packed' attribute ignored for field of type 'BYTE'
"/opt/microchip/xc16/v1.21/bin/xc16-gcc"   usb.c  -o build/PIC24FJ256DA206_ADB/production/usb.o  -c -mcpu=24FJ256DA206  -MMD -MF "build/PIC24FJ256DA206_ADB/production/usb.o.d"      -mno-eds-warn  -g -omf=coff -ffunction-sections -mlarge-data -mconst-in-data -Os -I"." -I"../microchip/include" -I"../microchip/include/USB" -I"../common" -DDISABLE_BLUETOOTH -DDISABLE_ACCESSORY -DCONFIGURE_UNKNOWN_DEVICE -DNDEBUG -DUSB_SUPPORT_HOST -msmart-io=1 -Wall -msfr-warn=off
Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
In file included from ../microchip/include/USB/usb_hal.h:101:0,
                 from ../microchip/include/USB/usb.h:130,
                 from usb.c:30:
../microchip/include/USB/usb_hal_pic24.h:288:13: warning: 'packed' attribute ignored for field of type 'BYTE'
"/opt/microchip/xc16/v1.21/bin/xc16-gcc"   usb_device_dummy.c  -o build/PIC24FJ256DA206_ADB/production/usb_device_dummy.o  -c -mcpu=24FJ256DA206  -MMD -MF "build/PIC24FJ256DA206_ADB/production/usb_device_dummy.o.d"      -mno-eds-warn  -g -omf=coff -ffunction-sections -mlarge-data -mconst-in-data -Os -I"." -I"../microchip/include" -I"../microchip/include/USB" -I"../common" -DDISABLE_BLUETOOTH -DDISABLE_ACCESSORY -DCONFIGURE_UNKNOWN_DEVICE -DNDEBUG -DUSB_SUPPORT_HOST -msmart-io=1 -Wall -msfr-warn=off
Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
In file included from ../microchip/include/USB/usb_hal.h:101:0,
                 from ../microchip/include/USB/usb.h:130,
                 from usb_device_dummy.c:1:
../microchip/include/USB/usb_hal_pic24.h:288:13: warning: 'packed' attribute ignored for field of type 'BYTE'
"/opt/microchip/xc16/v1.21/bin/xc16-ar"   -omf=coff -r dist/PIC24FJ256DA206_ADB/production/libusb.a  build/PIC24FJ256DA206_ADB/production/usb_config.o build/PIC24FJ256DA206_ADB/production/_ext/455219722/usb_host.o build/PIC24FJ256DA206_ADB/production/usb_host_android.o build/PIC24FJ256DA206_ADB/production/usb.o build/PIC24FJ256DA206_ADB/production/usb_device_dummy.o     
make[3]: Leaving directory '/home/critias/MPLABXProjects/ioio-master/firmware/libusb'
make[2]: quittant le répertoire « /home/critias/MPLABXProjects/ioio-master/firmware/libusb »
make[1]: quittant le répertoire « /home/critias/MPLABXProjects/ioio-master/firmware/libusb »
make SUBPROJECTS= CONF=PIC24FJ128DA106 build
make[1]: entrant dans le répertoire « /home/critias/MPLABXProjects/ioio-master/firmware/libusb »
make -f nbproject/Makefile-PIC24FJ128DA106.mk SUBPROJECTS= .build-conf
make[2]: cmd.exe : commande introuvable
make[2]: entrant dans le répertoire « /home/critias/MPLABXProjects/ioio-master/firmware/libusb »
make  -f nbproject/Makefile-PIC24FJ128DA106.mk dist/PIC24FJ128DA106/production/libusb.a
make[2]: cmd.exe : commande introuvable
make[2]: *** [.build-conf] Erreur 127
make[2]: quittant le répertoire « /home/critias/MPLABXProjects/ioio-master/firmware/libusb »
make[1]: *** [.build-impl] Erreur 2
make[1]: quittant le répertoire « /home/critias/MPLABXProjects/ioio-master/firmware/libusb »
make: *** [.all-impl] Erreur 2
make: quittant le répertoire « /home/critias/MPLABXProjects/ioio-master/firmware/libusb »
FAILURE

Do you think it has something to do with "Options have been disabled due to restricted license" ?

By displaying "--debug" informations under cygwin, it says that some files are missing:

 File 'all' does not exist.
   File '.all-post' does not exist.
     File '.all-impl' does not exist.
       File '.all-pre' does not exist.
      Must remake target '.all-pre'.
      Successfully remade target file '.all-pre'.
       File '.depcheck-impl' does not exist.
      Must remake target '.depcheck-impl'.
      Successfully remade target file '.depcheck-impl'.
    Must remake target '.all-impl'.
    ...
Is this really important?

Do you think it can have something to do with my cygwin version or the make version I installed (GNU Make 4.0)?

Ytai Ben-Tsvi

no leída,
3 sept 2014, 3:45:55 p.m.3/9/14
para ioio-...@googlegroups.com
Yes. MPLABX comes with its own make.exe. Make sure it is in your path before the GNU make. I haven't actually looked into the root cause of the problem.


--

Léopold Arnault

no leída,
3 sept 2014, 7:12:09 p.m.3/9/14
para ioio-...@googlegroups.com
Le mercredi 3 septembre 2014 15:45:55 UTC-4, Ytai a écrit :
Yes. MPLABX comes with its own make.exe. Make sure it is in your path before the GNU make. I haven't actually looked into the root cause of the problem.

 I tried what you said and now it builds fine. Thanks a lot! I'm now able to download my own firmware on the IOIO with a USB connection!

What I had to do to make everything work is to add MPLABX\gnuBins\GnuWin32\bin to the path and replace the make.exe in the cygwin\bin directory by the one which is in MPLABX\gnuBins\GnuWin32\bin.

To be able to run "tools/make-ioio-bundle firmware/app_layer_v1/dist MyOutputBundle.ioioapp IOIO0022 IOIO0023", I also had to install the "zip" package (zip:Info-ZIP compressor utility) with cygwin.

Thanks again,

Léopold

RD

no leída,
5 nov 2014, 6:11:41 a.m.5/11/14
para ioio-...@googlegroups.com
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 ).

Ytai Ben-Tsvi

no leída,
5 nov 2014, 11:23:29 p.m.5/11/14
para ioio-...@googlegroups.com
1. You probably shouldn't care about the (v1) bootloader. You want the device bootloader instead for the IOIO-OTG.
2. How are you measuring the size of the image? Is it the hex file size? If so, it is irrelevant.

--

RD

no leída,
6 nov 2014, 1:13:03 a.m.6/11/14
para ioio-...@googlegroups.com
Thanks for your reply.

I want to flash the IOIO-OTG board with a PIC Programmer so that I can step debug the code, so I need the merged HEX file. And the size of this merged HEX file after compiling is more than 300KB.
Why is the size of the HEX file irrelevant? What other options do I have to flash the image? Is there any way to reduce the size?

Ytai Ben-Tsvi

no leída,
8 nov 2014, 12:10:47 a.m.8/11/14
para ioio-...@googlegroups.com
The IOIO-OTG does not normally run this bootloader. There's another project in the firmware directory called DeviceBootloader, which is the one you want to merge in.
The hex file is just a text file containing the ROM data in a very inefficient format, at least twice as large as the image size. The actual size of the ROM image can be seen in the linker output log when compiling.
For debugging, make sure you're connecting to the correct PGD/PGC pair specified in the configuration settings in main.c of the DeviceBootloader, or otherwise change them to match your pins.

RD

no leída,
10 nov 2014, 6:55:02 a.m.10/11/14
para ioio-...@googlegroups.com
I have compiled the "device_bootloader" project and merged it with the "app_layer_v1".
While compiling I got this message on the linker scripts as you said: "Total program memory used (bytes):        0x143e8  (82920) 36%"
But my resulting HEX file (of merged "device_bootloader" & "app_layer_v1") in the IOIO0030\production directory is of 342KB size.

Then I used the script /tools/make-hex-bundle and obtained another HEX file, of size 103KB.

Can you please explain me what is the work of "make-hex-bundle" script?
Does this new HEX file (103KB) and the compiled HEX file (342KB) has same functionality?

Sorry for the silly questions..

Thanks..

Ytai Ben-Tsvi

no leída,
12 nov 2014, 3:53:57 a.m.12/11/14
para ioio-...@googlegroups.com
make-hex-bundle merely zips together multiple hex files, representing the same code version, built for different platforms. It is the tool I'm using to build the hex bundles for distribution (on the Downloads page). You shouldn't typically need to worry about this.
Why are you looking for any additional step after you already have the hex file? Why are you not simply flashing it on the IOIO at this point?

RD

no leída,
25 nov 2014, 8:25:03 a.m.25/11/14
para ioio-...@googlegroups.com
Sorry for the silly questions. I always thought that the size of the HEX file was the size of the image. Thanks for clarifying.

I have successfully flashed the image on to the board and everything is working fine.

Thanks..

vic.wi...@jointheleague.org

no leída,
4 abr 2016, 11:41:31 p.m.4/4/16
para ioio-users
Have you had a chance to fix ioiodude for the Mac yet?  I get the following when trying to flash the chip:
VicMacMini:~ VicMini ls /dev
…….
tty.usbmodem1441

VicMacMini:~ VicMini$ ./ioiodude --port=/dev/tty.usbmodem1441 versions
[Boot] INFO:  setProperties(com.simontuffs.onejar.JarClassLoader@7440e464)
[Boot] INFO:  using JarClassLoader: com.simontuffs.onejar.JarClassLoader
[JarClassLoader] INFO:  findResource() found: "com/sun/jna/darwin/libjnidispatch.jnilib" for caller null in codebase lib/jna-4.0.0.jar
[JarClassLoader] INFO:  findResource() found: "com/sun/jna/darwin/libjnidispatch.jnilib" for caller null in codebase lib/jna-4.0.0.jar

Ytai Ben-Tsvi

no leída,
5 abr 2016, 12:27:54 a.m.5/4/16
para ioio-...@googlegroups.com
Works for me (and others). Try either v1.02 or v1.03. Also, people have gotten different results between bootloader and app mode, which is really strange, and I never got a chance to look into it.
Worst case, try a different machine.

Tinuz77

no leída,
30 jul 2016, 12:02:10 p.m.30/7/16
para ioio-users
Hi Ytai,

Great work on the IOIO. I created a custom firmware for my lasertag project but i get the following error when trying to apply the firmware:


./ioiodude --port=/dev/tty.usbmodem1421 --reset write droidtagv1.ioioapp 

Protocol error:

Unexpected response.

Exiting. 

So no explicit errors. Can you put me back on track and have a probable cause?

Thanks in advance!

Ytai Ben-Tsvi

no leída,
30 jul 2016, 5:19:32 p.m.30/7/16
para ioio-...@googlegroups.com

Does it work with the stock firmware bundles? If so, probably something about your custom bundle being corrupted.


--

kri...@parkzap.com

no leída,
19 ene 2017, 2:49:30 a.m.19/1/17
para ioio-users
Hello Ytai,
I'm attempting to use MPLAB X v3.50 with xc16 compiler V1.30.  The individual sub projects, such as usb, adb, btstack, conn compile fine, but I cannot build the app_layer_v1 it is giving the error:
make -f nbproject/Makefile-IOIO0030.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/parkzap-dev1/Desktop/krishna/ioio-master (1)/ioio-master/firmware/app_layer_v1'
make  -f nbproject/Makefile-IOIO0030.mk dist/IOIO0030/production/app_layer_v1.production.hex
make[2]: Entering directory 'C:/Users/parkzap-dev1/Desktop/krishna/ioio-master (1)/ioio-master/firmware/app_layer_v1'
"C:\Program Files (x86)\Microchip\xc16\v1.30\bin\xc16-gcc.exe"   ../common/byte_queue.c  -o build/IOIO0030/production/_ext/1270477542/byte_queue.o  -c -mcpu=24FJ256DA206  -MMD -MF "build/IOIO0030/production/_ext/1270477542/byte_queue.o.d"      -mno-eds-warn  -g -omf=elf -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc    -fno-short-double -O3 -I"." -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
"C:\Program Files (x86)\Microchip\xc16\v1.30\bin\xc16-gcc.exe"   ../microchip/common/uart2.c  -o build/IOIO0030/production/_ext/1537399865/uart2.o  -c -mcpu=24FJ256DA206  -MMD -MF "build/IOIO0030/production/_ext/1537399865/uart2.o.d"      -mno-eds-warn  -g -omf=elf -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc    -fno-short-double -O3 -I"." -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
"C:\Program Files (x86)\Microchip\xc16\v1.30\bin\xc16-gcc.exe"   adc.c  -o build/IOIO0030/production/adc.o  -c -mcpu=24FJ256DA206  -MMD -MF "build/IOIO0030/production/adc.o.d"      -mno-eds-warn  -g -omf=elf -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc    -fno-short-double -O3 -I"." -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
"C:\Program Files (x86)\Microchip\xc16\v1.30\bin\xc16-gcc.exe"   digital.c  -o build/IOIO0030/production/digital.o  -c -mcpu=24FJ256DA206  -MMD -MF "build/IOIO0030/production/digital.o.d"      -mno-eds-warn  -g -omf=elf -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc    -fno-short-double -O3 -I"." -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
"C:\Program Files (x86)\Microchip\xc16\v1.30\bin\xc16-gcc.exe"   features.c  -o build/IOIO0030/production/features.o  -c -mcpu=24FJ256DA206  -MMD -MF "build/IOIO0030/production/features.o.d"      -mno-eds-warn  -g -omf=elf -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc    -fno-short-double -O3 -I"." -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
"C:\Program Files (x86)\Microchip\xc16\v1.30\bin\xc16-gcc.exe"   ../common/logging.c  -o build/IOIO0030/production/_ext/1270477542/logging.o  -c -mcpu=24FJ256DA206  -MMD -MF "build/IOIO0030/production/_ext/1270477542/logging.o.d"      -mno-eds-warn  -g -omf=elf -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc    -fno-short-double -O3 -I"." -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
"C:\Program Files (x86)\Microchip\xc16\v1.30\bin\xc16-gcc.exe"   i2c.c  -o build/IOIO0030/production/i2c.o  -c -mcpu=24FJ256DA206  -MMD -MF "build/IOIO0030/production/i2c.o.d"      -mno-eds-warn  -g -omf=elf -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc    -fno-short-double -O3 -I"." -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
"C:\Program Files (x86)\Microchip\xc16\v1.30\bin\xc16-gcc.exe"   icsp.c  -o build/IOIO0030/production/icsp.o  -c -mcpu=24FJ256DA206  -MMD -MF "build/IOIO0030/production/icsp.o.d"      -mno-eds-warn  -g -omf=elf -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc    -fno-short-double -O3 -I"." -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99

Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
In file included from i2c.c:36:0:
../common/platform.h:104:6: error: #error Platform and MCU mismatch - expecting PIC24FJ256GB206

Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
In file included from pins.h:33:0,
                 from features.c:35:
../common/platform.h:104:6: error: #error Platform and MCU mismatch - expecting PIC24FJ256GB206

Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
../common/logging.c:33:17: fatal error: PPS.h: No such file or directory
compilation terminated.
nbproject/Makefile-IOIO0030.mk:261: recipe for target 'build/IOIO0030/production/i2c.o' failed
make[2]: *** [build/IOIO0030/production/i2c.o] Error 255
make[2]: *** Waiting for unfinished jobs....

Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
In file included from pins.h:33:0,
                 from adc.c:41:
../common/platform.h:104:6: error: #error Platform and MCU mismatch - expecting PIC24FJ256GB206
nbproject/Makefile-IOIO0030.mk:219: recipe for target 'build/IOIO0030/production/_ext/1270477542/logging.o' failed
make[2]: *** [build/IOIO0030/production/_ext/1270477542/logging.o] Error 255

Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
In file included from pins.h:33:0,
                 from digital.c:33:
../common/platform.h:104:6: error: #error Platform and MCU mismatch - expecting PIC24FJ256GB206
make[2]: *** [build/IOIO0030/production/features.o] Error 255
nbproject/Makefile-IOIO0030.mk:254: recipe for target 'build/IOIO0030/production/features.o' failed
nbproject/Makefile-IOIO0030.mk:240: recipe for target 'build/IOIO0030/production/adc.o' failed
make[2]: *** [build/IOIO0030/production/adc.o] Error 255
nbproject/Makefile-IOIO0030.mk:247: recipe for target 'build/IOIO0030/production/digital.o' failed
make[2]: *** [build/IOIO0030/production/digital.o] Error 255

Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
In file included from pins.h:33:0,
                 from icsp.c:33:
../common/platform.h:104:6: error: #error Platform and MCU mismatch - expecting PIC24FJ256GB206
nbproject/Makefile-IOIO0030.mk:268: recipe for target 'build/IOIO0030/production/icsp.o' failed
make[2]: *** [build/IOIO0030/production/icsp.o] Error 255
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
make[2]: Leaving directory 'C:/Users/parkzap-dev1/Desktop/krishna/ioio-master (1)/ioio-master/firmware/app_layer_v1'
nbproject/Makefile-IOIO0030.mk:84: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/parkzap-dev1/Desktop/krishna/ioio-master (1)/ioio-master/firmware/app_layer_v1'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed

BUILD FAILED (exit value 2, total time: 6s)

I am using window 10 to build.
Initially I was using c30 v3.31 compiler and getting the error to compile lib* sub projects also that's why I switched to xc16 compiler

initially error was:
make -f nbproject/Makefile-PIC24FJ256DA206.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/parkzap-dev1/Desktop/krishna/ioio-master (1)/ioio-master/firmware/libadb'
make  -f nbproject/Makefile-PIC24FJ256DA206.mk dist/PIC24FJ256DA206/production/libadb.a
make[2]: Entering directory 'C:/Users/parkzap-dev1/Desktop/krishna/ioio-master (1)/ioio-master/firmware/libadb'
C:\Users\PARKZA~2\AppData\Local\Temp/ccNiW4mR.s: Assembler messages:
"C:\Program Files (x86)\Microchip\mplabc30\v3.31\bin\pic30-gcc.exe" -g -omf=elf -x c -c -mcpu=24FJ256DA206 -ffunction-sections -Wall -DNDEBUG -DUSB_SUPPORT_HOST -I. -I../common -I../libusb -I../microchip/include -mlarge-data -mconst-in-data -Os -MMD -MF build/PIC24FJ256DA206/production/adb_file.o.d -o build/PIC24FJ256DA206/production/adb_file.o adb_file.c
C:\Users\PARKZA~2\AppData\Local\Temp/ccNiW4mR.s:3318: Error: operation combines symbols in different segments
"C:\Program Files (x86)\Microchip\mplabc30\v3.31\bin\pic30-gcc.exe" -g -omf=elf -x c -c -mcpu=24FJ256DA206 -ffunction-sections -Wall -DNDEBUG -DUSB_SUPPORT_HOST -I. -I../common -I../libusb -I../microchip/include -mlarge-data -mconst-in-data -Os -MMD -MF build/PIC24FJ256DA206/production/adb.o.d -o build/PIC24FJ256DA206/production/adb.o adb.c
C:\Users\PARKZA~2\AppData\Local\Temp/ccNiW4mR.s:3319: Error: operation combines symbols in different segments
nbproject/Makefile-PIC24FJ256DA206.mk:126: recipe for target 'build/PIC24FJ256DA206/production/adb.o' failed
C:\Users\PARKZA~2\AppData\Local\Temp/ccNiW4mR.s:3320: Error: operation combines symbols in different segments
"C:\Program Files (x86)\Microchip\mplabc30\v3.31\bin\pic30-gcc.exe" -g -omf=elf -x c -c -mcpu=24FJ256DA206 -ffunction-sections -Wall -DNDEBUG -DUSB_SUPPORT_HOST -I. -I../common -I../libusb -I../microchip/include -mlarge-data -mconst-in-data -Os -MMD -MF build/PIC24FJ256DA206/production/adb_packet.o.d -o build/PIC24FJ256DA206/production/adb_packet.o adb_packet.c
C:\Users\PARKZA~2\AppData\Local\Temp/ccNiW4mR.s:3321: Error: operation combines symbols in different segments
make[2]: Leaving directory 'C:/Users/parkzap-dev1/Desktop/krishna/ioio-master (1)/ioio-master/firmware/libadb'
make[2]: *** [build/PIC24FJ256DA206/production/adb.o] Error 1
nbproject/Makefile-PIC24FJ256DA206.mk:84: recipe for target '.build-conf' failed
make[2]: *** Waiting for unfinished jobs....
make[1]: Leaving directory 'C:/Users/parkzap-dev1/Desktop/krishna/ioio-master (1)/ioio-master/firmware/libadb'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 2s)

thank you very much!


Ytai Ben-Tsvi

no leída,
19 ene 2017, 2:53:03 a.m.19/1/17
para ioio-...@googlegroups.com
Your project might have gotten messed up during the experimentation. Can you try building a fresh copy now that you have the right compiler?

--
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 ioio-users+unsubscribe@googlegroups.com.

kri...@parkzap.com

no leída,
21 ene 2017, 6:16:59 a.m.21/1/17
para ioio-users
hello ytai,

can you tell me exact value of Inductor, connected with controller's avdd pin(19).

thanks


kri...@parkzap.com

no leída,
21 ene 2017, 8:25:37 a.m.21/1/17
para ioio-users
hello ytai,

Now, I'm attempting to use MPLAB X v3.50 with c30 compiler V3.31 and non of my project and sub project are compiling. they all are giving same error:


make -f nbproject/Makefile-PIC24FJ256DA206.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/parkzap-dev1/Desktop/ioio/ioio-master/firmware/libadb'
make  -f nbproject/Makefile-PIC24FJ256DA206.mk dist/PIC24FJ256DA206/production/libadb.a
make[2]: Entering directory 'C:/Users/parkzap-dev1/Desktop/ioio/ioio-master/firmware/libadb'
C:\Users\PARKZA~2\AppData\Local\Temp/ccykumPR.s: Assembler messages:
C:\Users\PARKZA~2\AppData\Local\Temp/ccykumPR.s:3318: Error: operation combines symbols in different segments
C:\Users\PARKZA~2\AppData\Local\Temp/ccykumPR.s:3319: Error: operation combines symbols in different segments
C:\Users\PARKZA~2\AppData\Local\Temp/ccykumPR.s:3320: Error: operation combines symbols in different segments
C:\Users\PARKZA~2\AppData\Local\Temp/ccykumPR.s:3321: Error: operation combines symbols in different segments
make[2]: *** [build/PIC24FJ256DA206/production/adb.o] Error 1

make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
"C:\Program Files (x86)\Microchip\mplabc30\v3.31\bin\pic30-gcc.exe" -g -omf=elf -x c -c -mcpu=24FJ256DA206 -ffunction-sections -Wall -DNDEBUG -DUSB_SUPPORT_HOST -I. -I../common -I../libusb -I../microchip/include -mlarge-data -mconst-in-data -Os -MMD -MF build/PIC24FJ256DA206/production/adb.o.d -o build/PIC24FJ256DA206/production/adb.o adb.c
nbproject/Makefile-PIC24FJ256DA206.mk:126: recipe for target 'build/PIC24FJ256DA206/production/adb.o' failed
make[2]: Leaving directory 'C:/Users/parkzap-dev1/Desktop/ioio/ioio-master/firmware/libadb'

nbproject/Makefile-PIC24FJ256DA206.mk:84: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/parkzap-dev1/Desktop/ioio/ioio-master/firmware/libadb'

nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed

BUILD FAILED (exit value 2, total time: 1s)

can you please suggest me what I'm doing wrong.

thanks ytai

kri...@parkzap.com

no leída,
21 ene 2017, 9:03:46 a.m.21/1/17
para ioio-users
I'm asking this question because I'm in doubt that is this really a Inductor ?
if yes then can you please explain me why are you using this because in controller's datasheet there is no explanation of Indutor use.
and what's the exact value (given value in schematic is 300hm, 1.8A)  

Ytai Ben-Tsvi

no leída,
22 ene 2017, 12:23:49 a.m.22/1/17
para ioio-...@googlegroups.com
This is not an inductor but a ferrite bead.
Please build with XC16 using a clean clone. I don't want to waste time troubleshooting a non-standard environment.

Pranay Sharma

no leída,
27 ene 2017, 8:24:26 a.m.27/1/17
para ioio-users
Dear Ytai and all,
Apologies for the long post. But I have marked my questions in GREEN and errors are in RED
We had re-setup our whole environment and tried with fresh code.
It’s now: Linux Mint 64-bit with MPLAB X v3.51 with xc16 compiler v1.30(not the C30 compiler (V3.30c)   --> is this okay?).

  • The commands make-all don't work as I get a “command not found error”-->probably incorrect environment. But is this step still required if we are using MPLAB to build code?
Error: 
===========================================
libusb
===========================================
./make-all: line 17: prjMakefilesGenerator.sh: command not found

WARNING: failed to regenerate Makefiles.
make: *** firmware/libusb: No such file or directory.  Stop.
FAILURE
  • Alternatively we traced the file prjMakefilesGenerator.sh and manually ran the command for the module as:
    • /opt/microchip/mplabx/v3.51/mplab_ide/bin/prjMakefilesGenerator.sh ../firmware/libusb 
    • Output :
      • ERROR: Has EDS, but no <edc:ExtendedDataSpace>
  • Still we used MPLab to build the modules with the following settings:
    • For building the Bootloader
      • libadb device selected: PIC24FJ256GB206.-->build success
      • -libbstack device selected: PIC24FJ256GB206.-->build success
      • -libconn device selected: PIC24FJ256GB206.-->build success
      • -libusb device selected: PIC24FJ256GB206_OTG.-->build success
      • -Bootloader : SPRK0020.-->build NOT successful
    • For building the App_layer_v1
      • -libadb device selected: PIC24FJ256GB206.-->build success
      • -libbstack device selected: PIC24FJ256GB206.-->build success
      • -libconn device selected: PIC24FJ256GB206.-->build success
      • -libusb device selected: PIC24FJ256GB206_OTG_ADB.-->build success
      • -App_layer_v1 : IOIO0030.-->build NOT successful
    • For App_layer_v1: Errors marked in RED, same error was seen for building the boot-loader.

CLEAN SUCCESSFUL (total time: 54ms)
make -f nbproject/Makefile-IOIO0030.mk SUBPROJECTS= .build-conf
make[1]: Entering directory '/home/user/Desktop/park_git/ioio/firmware/app_layer_v1'
make  -f nbproject/Makefile-IOIO0030.mk dist/IOIO0030/production/app_layer_v1.production.hex
make[2]: Entering directory '/home/user/Desktop/park_git/ioio/firmware/app_layer_v1'
"/opt/microchip/xc16/v1.30/bin/xc16-gcc"   digital.c  -o build/IOIO0030/production/digital.o  -c -mcpu=24FJ256GB206  -MMD -MF "build/IOIO0030/production/digital.o.d"      -mno-eds-warn  -g -omf=elf -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc    -fno-short-double -O3 -I"." -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
"/opt/microchip/xc16/v1.30/bin/xc16-gcc"   ../common/logging.c  -o build/IOIO0030/production/_ext/1270477542/logging.o  -c -mcpu=24FJ256GB206  -MMD -MF "build/IOIO0030/production/_ext/1270477542/logging.o.d"      -mno-eds-warn  -g -omf=elf -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc    -fno-short-double -O3 -I"." -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
"/opt/microchip/xc16/v1.30/bin/xc16-gcc"   ../common/byte_queue.c  -o build/IOIO0030/production/_ext/1270477542/byte_queue.o  -c -mcpu=24FJ256GB206  -MMD -MF "build/IOIO0030/production/_ext/1270477542/byte_queue.o.d"      -mno-eds-warn  -g -omf=elf -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc    -fno-short-double -O3 -I"." -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
"/opt/microchip/xc16/v1.30/bin/xc16-gcc"   features.c  -o build/IOIO0030/production/features.o  -c -mcpu=24FJ256GB206  -MMD -MF "build/IOIO0030/production/features.o.d"      -mno-eds-warn  -g -omf=elf -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc    -fno-short-double -O3 -I"." -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
"/opt/microchip/xc16/v1.30/bin/xc16-gcc"   i2c.c  -o build/IOIO0030/production/i2c.o  -c -mcpu=24FJ256GB206  -MMD -MF "build/IOIO0030/production/i2c.o.d"      -mno-eds-warn  -g -omf=elf -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc    -fno-short-double -O3 -I"." -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
"/opt/microchip/xc16/v1.30/bin/xc16-gcc"   icsp.c  -o build/IOIO0030/production/icsp.o  -c -mcpu=24FJ256GB206  -MMD -MF "build/IOIO0030/production/icsp.o.d"      -mno-eds-warn  -g -omf=elf -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc    -fno-short-double -O3 -I"." -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
"/opt/microchip/xc16/v1.30/bin/xc16-gcc"   ../microchip/common/uart2.c  -o build/IOIO0030/production/_ext/1537399865/uart2.o  -c -mcpu=24FJ256GB206  -MMD -MF "build/IOIO0030/production/_ext/1537399865/uart2.o.d"      -mno-eds-warn  -g -omf=elf -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc    -fno-short-double -O3 -I"." -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99
"/opt/microchip/xc16/v1.30/bin/xc16-gcc"   adc.c  -o build/IOIO0030/production/adc.o  -c -mcpu=24FJ256GB206  -MMD -MF "build/IOIO0030/production/adc.o.d"      -mno-eds-warn  -g -omf=elf -DXPRJ_IOIO0030=IOIO0030  -no-legacy-libc    -fno-short-double -O3 -I"." -I".." -I"../microchip/include" -I"../common" -DPLATFORM=1030 -DNDEBUG -msmart-io=1 -Wall -msfr-warn=off   -std=gnu99

../common/logging.c:33:17: fatal error: PPS.h: No such file or directory
compilation terminated.

make[2]: *** [build/IOIO0030/production/_ext/1270477542/logging.o] Error 255
make[2]: *** Waiting for unfinished jobs....
nbproject/Makefile-IOIO0030.mk:219: recipe for target 'build/IOIO0030/production/_ext/1270477542/logging.o' failed
../common/byte_queue.c: In function 'ByteQueuePullToBuffer':
../common/byte_queue.c:65:23: warning: 'data2' may be used uninitialized in this function
adc.c: In function '_CRCInterrupt':
adc.c:181:7: warning: 'group_header_pos' may be used uninitialized in this function
make[2]: Leaving directory '/home/user/Desktop/park_git/ioio/firmware/app_layer_v1'
nbproject/Makefile-IOIO0030.mk:84: recipe for target '.build-conf' failed
make[1]: Leaving directory '/home/user/Desktop/park_git/ioio/firmware/app_layer_v1'

nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 1s)  
 
I found out that the PPS.h file is in peripheral library. I downloaded peripheral library for PPS.h header file but compiler still gives the same error. So is my environment incorrect ? or i have not installed “peripheral library” correctly? Os its it some other error? Any pointers will be helpful.


    • As an long-shot we commented the include directive for PPS.h and tried to build the code to get the following error:

/opt/microchip/xc16/v1.30/bin/bin/../bin/elf-ld: Warning: linker script did not specify CRT_STARTMODE file, default: crt_start_mode_normal
dummy.gld.01:1203: undefined symbol `__reset' referenced in expression
make[2]: *** [dist/IOIO0030/production/app_layer_v1.production.hex] Error 255
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
nbproject/Makefile-IOIO0030.mk:395: recipe for target 'dist/IOIO0030/production/app_layer_v1.production.hex' failed
make[2]: Leaving directory '/home/user/Desktop/park_git/ioio/firmware/app_layer_v1'
nbproject/Makefile-IOIO0030.mk:84: recipe for target '.build-conf' failed
make[1]: Leaving directory '/home/user/Desktop/park_git/ioio/firmware/app_layer_v1'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed


Any pointers are welcome. Thanks for patience. Will commit back firmware building steps if they have changed to the repo if we are successfully.






On Sunday, January 22, 2017 at 10:53:49 AM UTC+5:30, Ytai wrote:
This is not an inductor but a ferrite bead.
Please build with XC16 using a clean clone. I don't want to waste time troubleshooting a non-standard environment.
On Sat, Jan 21, 2017 at 6:03 AM, <kri...@parkzap.com> wrote:
I'm asking this question because I'm in doubt that is this really a Inductor ?
if yes then can you please explain me why are you using this because in controller's datasheet there is no explanation of Indutor use.
and what's the exact value (given value in schematic is 300hm, 1.8A)  

On Saturday, January 21, 2017 at 4:46:59 PM UTC+5:30, kri...@parkzap.com wrote:
hello ytai,

can you tell me exact value of Inductor, connected with controller's avdd pin(19).

thanks


--
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 ioio-users+...@googlegroups.com.

Ytai Ben-Tsvi

no leída,
27 ene 2017, 11:31:44 a.m.27/1/17
para ioio-...@googlegroups.com
Both are path problems:
For the script to work you need to have the mplab bin directory in your path.
Then you need mplab to know about your toolchain locations. This is done from the tools menu of mplab, where you can add toolchains.

To unsubscribe from this group and stop receiving emails from it, send an email to ioio-users+unsubscribe@googlegroups.com.

Mikhail Evstafyev

no leída,
16 ago 2017, 6:26:13 a.m.16/8/17
para ioio-users
I've just started to work with IOIO firmware and met both issues noticed by Pranay Sharma.

I think that they are related to the latest changes to Microchip development tools. Most likely changes were done because of MCC integration into the development flow.
I've started with MPLAB X v3.65 and XC16 v1.31 on Windows7 virtual machine. 

The issue with missed PPS.h file I fixed by installation of legacy peripheral library via peripheral-libraries-for-pic24-and-dspic-v2.00-windows-installer.exe.
The installer asks about location of XC16 compiler and you should give the correct path. Otherwise compiler will not find the header file. If there are several versions of XC16 installed then you should install the library several times giving location of different versions. 

The issue with _reset symbol undefined is related to changes in linker script file (.gld) syntax and startup code. Probably startup code should be generated by MCC.
IOIO projects do not use MCC that results in startup code not found.
I was able to fix this issue by rolling back the XC16 version. The version 1.25 compiles and links everything OK. 

BTW I've also tried C30 v3.30. On my PC linker crashes. So I have to use XC16.


JP

no leída,
23 abr 2018, 5:39:12 p.m.23/4/18
para ioio-users
Thanks!

I can confirm that Mikhail's suggestions also fixed the same errors for me.

/JP

Ytai Ben-Tsvi

no leída,
24 abr 2018, 12:41:42 p.m.24/4/18
para ioio-...@googlegroups.com
Do you want to send out a pull request?

Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos