SX160 IS porting thread

  • 94 Replies
  • 9992 Views
  • Publish
    SX160 IS porting thread
    « on: 05 / March / 2013, 09:18:52 »
    Advertisements
    Hello everybody, I'am starting the porting for this camera model. Hope you guys can help me. I'm still on early stages and this is all new to me so please be patient  :D

    Anyway I decided to create this thread to keep the discussion centralized, here I'll post the development updates and also my questions about porting and chdk.

    Wish me luck!

  • Publish
    Re: SX160 IS porting thread
    « Reply #1 on: 05 / March / 2013, 09:23:39 »
    Hello everybody, I'am starting the porting for this camera model. Hope you guys can help me. I'm still on early stages and this is all new to me so please be patient  :D
    Welcome.   If you need more immediate help, the CHDK IRC channel can be useful  (#chdk on freenode.net).  Lots of zombies there unfortunately but you can usually find some help in the evenings ( USA time ) and are willing to hang around a bit waiting for someone to show up.  Look for reyalp, nafraf, or me, almongst others who drop in from time to time.   There is a web client if you are not setup with a proper IRC client : http://webchat.freenode.net/

    Meanwhile,  lots of good reading on the bottom half of this page :  http://chdk.wikia.com/wiki/For_Developers



    *

    Offline nafraf

    • *****
    • 1257
  • Publish
    Re: SX160 IS porting thread
    « Reply #2 on: 05 / March / 2013, 09:46:00 »
    Hello aviler,
    I started a blind port for sx160 100a some days ago. I have not tested anything.  If you want to use some code to start, unfinished port is available here.
    « Last Edit: 05 / March / 2013, 09:47:34 by nafraf »

  • Publish
    Re: SX160 IS porting thread
    « Reply #3 on: 05 / March / 2013, 11:07:21 »
    Great news nafraf, but by "blind" you mean what exactly? And how can i help you to continue the work?


    *

    Offline nafraf

    • *****
    • 1257
  • Publish
    Re: SX160 IS porting thread
    « Reply #4 on: 05 / March / 2013, 12:08:30 »
    By "blind" I mean that I don't have access to camera, the port was done using chdk-pt and GPL tools but I could not test anything.
    There are some comments about porting status in http://subversion.assembla.com/svn/nafraf/chdk/platform/sx160is/notes.txt

    To continue, well, start reading this http://chdk.wikia.com/wiki/Adding_support_for_a_new_camera  :)

    Then,  you can comment out calls to movie_rec, capt_seq, and exp_drv_task, and test if CHDK boots.  After that, you enable each function and test again.  Please check platform_camera.h too.

    Btw, do you have a 100a camera?

  • Publish
    Re: SX160 IS porting thread
    « Reply #5 on: 05 / March / 2013, 12:29:48 »
    Hell yeah I have one, and I'm already compiling arm-elf using the porting guide. Do you use the IRC channel we can talk there.

  • Publish
    Re: SX160 IS porting thread
    « Reply #6 on: 06 / March / 2013, 10:13:16 »
    So guys I succeed on compile binutils and gcc to create my cross compiler. I'm using binutils 2.22 and gcc 4.7.2. Also could compile CHDK for SX150IS.

    So I pick the blind port from Nafraf and using the porting guide copy the necessary files do /platform and /loader. Also copied original dump to the /platform/sx160is/sub/100a directory.

    To compile I used :

    Code: [Select]
    make PLATFORM=sx160is PLATFORMSUB=100a fir
    But I got this:

    Code: [Select]
    >> Entering to core
    gui.c -> gui.o
    -> main.elf
    main.o: In function `core_spytask':
    main.c:(.text+0xdc): undefined reference to `exmem_malloc_init'
    collect2: error: ld returned 1 exit status
    make[1]: *** [main.elf] Error 1
    make: *** [all-recursive] Error 1

    So I've try to add the dummy stubs to stubs_entry_2.S like this:

    Code: [Select]
    NHSTUB(exmem_malloc_init, NULL_SUB)
    But this didn't work, still getting the same error. What am I missing?

    *

    Offline nafraf

    • *****
    • 1257
  • Publish
    Re: SX160 IS porting thread
    « Reply #7 on: 06 / March / 2013, 10:52:27 »
    You compiled sx150, it has EXMEM enabled, so try to make clean before compile sx160:
    Code: [Select]
    make clean
    make PLATFORM=sx160is PLATFORMSUB=100a fir

    Check platform/sx160is/sub/100a/makefile.inc, these lines are commented
    Code: [Select]
    #override OPT_EXMEM_MALLOC=1
    #override OPT_CHDK_IN_EXMEM=1
    You need to check MEMISOSTART values before enable EXMEM.


  • Publish
    Re: SX160 IS porting thread
    « Reply #8 on: 06 / March / 2013, 12:04:01 »
    Thanks Nafraf now I can compile, I will try to boot with the generated DISKBOOT.BIN

  • Publish
    Re: SX160 IS porting thread
    « Reply #9 on: 06 / March / 2013, 14:01:56 »
    So with Nafraf help I was able to generate a bootable sd card for the sx160 however, with my sd card, the camera is not turning on, nothing happens.

    Is this behavior expected for a starting port?

     

    Related Topics