Why I can NOT execute cgs.exe to create hex file?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I am using wiced smart v1.1.0.

I want to use cgs.exe to convert cgs file to hex file, the hex file with different BT address, I follow this topic: Two dev boards have same MAC address, and use cgs.exe like this:

cgs.exe -I <output_file_name.hex> -O DLConfigBD_ADDRBase:207321234567 –A 0xFF000000 –B <btp_file.btp> -D <file.hdf> <input_file.cgs>

Before executing cgs.exe, I copy cgs.exe, 20732_EEPROM.btp, ConfigDef20732_aa.hdf to \build\hello_sensor-BCM920732TAG_Q32-rom-ram-Wiced-release  , and execute cgs.exe like this:

cgs.exe -I hello_sensor-BCM920732TAG_Q32-rom-ram-Wiced-release.hex -O DLConfigBD_ADDRBase:207321234567 -A 0xFF000000 -B 20732_EEPROM.btp -D ConfigDef20732_aa.hdf A_20732A0-hello_sensor-rom-ram-spar.cgs

Below is console response:

C:\Disk_Driver\Firmware\WirelessModem\BLE\truck\WICED-Smart-SDK-1.1.0\build\hello_sensor-BCM920732TAG_Q32-rom-ram-Wiced-release>cgs.exe -I hello_sensor-BCM920732TAG_Q32-rom-ram-Wiced-release.hex -O DLConfigBD_ADDRBase:207321234567 -A 0xFF000000 -B 20732_EEPROM.btp -D ConfigDef20732_aa.hdf A_20732A0-hello_sensor-rom-ram-spar.cgs

cgs v1.3.0.0094 20131210

Copyright (c) 2012-2013 Broadcom Corp.

Processing cgs files:

  A_20732A0-hello_sensor-rom-ram-spar.cgs

...

Error: Duplicate field: command: Adc Driver Configuration, field: Reserved_1

Creating Intel Hex file: hello_sensor-BCM920732TAG_Q32-rom-ram-Wiced-release.hex... failed.

Reason:

ConfigDef20732_aa.hdf(0:0): Error: Duplicate field: command: Adc Driver Configuration, field: Reserved_1

What did that mean?

0 Likes
1 Solution
SuLe_1710756
Level 5
Level 5
10 likes received First like received First like given

Hi kai.ren

I think it may be caused from mismatch setting of "Adc Driver Configuration" in ./Platform/BCM920732TAG_Q32/BCM20732A0.cgs.

Here I attached default configuration values for "Adc Driver Configuration".

I also tested with this values and verified it successfully.

################################################################################

#  ADC configuration

################################################################################

ENTRY "Adc Driver Configuration"

{

    "RC Calibration for ADC" = 0xc

    "Bandgap Temperature Constant" = 0

    "Bandgap Output Current Trim" = 0x6

    "Bandgap Noise Fiter Constant" = 0x3

    "Dither Power Down" = 0

    "IDAC Trimming 2nd OPAMP" = 0x6

    "IDAC Trimming 1st OPAMP" = 0x6

    "Comparator Reference Voltage" = "650mV"

    "OPAMP Reference Voltage" = "500mV"

    "OPAMP Power Down" = "Power ON"

    "Sampling Clock Polarity" = "Positive Edge"

    "Dither Clock Polarity"   = "Positive Edge"

    "Comparator Bias Current Control" = "4.3uA"

    "ADC Power Up Delay" = 20

    "Calibration Reference Channel" = "ADC_INPUT_VDD_CORE"

    "Calibration Reading Ave Count" = 8

    "Input Range" = "0V-3.6V"

    "Reference MicroVoltage"    = 1200

    "ADCBandgapDelta[0]" = 0

    "ADCBandgapDelta[1]" = 0

    "ADCBandgapDelta[2]" = 0

}

Thanks,

SM

View solution in original post

5 Replies
SuLe_1710756
Level 5
Level 5
10 likes received First like received First like given

Hi kai.ren

I think it may be caused from mismatch setting of "Adc Driver Configuration" in ./Platform/BCM920732TAG_Q32/BCM20732A0.cgs.

Here I attached default configuration values for "Adc Driver Configuration".

I also tested with this values and verified it successfully.

################################################################################

#  ADC configuration

################################################################################

ENTRY "Adc Driver Configuration"

{

    "RC Calibration for ADC" = 0xc

    "Bandgap Temperature Constant" = 0

    "Bandgap Output Current Trim" = 0x6

    "Bandgap Noise Fiter Constant" = 0x3

    "Dither Power Down" = 0

    "IDAC Trimming 2nd OPAMP" = 0x6

    "IDAC Trimming 1st OPAMP" = 0x6

    "Comparator Reference Voltage" = "650mV"

    "OPAMP Reference Voltage" = "500mV"

    "OPAMP Power Down" = "Power ON"

    "Sampling Clock Polarity" = "Positive Edge"

    "Dither Clock Polarity"   = "Positive Edge"

    "Comparator Bias Current Control" = "4.3uA"

    "ADC Power Up Delay" = 20

    "Calibration Reference Channel" = "ADC_INPUT_VDD_CORE"

    "Calibration Reading Ave Count" = 8

    "Input Range" = "0V-3.6V"

    "Reference MicroVoltage"    = 1200

    "ADCBandgapDelta[0]" = 0

    "ADCBandgapDelta[1]" = 0

    "ADCBandgapDelta[2]" = 0

}

Thanks,

SM

Anonymous
Not applicable

Resolved, thanks.

0 Likes
Anonymous
Not applicable

Hi Sirs,

May I ask a question, what's the 'cgs' file? Is it a general file format and widely use in embedded development?

Thanks,

Fran

0 Likes

Based on my understanding, it's a configuration file used within the Cygwin package which is included as part of the SDK: https://www.cygwin.com/

cgs.exe converts the cgs file to a hex format that can be loaded into the EEPROM via the mini-driver as described here: Programming the 20732S MODULE USING 2073xTAG Board

arvinds j.t

0 Likes

Corrections/updates to my entry above....

As it turns out, the cgs file is specific to BCM2073x (and other BRCM Bluetooth Chips) and exists an intermediate build product.

At a high level, it's one representation of the build image (among many) that gets generated during the build.

There are no plans to release the file's internal format to the public as it is proprietary and may change at anytime.