Flashing P1 via JTAG/SWD but not working

Hi,

we are working on getting our product made on a larger scale.

The factory needs to flash our firmware with JTAG / SWD.

We added the header to our PCB.

When we first flashed, we did it wrong.

The PCB ‘died’ because we corrupted the Bootloader.

We then found this helpful article and re-flashed the bootloader and the System Firmware.

Now the LED is blinking blue again … just as it should on a new P1.

Now we flash our firmware (tomatotent_latest.bin) to address 0x080A0000.

The flash software says this:

But, the firmware doesn’t go onto the device.

The LED still just blinks blue like on a new P1.

Does somebody have advice on what we’re doing wrong?

This is our firmware (works fine when WiFi-flashed).
Github

Is your FW setting WiFi credentials and starting to run without WiFi connection?

When the device tries to connect to WiFi without having credentials it will end up blinking blue to allow for mobile app setup.

With fresh install, WiFi is turning off. The LED is white. And the display switches on

You don’t happen to have the USB pins exposed to run a particle serial inspect on the device I guess.

The binaries referenced in that article are ancient, so if you used them this would explain the behaviour :wink:
When the bootloader/system version you flashed don’t match your binary’s requirements the device would want to auto-update and hence try to connect to WiFi falling into LM due to missing WiFi creds.

For future revisions it might be worth considering to add a footprint for a USB connector for testing but have it unpopulated (maybe even solder masked) for production run - the space seems to be there.

Yes, that would explain it. Thank you!

I will use the current Binaries here.

The addresses remain the same, right? ... e.g. system-part(...).bin to 0x08020000.

I will add a USB-C, thanks for the tip

Yup, the memory map hasn’t changed since.

1 Like

Hi,

we just did one more attempt at flashing.

We did these 4 steps:

Address: 0x08000000
https://github.com/particle-iot/device-os/releases/download/v2.0.0/p1-bootloader@2.0.0+lto.bin

Address: 0x08020000
https://github.com/particle-iot/device-os/releases/download/v2.0.0/p1-system-part1@2.0.0.bin

Address: 0x08060000
https://github.com/particle-iot/device-os/releases/download/v2.0.0/p1-system-part2@2.0.0.bin

Address 0x08080000
p1_firmware_1608098582079.bin (compiled with CLI 2.9.1).

Steps 1,2 and 3 work well.

But then on Step 4 this happens:

Can you see anything wrong?

Did you really try to flash the application to 0x08080000?
Application firmware starts at 0x080A0000
https://docs.particle.io/datasheets/wi-fi/p1-datasheet/#memory-map-modular-firmware-default-

You already had that right in your original post

thanks

:expressionless:

Here's how that turned out.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.