Cloud Flashing not working on TrackerOne 402M

I have a problem flashing TrackerOne 402M over the cloud.

It flashes with DFU Mode/USB but fails when I do it over the cloud.
I also have other Boron devices that flash just fine. I'm lost, anyone?

FYI: I completely removed Workbench and reinstalled it from scratch but I can't get it to work.
Everything used to work for a few years until today.

Thank you.

What state is the device in when you are flashing it?

Do you have sleep mode enabled in the console? That will prevent being able to flash from Workbench.

Do you have the device claimed to your developer account and marked as development in the console? This is required to flash the device directly from Workbench. This is not the default configuration; the default is an unclaimed product device which works if you upload the firmware to the console, but not directly from Workbench or the CLI.

If you open the event log for the product the Tracker is in, does it show anything?

Hi Rick, thank you for your reply.

I have been using 1 tracker for almost 2 years and never had problems flashing it over the cloud.
Recently I added another tracker and I can't get any of them to work.

Both trackers are claimed, they show me as an owner and they are both marked for development.
Sleep Mode is Disabled in Asset Tracking Settings. Both devices are Online when I flash them, I can see the activity in Events, I'm able to run built in the function that includes: {"cmd":"enter_shipping"} {"cmd":"get_loc"} {"cmd":"reset"}

I tried older Firmwares, v16 and v17, currently flashed with v18, and tried using different Device OS like 3.2.0, 4.0.0, 5.0.0 etc. I can flash the trackers with Workbench locally using USB but I can't get the Cloud Flash to work, I even tried Cloud Compiling and nothing works.

I have few other devices, like Borons, Argons and they all flash just fine with Cloud.

I also tried using a different computer, Windows or Mac, they both have the same problem, won't flash.

Here are some Logs pulled from Workbench:

Building c file: lib/bmi270/src/Bosch/bmi270.c
Invoking: ARM GCC C Compiler
mkdir -p ../build/target/user/platform-26-mbmi270/src/Bosch/
arm-none-eabi-gcc -DMCU_DEVICE -DnRF52840 -DNRF52840_XXAA -DPLATFORM_THREADING=1 -DPLATFORM_ID=26 -DPLATFORM_NAME=tracker -DPLATFORM_GEN=3 -DUSBD_VID_PARTICLE=0x2B04 -DUSBD_PID_DFU=0xD01A -DUSBD_PID_CDC=0xC01A -DSPARK_PLATFORM -fno-builtin-puts -fno-builtin-printf -Wl,--wrap=puts -Wl,--wrap=printf -g3 -gdwarf-2 -Os -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DARM_CPU_CORTEX_M4 --specs=nano.specs -DINCLUDE_PLATFORM=1 -DSOFTDEVICE_PRESENT=1 -DS140 -DPRODUCT_ID=26 -DPRODUCT_FIRMWARE_VERSION=65535 -D_WIZCHIP_=W5500 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DLFS_CONFIG=lfs_config.h -DSYSTEM_VERSION_STRING=5.3.2 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../third_party/nanopb/nanopb -I../communication/inc -I../hal/inc -I../hal/shared -I../hal/src/tracker -I../hal/network/lwip/cellular -I../hal/network/lwip/esp
Error: Command failed with exit code 1: /Users/codev3rt/.vscode/extensions/particle.particle-vscode-core-1.16.2/src/cli/bin/darwin/amd64/particle cloud flash trackerone402m --target 5.3.2 --no-update-check
Targeting version: 5.3.2
attempting to flash firmware to your device trackerone402m

Processing  lib/sensirion/examples/sht/usage.ino
Processing  lib/sensirion/examples/sts/usage.ino
make -C ../modules/tracker/user-part all
make[1]: Entering directory `/firmware/modules/tracker/user-part'

mkdir -p target/
make -f ../../../modules/shared/nRF52840/build_linker_script.mk PREBUILD=1
make[2]: Entering directory `/firmware/modules/tracker/user-part'
Creating target/platform_user_ram.ld ...
make[2]: Leaving directory `/firmware/modules/tracker/user-part'

make -C ../../../user 
make[2]: Entering directory `/firmware/user'
Building c file: lib/bmi270/src/Bosch/bmi2.c
Invoking: ARM GCC C Compiler
mkdir -p ../build/target/user/platform-26-mbmi270/src/Bosch/
arm-none-eabi-gcc -DMCU_DEVICE -DnRF52840 -DNRF52840_XXAA -DPLATFORM_THREADING=1 -DPLATFORM_ID=26 -DPLATFORM_NAME=tracker -DPLATFORM_GEN=3 -DUSBD_VID_PARTICLE=0x2B04 -DUSBD_PID_DFU=0xD01A -DUSBD_PID_CDC=0xC01A -DSPARK_PLATFORM -fno-builtin-puts -fno-builtin-printf -Wl,--wrap=puts -Wl,--wrap=printf -g3 -gdwarf-2 -Os -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DARM_CPU_CORTEX_M4 --specs=nano.specs -DINCLUDE_PLATFORM=1 -DSOFTDEVICE_PRESENT=1 -DS140 -DPRODUCT_ID=26 -DPRODUCT_FIRMWARE_VERSION=65535 -D_WIZCHIP_=W5500 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DLFS_CONFIG=lfs_config.h -DSYSTEM_VERSION_STRING=5.3.2 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../third_party/nanopb/nanopb -I../communication/inc -I../hal/inc -I../hal/shared -I../hal/src/tracker -I../hal/network/lwip/cellular -I../hal/network/lwip/esp32 -I../hal/network/ncp/wifi -I../hal/src/nRF52840 -I../hal/src/armv7 -I../hal/src/nRF52840 -I../hal/src/nRF52840/lwip -I../hal/src/nRF52840/freertos -I../hal/src/nRF52840/mbedtls -I../hal/src/nRF52840/littlefs -I../hal -I../hal/src/nRF52840/posix -I../hal/network -I../hal/network/api -I../hal/network/lwip -I../hal/network/lwip/posix -I../hal/network/lwip/wiznet -I../hal/network/ncp -I../hal/network/ncp/at_parser -I../hal/network/util -I../third_party/lwip/lwip/src/include -I../third_party/freertos/freertos/FreeRTOS/Source/include -I../third_party/nrf5_sdk/nrf5_sdk/external/freertos/portable/GCC/nrf52 -I../third_party/nrf5_sdk/nrf5_sdk/external/freertos/portable/CMSIS/nrf52 -I../third_party/wiznet_driver/wiznet_driver/Ethernet -I../gsm0710muxer/gsm0710muxer/include -I../platform/shared/inc -I../third_party/nrf5_sdk -I../third_party/nrf5_sdk/nrf5_sdk/components/toolchain/cmsis/include -I../third_party/nrf5_sdk/nrf5_sdk/modules/nrfx -I../third_party/nrf5_sdk/nrf5_sdk/modules/nrfx/drivers -I../third_party/nrf5_sdk/nrf5_sdk/modules/nrfx/drivers/include -I../third_party/nrf5_sdk/nrf5_sdk/modules/nrfx/hal -I../third_party/nrf5_sdk/nrf5_sdk/modules/nrfx/mdk -I../third_party/nrf5_sdk/nrf5_sdk/modules/nrfx/hal -I../third_party/nrf5_sdk/nrf5_sdk/modules/nrfx/drivers/src/prs -I../third_party/nrf5_sdk/nrf5_sdk/components/libraries/util -I../third_party/nrf5_sdk/nrf5_sdk/components/softdevice/s140/headers -I../third_party/nrf5_sdk/nrf5_sdk/components/softdevice/s140/headers/nrf52 -I../third_party/nrf5_sdk/nrf5_sdk/components/softdevice/common -I../third_party/nrf5_sdk/nrf5_sdk/components/softdevice/mbr/nrf52840/headers -I../third_party/nrf5_sdk/nrf5_sdk/components/libraries/fstorage -I../third_party/nrf5_sdk/nrf5_sdk/components/libraries/experimental_section_vars -I../third_party/nrf5_sdk/nrf5_sdk/components/libraries/atomic -I../third_party/nrf5_sdk/nrf5_sdk/components/libraries/crc32 -I../third_party/nrf5_sdk/nrf5_sdk/integration/nrfx/legacy -I../third_party/nrf5_sdk/nrf5_sdk/components/libraries/delay -I../third_party/nrf5_sdk/nrf5_sdk/components/libraries/log -I../third_party/nrf5_sdk/nrf5_sdk/components/libraries/log -I../third_party/nrf5_sdk/nrf5_sdk/components/libraries/log/src -I../third_party/nrf5_sdk/nrf5_sdk/components/libraries/experimental_section_vars -I../third_party/nrf5_sdk/nrf5_sdk/components/libraries/atomic -I../third_party/nrf5_sdk/nrf5_sdk/components/libraries/delay -I../third_party/nrf5_sdk/nrf5_sdk/components/libraries/queue -I../third_party/nrf5_sdk/nrf5_sdk/components/softdevice/common -I../third_party/nrf5_sdk/nrf5_sdk/components/softdevice/s140 -I../third_party/nrf5_sdk/nrf5_sdk/components/softdevice/s140/headers -I../third_party/nrf5_sdk/nrf5_sdk/components/softdevice/s140/headers/nrf52 -I../third_party/nrf5_sdk/nrf5_sdk/components/libraries/fifo -I../third_party/nrf5_sdk/nrf5_sdk/components/libraries/atomic_fifo -I../third_party/nrf5_sdk/nrf5_sdk/components/libraries/strerror -I../third_party/nrf5_sdk/nrf5_sdk/components/libraries/fstorage -I../third_party/nrf5_sdk/nrf5_sdk/components/libraries/atomic_flags -I../third_party/nrf5_sdk/nrf5_sdk/components/libraries/usbd -I../third_party/nrf5_sdk/nrf5_sdk/components/libraries/usbd/class/cdc -I../third_party/nrf5_sdk/nrf5_sdk/components/libraries/usbd/class/cdc/acm -I../third_party/nrf5_sdk/nrf5_sdk/components/ble/common -I../third_party/nrf5_sdk/nrf5_sdk/components/ble/nrf_ble_gatt -I../third_party/nrf5_sdk/nrf5_sdk/components/ble/ble_advertising -I../third_party/nrf5_sdk/nrf5_sdk/components/nfc/t2t_lib -I../third_party/nrf5_sdk/nrf5_sdk/components/nfc/platform -I../third_party/nrf5_sdk/nrf5_sdk/components/nfc/ndef/generic/message -I../third_party/nrf5_sdk/nrf5_sdk/components/nfc/ndef/generic/record -I../third_party/nrf5_sdk/nrf5_sdk/components/nfc/ndef/lauchapp -I../third_party/nrf5_sdk/nrf5_sdk/components/nfc/ndef/text -I../third_party/nrf5_sdk/nrf5_sdk/components/nfc/ndef/uri -I../third_party/nrf5_sdk/nrf5_sdk/external/nrf_cc310/include -I../third_party/nrf5_sdk/nrf5_sdk/external/utf_converter -I../third_party/littlefs/littlefs -I../third_party/miniz/miniz -I../platform/MCU/nRF52840/inc -I../dynalib/inc -Isrc -I./libraries -Ilib/bmi160/src -Ilib/sensirion/src -Ilib/background-publish/src -Ilib/gps-nmea-parser/src -Ilib/gps-ublox/src -Ilib/fw-config-service/src -Ilib/particle-adp8866/src -Ilib/gps-quectel/src -Ilib/debounce-switch/src -Ilib/Thermistor/src -Ilib/model_gauge/src -Ilib/geofence/src -Ilib/particle-led/src -Ilib/bmi270/src -Ilib/can-mcp25x/src -Ilib/disk-queue/src -Ilib/memfault/src -I. -MD -MP -MF ../build/target/user/platform-26-mbmi270/src/Bosch/bmi2.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -fmessage-length=0 -Wno-error=deprecated-declarations -Wno-error=unused-parameter -Wno-deprecated-declarations  -Wimplicit-fallthrough=2 -Wno-expansion-to-defined -Wno-cast-function-type -Wno-unused-parameter -Wno-error=type-limits -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -Werror=return-type -Wundef -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DSPARK_PLATFORM_NET=QUECTEL -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc  -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DUSER_FIRMWARE_IMAGE_SIZE=0x40000 -DUSER_FIRMWARE_IMAGE_LOCATION=0xB4000 -DMODULAR_FIRMWARE=1 -DMODULE_VERSION=6 -DMODULE_FUNCTION=5 -DMODULE_INDEX=2 -DMODULE_DEPENDENCY=4,1,5302 -DMODULE_DEPENDENCY2=0,0,0 -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\""  -flto -ffat-lto-objects -DPARTICLE_COMPILE_LTO_FAT -std=gnu11 -Wno-pointer-sign -c -o ../build/target/user/platform-26-mbmi270/src/Bosch/bmi2.o lib/bmi270/src/Bosch/bmi2.c

Building c file: lib/bmi270/src/Bosch/bmi270.c
Invoking: ARM GCC C Compiler
mkdir -p ../build/target/user/platform-26-mbmi270/src/Bosch/
arm-none-eabi-gcc -DMCU_DEVICE -DnRF52840 -DNRF52840_XXAA -DPLATFORM_THREADING=1 -DPLATFORM_ID=26 -DPLATFORM_NAME=tracker -DPLATFORM_GEN=3 -DUSBD_VID_PARTICLE=0x2B04 -DUSBD_PID_DFU=0xD01A -DUSBD_PID_CDC=0xC01A -DSPARK_PLATFORM -fno-builtin-puts -fno-builtin-printf -Wl,--wrap=puts -Wl,--wrap=printf -g3 -gdwarf-2 -Os -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DARM_CPU_CORTEX_M4 --specs=nano.specs -DINCLUDE_PLATFORM=1 -DSOFTDEVICE_PRESENT=1 -DS140 -DPRODUCT_ID=26 -DPRODUCT_FIRMWARE_VERSION=65535 -D_WIZCHIP_=W5500 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DLFS_CONFIG=lfs_config.h -DSYSTEM_VERSION_STRING=5.3.2 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../third_party/nanopb/nanopb -I../communication/inc -I../hal/inc -I../hal/shared -I../hal/src/tracker -I../hal/network/lwip/cellular -I../hal/network/lwip/esp
	at makeError (/Users/codev3rt/.vscode/extensions/particle.particle-vscode-core-1.16.2/node_modules/execa/lib/error.js:59:11)
	at handlePromise (/Users/codev3rt/.vscode/extensions/particle.particle-vscode-core-1.16.2/node_modules/execa/index.js:114:26)
	at process.processTicksAndRejections (node:internal/process/task_queues:96:5)

- - - -

Thank you for that information. Now it makes more sense. There are a bunch of possible issues here:

  • Tracker Edge does not currently build targeting 4.x or 5.x, unless you modify the source.
  • Tracker Edge v18 cannot be built using the cloud compiler.
  • Particle: Cloud Flash actually does a cloud compile, then a flash, and cloud compile does not work.
  • There is no option to build locally and flash by the cloud from the command palette, but you can do so from the Particle CLI after building locally.
  • That error isn't actually the flash failing, it's the cloud compile failing with no error, which isn't very helpful, but that's what is happening, I think.

I've been going crazy for the last couple of days, I can't get things to work, everything used to work just fine.

Can you point me in the right direction?

Here are my latest steps:

  1. Clone repository with; git clone git@github.com:particle-iot/tracker-edge.git && cd ./tracker-edge
  2. Init & Update Submodules with; git submodule update --init --recursive
  3. Run the Particle: Import Project and open file: project.properties
  4. Then I open "main.cpp" file and Locally Compile it as it is or with some minor code changes.

It didn't compile with OS v3.2.0 due to errors
It didn't compile with OS v3.3.0 due to errors
It worked just fine with OS v4.1.0 :face_with_peeking_eye:

So here is where I'm getting lost, according to https://github.com/particle-iot/tracker-edge/releases/tag/v18 - it should work with OS v3.2.0 or greater

but since we can't Cloud Flash v18, how do I download Tracker Edge Firmware v16 or v17?

I tried by going to https://github.com/particle-iot/tracker-edge/releases/tag/v17 - and downloading "source code (zip)" but the library files are missing.... so I tried re-using library files from that repository above but I was getting more errors.

So what's the proper way of downloading Tracker Edge Firmware v16 or v17 with library files so it compiles properly and which OS should I follow? Can you walk me through with simple steps?

When I was using Workbench I noticed sometimes the program asked me to update OS claiming I have an outdated edition.

Hopefully, it will help me resolve Flashing with Cloud since I can't get it to work on macOS/Windows and Debian got me some additional "crc32 tool is not found" error :frowning:

I'm using Tracker One 402M and 404M

Thank you.

Make sure you open the top level tracker-edge directory. The project.properties should be at the top level of the directory tree in Workbench. If you were actually opening main.cpp, that won't work.

What are the actual errors?

Okay, I think we are going in circles.

Can you explain to me how to obtain a working version of Firmware v17 that works with Tracker One?

This is my procedure for getting Firmware v18:

git clone https://github.com/particle-iot/tracker-edge.git
mv tracker-edge tracker-edge-v18
cd tracker-edge-v18
git submodule init
git checkout release/v18
git submodule update --recursive

After that, I import the project with project.properties and I can compile main.cpp with Device OS v4.1.0 and it works. I cannot flash it with Cloud but at least it compiles properly.

How do I obtain a working version of Firmware v17 that will compile and flash over the cloud?
I tried this method of getting v17 but when I try to compile with various Device OS
including v3.3.0, v4.0.0 it just doesn't work:

git clone https://github.com/particle-iot/tracker-edge.git
mv tracker-edge tracker-edge-v17
cd tracker-edge-v17
git submodule init
git checkout release/v17
git submodule update --recursive

I already have an older Firmware v15 that I got in 2021 and I can flash it over the Cloud without any problems. I just wanted to get Firmware v17 since it has some fixes and updates.

Thank you.

I followed your instructions for checking out Tracker Edge v17 and they worked properly.

I was able to cloud compile it for Device OS 3.3.1. Using Particle: Configure Project for Device I set 3.3.1 for Tracker. I then used Particle: Cloud Flash and it flashed the device successfully.

Switching to Device OS 4.1.0 using Particle: Configure Project for Device. Using Particle: Cloud Compile this failed with this error:

network/util -I../third_party/lwip/lwip/src/include -I../third_party/freertos/freertos/Free
    at makeError (/Users/rickk/.vscode/extensions/particle.particle-vscode-core-1.16.3/node_modules/execa/lib/error.js:59:11)
    at handlePromise (/Users/rickk/.vscode/extensions/particle.particle-vscode-core-1.16.3/node_modules/execa/index.js:114:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)

Switching instead of using Particle: Compile Application (local) indicates the actual error:

Creating /Users/rickk/Documents/src/TestParticle/edge17-test/tracker-edge-v17/target/4.1.0/tracker/platform_user_ram.ld ...
/Users/rickk/Documents/src/TestParticle/edge17-test/tracker-edge-v17//src/main.cpp:25:11: error: The PRODUCT_ID macro must be removed from your firmware source code. The same compiled firmware binary may be used in multiple products that share the same platform and functionality.
   25 | PRODUCT_ID(TRACKER_PRODUCT_ID);
      |           ^~~~~~~~~~~~~~~~~~~~~                                                                                                                                                                    
make[3]: *** [../build/target/user/platform-26-m/tracker-edge-v17/src/main.o] Error 1
make[2]: *** [user] Error 2
make[1]: *** [modules/tracker/user-part] Error 2
make: *** [compile-user] Error 2

When using Tracker Edge v17 or earlier with 4.0.0 later (including 5.x) you need to comment out that line. After doing that I could cloud compile v17 successfully. I then used Particle: Cloud Flash and it flashed the device successfully OTA.

After commenting out the PRODUCT_ID line, I also tested cloud compiling Tracker Edge v17 for 5.3.2. That failed with an unhelpful error. The actual error is:

/Users/rickk/Documents/src/TestParticle/edge17-test/tracker-edge-v17/lib/can-mcp25x/src/mcp_can.cpp:194:25: error: 'HAL_Pin_Map' was not declared in this scope; did you mean 'Hal_Pin_Map'?
  194 |     Hal_Pin_Type type = HAL_Pin_Map()[_pin].type;
      |                         ^~~~~~~~~~~
      |                         Hal_Pin_Map
make[3]: *** [../build/target/user/platform-26-m/tracker-edge-v17/can-mcp25x/src/mcp_can.o] Error 1
make[2]: *** [user] Error 2
make[1]: *** [modules/tracker/user-part] Error 2
make: *** [compile-user] Error 2

While this can be fixed, it's best to just avoid using Tracker Edge v17 on 5.x and instead use v18 on 5.x, which fixes both problems above, but can only compile locally.

Even when compile locally, you can still flash a device OTA. Use Particle: Compile Application (local). Then use Particle: Launch CLI. Then issue a command like:

particle flash <device-name> target/4.1.0/tracker/tracker-edge-v17.bin 

Replace the version number as necessary. Note that you cannot use Particle: Cloud Flash because that does a cloud compile. The command above flashes the binary that you built locally.

It is now possible to cloud compile Tracker Edge v18. This means that Particle: Cloud Flash will now work, once you complete the steps outlined here.

3 Likes

The include file is now in the tracker-edge repo.

1 Like