I've added some similar functions to Magic Lantern for the 5D Mark II. It looks like we duplicated each others efforts in reverse engineering the PTP context structure and callback interface.
One of my other goals was to build a command console that would work over the PTP interface. Perhaps it would allow arbitrary Lua commands to be sent, and use the USB as the stdout.
And as an outside goal, I wanted to add a gdb interface so that extensions could be more easily debugged.
How about developers under Windows, can they use libptp or something else?
First time I even hear of Magic Lantern. Fortunately the PTP part wasn't much work, but it would be nice if we can avoid duplication in the future. As I've said before, there is a lot of knowledge floating around these project, but most of it is inaccessible.
By the way, I just tried to find your functions (for comparison) but had no luck; can you give a me pointer?
I'm not sure if it's clear, but my "LUA script execution" means you can already execute arbitrary commands (e.g. "lua shoot();" with "ptpcam --chdk"). What I haven't looked at is something to preserve context between executions. Sending of output should be fairly simple (e.g. with a simple hook).
QuoteAnd as an outside goal, I wanted to add a gdb interface so that extensions could be more easily debugged.Do you think this is possible? It seems to me that this requires support from the OS to provide tracing and breakpoints and what not. Has anything like this been found?
Have a look here for patches and documentation
QuoteBy the way, I just tried to find your functions (for comparison) but had no luck; can you give a me pointer?ptp.h. It isn't near as complete as your implementation; I plan to hack your hacked ptpcam program to work for me, as well work on a AVR PTP library so that the Impero can talk to the 5D.
I see things that look like a debugger interface in the command shell inside DryOS. As you had found, there are equivalents to ps, top, and a few other programs. We also have control of the scheduler, so we might be able to do some simple profiling.
This is a bit too advanced for my basic knowledge.
It would be VERY tedious to support all cameras.
Could you list the steps that I have to take to compile and patch the various softwares (under Windows) and run the command line for testing ?
I'm not sure which compilers work for Windows
QuoteI'm not sure which compilers work for Windowsare you using the same compiler setup for this as for compiling CHDK ? and which native/ARM GCC versions do you use ?