I've developed a tool that uses the new USB communication syscalls (#87) to speed up the development cycle.
Instead of going through the slow USB bulk transfer process every time to test an add-in, you launch a helper add-in on the calculator, and then a tool on the PC side pushes the data to the calculator. This gets copied to the CG50's 6MB of extra unused RAM, and then the add-in jumps to the address the add-in was copied to. The child add-in then completely takes over from the loader, overwriting its memory. When the child exits, the loader immediately reloads itself, making sure not to assume that its memory is intact.
This is far faster than the manual copy process; the transfer usually takes less than a second, even for large add-ins. Also, if you assign a key like EXIT that causes the main function to return, then you can instantly get back to the loader by just pressing this. This means testing a new version of an add-in takes seconds, rather than minutes, and in some cases means you won't need a PC port for fast testing.
Support for this has already been added to development builds of gint, with the PC side of the loader (which is quite simple) added to the fxlink tool from fxsdk. I'd like to add support to PrizmSDK too, but some cooperation would be needed from the SDK to make it seamless.
The only change in the compile process is that the ROM start address 0x00300000 needs to be changed to 0x8C200000. Then, fxlink can to used to send the generated .bin file to the calculator.
While this can be done manually by editing the linker script, rebuilding, and changing it back when you want a working g3a, that feels a bit janky. If support for this was added to libfxcg, it would probably be a relatively simple Makefile change to have another target to build the add-in like this. However, I'm not sure if it make sense to upstream something that relies on a tool from an entirely different SDK, so I'm wondering if I could upstream that, and also have a standalone sending tool packaged with PrizmSDK?
If this is something you'd be interested in, I'm not sure what the best way to package it would be, especially for the Windows builds. Would the code be in the repo and built with it, or separate like mkg3a? How does the mkg3a executable get included in the Windows releases, is this done manually? Also, some some cases Zadig may need to be used on Windows, is that a problem?
I've developed a tool that uses the new USB communication syscalls (#87) to speed up the development cycle.
Instead of going through the slow USB bulk transfer process every time to test an add-in, you launch a helper add-in on the calculator, and then a tool on the PC side pushes the data to the calculator. This gets copied to the CG50's 6MB of extra unused RAM, and then the add-in jumps to the address the add-in was copied to. The child add-in then completely takes over from the loader, overwriting its memory. When the child exits, the loader immediately reloads itself, making sure not to assume that its memory is intact.
This is far faster than the manual copy process; the transfer usually takes less than a second, even for large add-ins. Also, if you assign a key like EXIT that causes the main function to return, then you can instantly get back to the loader by just pressing this. This means testing a new version of an add-in takes seconds, rather than minutes, and in some cases means you won't need a PC port for fast testing.
Support for this has already been added to development builds of gint, with the PC side of the loader (which is quite simple) added to the
fxlinktool from fxsdk. I'd like to add support to PrizmSDK too, but some cooperation would be needed from the SDK to make it seamless.The only change in the compile process is that the ROM start address
0x00300000needs to be changed to0x8C200000. Then,fxlinkcan to used to send the generated.binfile to the calculator.While this can be done manually by editing the linker script, rebuilding, and changing it back when you want a working g3a, that feels a bit janky. If support for this was added to libfxcg, it would probably be a relatively simple Makefile change to have another target to build the add-in like this. However, I'm not sure if it make sense to upstream something that relies on a tool from an entirely different SDK, so I'm wondering if I could upstream that, and also have a standalone sending tool packaged with PrizmSDK?
If this is something you'd be interested in, I'm not sure what the best way to package it would be, especially for the Windows builds. Would the code be in the repo and built with it, or separate like
mkg3a? How does the mkg3a executable get included in the Windows releases, is this done manually? Also, some some cases Zadig may need to be used on Windows, is that a problem?