Windows GUI for gcc toolchain - General Discussion and Assistance - CHDK Forum

Windows GUI for gcc toolchain

  • 58 Replies
  • 80488 Views
*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Windows GUI for gcc toolchain
« on: 13 / February / 2016, 10:10:08 »
Advertisements
The CHDK-Shell is a little bit obsolete. Newer chdk developments are not usable with the CHDK-Shell. That was a reason to create a new simple GUI for compiler tasks.

The main features are:

- Download and unpack the most recent source code revision (trunk & release)
- Path settings for  GCC, Capstone, Source Code, Primary Root
- Camera selection for the compiler
- Creation of a local camera list for batch compiling
- Setting and writing localbuildconf.inc based on buildconf.inc from the recent source code
- CMD window with GCC support
- Error detection for compiler run
- Sanity checks for compiler and source code
- Insert & remove of own data in source code
- Upload CHDK files to the cameras

Download GUI Version 0.9.323 (recent Version)


Tested for Windows 7, 8, 8.1 & 10, 32 or 64 bit. Windows XP is not recommended, but works mostly. Copy the exe file in a folder of your choice. Blanks and special characters should not be used in the path (also for path settings in the GUI). The GUI uses the Windows standard zip function for unpacking the source code. This is very slow. Alternatively you can use 7zip. Copy the 7za.exe in the GUI folder.

Also the standard gcc toolchain 4.5.1 for the CHDK shell is a little bit obsolete. The new finsig thumb2 tool works not correctly with old toolchain. (Fixed in r4539.) rudi has made a new toolchain based on gcc 4.9.3. This works properly.

Download gcc compiler Version 4.9.3
alternative compiler package with 4.5.1, 4.5.1-4.9.3, 4.9.3
alternative compiler package from Whim with gcc451_493_host481
More Toolchains from Whim => https://chdk.setepontos.com/index.php?topic=12752.msg145097#msg145097


Sorry, all shared Box.net links are broken.

gcc931 working toolchain

Capstone tools => https://chdk.setepontos.com/index.php?topic=12752.msg140405#msg140405


Description:
All buttons and checkboxes have a short description as a tooltip.

  • GCC

Set the path for the compiler, is stored in the ini file. It is checked whether the compiler is valid.
  • Capstone

Set the path for the Capstone tools, is stored in the ini file. It is checked whether Capstone is valid.
  • Primary

Set the path for an alternative dir with the firmware dumps, is stored in the ini file. It is checked whether dumps are valid.
  • Source

Set the path for the CHDK source code, is stored in the ini file. It is checked whether the source code is valid.
  • Download

Download the most recent source code as a zip file. You can choose trunk or release version. After download the file is unpacked in the folder 'trunk' or 'release' as a subfolder.
  • Unpack Zip

You can choose a zip file with the CHDK source code, e.g. from assembla, and a destination. After that the zip file will be unpacked in the destination.
  • Open Source

Opens the CHDK source code folder in windows explorer. See also 'Source'.
  • Make Cam List

Opens a new window with a list of the available cameras for the recent CHDK source code you have chosen. Make your selection of cameras. The selected cameras are saved in a local list (local_camera_list.csv). With the Button 'Compile List' you can compile all cameras from this list.
  • chdkptp

Function for uploading of the CHDK files onto the camera. At the first use the path to chdkptp must be set. If chdkptp.exe is available, you can choose a zip file. After a security question the file will be unzipped. As next starts the upload of the unzipped files to the camera.
  • User Source, Insert User Source, Remove User Source.

Adds the subfolder 'user source' in the program dir. In this folder you can place additional files, e.g. fi2.inc. Use the same folder structure as in the CHDK source code. These additional files can be inserted into the recent CHDK source code or again removed.
  • Group localbuildconf.inc

Set the checkboxes for your private compile options. Some checkboxes are activated only when the conditions are met. These options are checked: FI2, GEN_STUBS, GEN_SIGS, USE_GCC_EABI, CAPSTONE_TOOLS, PRIMARY_ROOT
  • Compile

Compiles the chosen camera/firmware depending on checkboxes 'full' and 'clean'. If errors are present, the error log can be read. Use the Botton 'Error Log'.
  • Compile All

Compiles all cameras listed in camera_list.csv depending on checkboxes 'full' and 'clean'.
  • Compile List

Compiles all cameras listed in local_camera_list.csv depending on checkboxes 'full' and 'clean'. See also 'Make Cam List'.
  • CMD

Opens a cmd window with the GCC environment in the source code path.[/list]

GUI source code
Thanks:
rudi for his help. Whim for the great program CHDK Shell: http://chdk.wikia.com/wiki/CHDK-Shell reyalp for capstone tools: https://chdk.setepontos.com/index.php?topic=12714.msg126204#msg126204 reyalp for the wonderful chdkptp: http://chdk.wikia.com/wiki/PTP_Extension#chdkptp

msl
« Last Edit: 26 / September / 2022, 14:45:54 by msl »
CHDK-DE:  CHDK-DE links

*

Offline blackhole

  • *****
  • 940
  • A590IS 101b
    • Planetary astrophotography
Re: Windows GUI for gcc toolchain
« Reply #1 on: 13 / February / 2016, 15:17:52 »
Quote
The CHDK-Shell is a little bit obsolete. Newer chdk developments are not usable with the CHDK-Shell. That was reason to create a new simple GUI for compiler tasks.
Works great, thanks for your hard work guys! ;)

*

Offline reyalp

  • ******
  • 14082
Re: Windows GUI for gcc toolchain
« Reply #2 on: 13 / February / 2016, 15:26:18 »
Nice, thanks rudi  :D

Quote
The new finsig thumb2 tool works not correctly with old toolchain.
What's the problem? I think I tried this when I first checked it in, but I usually use msys for the host compiler so I might have broken it since.

If using capstone, it is very important to use the patched version, like http://chdk.setepontos.com/index.php?topic=12714.msg126351#msg126351. You could include this with the tool packages if you want.

Also note the thumb2 tools assume capstone 3.0.4 (+patch above), not the "next" branch in the capstone github. The "next" branch is incompatible in some ways (different include paths, some instruction IDs changed)
Don't forget what the H stands for.

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Windows GUI for gcc toolchain
« Reply #3 on: 13 / February / 2016, 16:15:57 »
What's the problem? I think I tried this when I first checked it in, but I usually use msys for the host compiler so I might have broken it since
There was one problem in finsig_thumb2.c:
Code: [Select]
typedef struct sig_rule_s {
...
} sig_rule_t;
The host compiler from the toolchain 4.5.1 could not interpret this. It was time for a new host compiler. Now is all fine.

All other things are ok. We can build the stubs_entry.S for the SX280 without any problems.

msl
CHDK-DE:  CHDK-DE links


*

Offline srsa_4c

  • ******
  • 4451
Re: Windows GUI for gcc toolchain
« Reply #4 on: 13 / February / 2016, 18:53:45 »
Good work!
I think this topic should be pinned (aka sticky).

*

Offline hwntw

  • ***
  • 159
Re: Windows GUI for gcc toolchain
« Reply #5 on: 17 / February / 2016, 17:57:55 »
How does downloading source code work? I just get *Not connected to the Internet* when I try it. Do I need to be logged in somewhere?
Ixus 300HS S100


Windows 10

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Windows GUI for gcc toolchain
« Reply #6 on: 17 / February / 2016, 18:22:22 »
A password is not needed. The program checks your Windows internet connectivity via the file connect.dll (this file is a component of windows). When the connect.dll says 'no internet', you get this message.

Which Windows version is on your machine?

msl
« Last Edit: 17 / February / 2016, 18:24:29 by msl »
CHDK-DE:  CHDK-DE links

*

Offline hwntw

  • ***
  • 159
Re: Windows GUI for gcc toolchain
« Reply #7 on: 17 / February / 2016, 18:44:42 »
I have Windows XP SP3
Ixus 300HS S100


Windows 10


*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Windows GUI for gcc toolchain
« Reply #8 on: 18 / February / 2016, 09:11:49 »
Using Windows XP is not the best idea.  ;) This was also the problem. The connectivity check works only for Vista or higher.

I have added an exception for XP. Try the updated version.

msl
CHDK-DE:  CHDK-DE links

*

Offline hwntw

  • ***
  • 159
Re: Windows GUI for gcc toolchain
« Reply #9 on: 18 / February / 2016, 09:38:56 »
Updated version works nicely. Thank you
Ixus 300HS S100


Windows 10

 

Related Topics