Cc3200tool on images

Dear Developers and Users,

I was successfull in reading the firmware from the flash chip using a ch341 tool. I also successfully extraced certificates and everything. But when i want to generate a new flash file i get the following error from the tool:
cc3200tool.cc.CC3200Error: /sys/pre-img.bin or id -1 not found, but only overwriting is supported.
Is there no way to insert a new file in an existing or new image?

My command was
cc3200tool -if CC3200_TB.bin -of NewTBC3200FW.bin write_file ExtractedFromBox/sys/pre-img.bin /sys/pre-img.bin

I also tried to write a new file where the whole folder is written
cc3200tool -if CC3200_TB.bin -of NewTBC3200FW.bin write_all_files ExtractedFromBox

Both have the same error. Any solutions?

You cannot write into a cc3200 image.
The only thing is possible to overwrite an existing file with maximum of the overwritten file.

OK I flashed the original image now on “sys/mcuimg3.bin” the new ca to “sys/ca.der” and modified the “ngCfg.json” as follows:

{
“general”: {
“activeImg”: “ofw1”,
“_descWaitForPress”: “Waits for an earpress on startup”,
“waitForPress”: false,
“_descWaitForBoot”: “Waits for an earpress before firmware boot”,
“waitForBoot”: false,
“waitTimeoutInS”: 60,
“_descMinBatteryLevel”: “Divide through 2785 to get voltage”,
“minBatteryLevel”: 8869,
“ofwFixFlash”: “/sys/mcuimg3.bin”,
“_descSerialLog”: “Logging only works with the debug build!”,
“serialLog”: false,
“_descLogLevel”: “0:Trace - 5:Fatal”,
“logLevel”: 0,
“_descLogColor”: “Use colors in log output”,
“logColor”: false
},
“ofw1”: {
“checkHash”: false,
“hashFile”: false,
“watchdog”: true,
“bootFlashImg”: true,
“flashImg”: “/sys/mcuimg3.bin”
},
“ofw2”: {
“checkHash”: true,
“hashFile”: false,
“watchdog”: true,
“ofwFix”: true,
“ofwSimBL”: true,
“patches”: [“altUrl.tc.fritz.box”]
},
“ofw3”: {
“checkHash”: true,
“hashFile”: false,
“watchdog”: true,
“ofwFix”: true,
“patches”: [“altUrl.tc.fritz.box”]
},
“cfw1”: {
“checkHash”: false,
“hashFile”: false,
“watchdog”: true
},
“cfw2”: {
“checkHash”: false,
“hashFile”: false,
“watchdog”: true
},
“cfw3”: {
“checkHash”: false,
“hashFile”: false,
“watchdog”: true
},
“add1”: {
“checkHash”: true,
“hashFile”: false,
“watchdog”: true,
“ofwFix”: true,
“ofwSimBL”: false,
“patches”: [“blockCheck.310”, “noCerts.305”, “noPass3.310”, “noPrivacy.305”, “uidCheck.307”]
},
“add2”: {
“checkHash”: true,
“hashFile”: false,
“watchdog”: true,
“ofwFix”: true,
“ofwSimBL”: false,
“patches”: [ “altUrl.305”]
},
“add3”: {
“checkHash”: true,
“hashFile”: false,
“watchdog”: true,
“ofwFix”: true,
“ofwSimBL”: false,
“patches”: [“altUrl.305”]
}
}

When I power up the Toniebox I get only a green light with no sound.

I think the problem lies in copying the original flash file to the image to slot3. CC3200tool can not verify the flash to file. Can anyone assist me at this step?

It is a bad idea to write the original bootloader to slot 3. This could end up in an endless loop.
Also this way you are unable to flash the custom bootloader, as it is bigger than the original one.

Why you are not doing it the recommended way?

I can’t connect with serial. The Rx line is just pulled low and no serial communication can be established. I soldered everything to the board to ensure that no loose connections occur.

You will not be able to get any further without using the UART and finding and fixing your problem.
There is usually a bad or wrong connection. This includes everything from the box up to the cc3200tool.

Here in my cabeling

20251207_151913

20251207_151859

I tested all connections for shorts befor starting and tested 2 different uart connectors. Can you disable usart in the bootloader in firmware for the cc3200R1?

I get only wait for ack.

What command are you using? What is happening?

The commnd was

Cc3200tool -p Com3 -–reset dtr list_filesystem

Result was trying to connect.

Unable to get ack 5x

Then Abort as no ack was received.

Is it a usbc uart?

1 was mini usb from az delivery.

The other was a stm32pwr. I manuell triggered the reset with my tweezers on this one when connecting because the stm32pwr does not support dtr and cts settings.

I will try to get a logic analyzer reading tomorow.

Btw I was able to read a response with the old firmware when pin 9 was not pulled high.

Logic

Edit: The first trace is SOP2

The problem seemw to be that i am unable to send a break even so the Chip should Support it

1 Like

I was right. It seems some of the RS232 Chips are not genuine or have a driver problem. Desoldering a ESP8266 and using the base board as UART got it working.