Difference between revisions of "Pinecil"
Jump to navigation
Jump to search
m (Added: Charmast C2032 power bank.) |
(Update notes based on my experience flashing IronOS 2.17 on the 2nd batch with the help of the forum.) |
||
Line 189: | Line 189: | ||
=== Manually === | === Manually === | ||
Method tested on Linux, should work on any OS which supply dfu-util 0.10+. | |||
# Use the command <code>dfu-util -V</code> to check your version. If your distro comes with 0.9 you might soft-brick your Pinecil, install the latest stable release from [http://dfu-util.sourceforge.net/ sourceforge]. | |||
# Enter the update mode. For that, unplug a barrel jack PSU if you have one plugged in. Then, plug USB cable while holding *-* button (button that's closest to USB-C port). The screen may be blank which is fine. | |||
# Check that your Pinecil is available by listing devices with <code>dfu-util -l</code> and look for device with 28e9:0189 ID. Try running with sudo if your device is not listed. If dfu-util reports <code>alt=0, name="@Internal Flash /0x08000000/128*001Kg"</code> you are fine, otherwise you need to upgrade to 0.10+, important part is <code>128*001Kg</code>, which is flash amount of blocks and block size, as a chip used in Pinecil have 128 KB of Flash with 1KB page size | |||
# Make a firmware backup: <code>dfu-util -d 28e9:0189 -a 0 -U ~/pinecil/internal.flash.stock -s 0x08000000</code> | # Make a firmware backup: <code>dfu-util -d 28e9:0189 -a 0 -U ~/pinecil/internal.flash.stock -s 0x08000000</code> | ||
## <code>28e9:0189</code> -- USB Device ID (can be obtained from <code>lsusb</code> or <code>dfu-util -l</code> but in dfu-util output it might be hard to identify the Pinecil device) | ## <code>28e9:0189</code> -- USB Device ID (can be obtained from <code>lsusb</code> or <code>dfu-util -l</code> but in dfu-util output it might be hard to identify the Pinecil device) | ||
Line 203: | Line 201: | ||
# Flash a new firmware: <code>dfu-util -d 28e9:0189 -a 0 -D Pinecil_EN.bin -s 0x08000000:mass-erase:force</code> | # Flash a new firmware: <code>dfu-util -d 28e9:0189 -a 0 -D Pinecil_EN.bin -s 0x08000000:mass-erase:force</code> | ||
## <code>-D</code> -- is a mode to Download firmware to the device (yes, that's confusing, but you indeed Upload from device and Download to device with dfu-util). That should follow the file with the firmware. Update archive from Ralim usually contains two files: <code>.hex</code> and <code>.bin</code>. One that is required - is <code>.bin</code>. <code>_EN</code> is the language code of the firmware, means that <code>_EN</code> will flash english version of firmware. | ## <code>-D</code> -- is a mode to Download firmware to the device (yes, that's confusing, but you indeed Upload from device and Download to device with dfu-util). That should follow the file with the firmware. Update archive from Ralim usually contains two files: <code>.hex</code> and <code>.bin</code>. One that is required - is <code>.bin</code>. <code>_EN</code> is the language code of the firmware, means that <code>_EN</code> will flash english version of firmware. | ||
## <code>-s 0x08000000:mass-erase:force</code> -- specified the address where to flash the file. <code>:mass-erase:force</code> is required to force-erase flash before updating firmware, otherwise you might have unpredictable results. | ## <code>-s 0x08000000:mass-erase:force</code> -- specified the address where to flash the file. <code>:mass-erase:force</code> is required to force-erase flash before updating firmware with the first batch, otherwise you might have unpredictable results. | ||
## If it fails with <code>Error during special command "MASS_ERASE" get_status</code> (as has happened with recent shipments) then use ...<code>-s 0x08000000</code> without attempting "mass-erase". | ## If it fails with <code>Error during special command "MASS_ERASE" get_status</code> (as has happened with recent shipments) then use ...<code>-s 0x08000000</code> without attempting "mass-erase". Full command example: <code>dfu-util -d 28e9:0189 -a 0 -D Pinecil_EN.bin -s 0x08000000</code> | ||
## If the hex and dfu files cannot be flashed, convert the hex file to bin with this command: <code>objcopy --input-target=ihex --output-target=binary Pinecil_EN.hex Pinecil_EN.bin</code> | |||
== Disassembly steps == | == Disassembly steps == |