sx700 porting

  • 151 Replies
  • 49063 Views
sx700 porting
« on: 25 / September / 2014, 12:55:15 »
Advertisements
Mod note: A CHDK port for sx700 firmware 100e is available from the unstable autobuilds, thanks to @ftm

Hi,

pursuing a master degree in computer science i'm starting this thread to call for motivated person to port our firmware to the good sx700. So whenever so you are hot to help waise your hand dso that the work coudl begin. I think the first step for the beginners who are already able to code in C is the for developpers page: http://chdk.wikia.com/wiki/For_Developers.

Canonly
« Last Edit: 03 / January / 2018, 00:58:37 by reyalp »

Re: sx700 porting
« Reply #1 on: 02 / October / 2014, 03:21:47 »
I've just get one, so I can do some testing.
(A 410), SX 200, (SX 280), SX 700

Re: sx700 porting
« Reply #2 on: 02 / October / 2014, 14:06:40 »
ok it's noticed. Aren't you able to particpate to the building? I've the code already dissambled in you can help.

Re: sx700 porting
« Reply #3 on: 03 / October / 2014, 06:06:29 »
Unfortunatelly I can not do programming, just testing.
(A 410), SX 200, (SX 280), SX 700


Re: sx700 porting
« Reply #4 on: 12 / October / 2014, 19:02:47 »
Hello,
here you may find my csv file noting the address of the functions mapped comparing the sx280.102b dump to the sx700.100d dump. I tried to double-check the addresses.

Starting from the sx280.102b, I have tried to modify the stubs_entry_2.S and the boot.c in order to do a minimal compilation, but I had some undefined references errors. So I tried to modify also the stubs_min.S to add def (fakedef) of some variables, and that eliminated some of this undefined references.
I still have some undefined references, because some of the modified functions in boot.c (and other files) are not found...other attached file.

I guess:

1) I have to define these functions somewhere else.
2) For now I can keep the fakedefs, just to compile, but I have to find them afterwards.
3) I am starting the modification from the code of srsa_4c in the sx280.102b, but I guess this has more tasks, functions and variables needed for the first trial. Right?
4) Of course, I can easily compile the sx280.102b and I have used the PRIMARY.bin correct for the sx700.100d (or so I guess).

*

Offline srsa_4c

  • ******
  • 3665
Re: sx700 porting
« Reply #5 on: 12 / October / 2014, 19:54:56 »
You can get lots of "undefined reference to ..." errors when the stubs_auto files do not get re-generated during the build process. Try erasing them manually before re-building.

If you're using the sx280 102b port to start, your port is going to need the same stubs and firmware variables (you need to correct all the addresses of course to match your firmware).
Can you share the source in some form (zipped files or svn diff)?

If you want something that can boot without finishing all details, disable task replacements in the port's boot.c (CreateTask_my).

Re: sx700 porting
« Reply #6 on: 13 / October / 2014, 03:47:15 »
Well, I had forgot a line commented in the Makefile:

Code: [Select]
STUBS_AUTO_DEPS=boot.c capt_seq.c movie_rec.c filewrite.c
, and rebuilding after uncommenting produced sensibly less undefined references (see attached output). I also tried to recompile after cleaning manually, with the same results.

Also, find attached the changed files in sx700\sub\100d.

Edit: for the moment I commented the part of the boot.c with the CreateTask_my and the CreateTask_my function. I noticed I really need to correct the stubs_min.S, finding variables and tables.
« Last Edit: 13 / October / 2014, 06:09:18 by antwtna »

*

Offline srsa_4c

  • ******
  • 3665
Re: sx700 porting
« Reply #7 on: 13 / October / 2014, 16:45:40 »
Well, I had forgot a line commented in the Makefile:

Code: [Select]
STUBS_AUTO_DEPS=boot.c capt_seq.c movie_rec.c filewrite.c
, and rebuilding after uncommenting produced sensibly less undefined references (see attached output). I also tried to recompile after cleaning manually, with the same results.
Attached is a 100d subdir that allows build to succeed. It's based on your version, I added the rest of files from sx280 102b. I slightly changed boot.c (commenting out all task replacements). I also changed stubs_entry_2.S: rearranged most stubs to (sort of) alphabetical order, added the missing ones. Please fill in the addresses for all NULL_SUB entries (except for those two at the bottom). Your included stubs_min.S was from a pre-DIGIC 6 port, I added the sx280 102b file instead (unchanged).
I did not make other changes. I'd like to note that you likely want to copy routines from your sx700 disassembly and change them where needed instead of trying to fix up the sx280 routines.
« Last Edit: 13 / October / 2014, 18:34:54 by srsa_4c »


Re: sx700 porting
« Reply #8 on: 13 / October / 2014, 18:13:36 »
seems you got further than me i'll put support in a couple of days i'm the exam period that's why i disappeared but it finished this friday

Re: sx700 porting
« Reply #9 on: 14 / October / 2014, 05:40:15 »
Hola srsa_4c,
thanks for all your support!!!

Quote
Attached is a 100d subdir that allows build to succeed. It's based on your version, I added the rest of files from sx280 102b.

Great! Actually, I may have missed to say that I just zipped and shared the different files respect to the sx280.102b files, but I think you got that.
Yesterday, modifing the boot.c according to your suggestion to temporarily bypass the CreateTask_my, adding the missing stubs to stubs_entry_2.S, and modifing the stubs_min.S with the missing variables(I also tried to find the sx700 addresses/value for all of them), I still had 5/6 undefined references... so, of course, I still have something missing and, above all, a bit of order to make... merging your good work and the variables found should be my next reach point, for now. Still, I have to find the tables and do double checks, but I will come to this after a bit of needed order.

Quote
I did not make other changes. I'd like to note that you likely want to copy routines from your sx700 disassembly and change them where needed instead of trying to fix up the sx280 routines.
You are absolutely right, actually some routines are very similar from sx700 to sx280, so I had to do few changes respect to yours, others were much more different, so you have a good point there.
« Last Edit: 04 / September / 2015, 03:46:22 by antwtna »

 

Related Topics