(TECH) General Flashing Guide

Moderators: lily.li, violet, jessie, chao.zhang

Post Reply
dbelam
Elementary-1
Elementary-1
Posts: 157
Joined: Wed Feb 03, 2016 2:59 am

(TECH) General Flashing Guide

Post by dbelam » Sun Mar 06, 2016 12:06 am

After several people wanted to build and flash firmwares of the modules and failed, I would like to write a how-to for flashing.

Main RePhone GSM+BLE module
That can be found on the wiki, but personal experience:
- get the flasher tool and the chosen build (.vxp) bundled with the "initial folder" (https://github.com/WayenWeng/RePhone_Cr ... 0Kit%20VXP)
- unplug-reattach battery on the RePhone module
- connect it to the PC (and if the drivers were not installed yet, install everything needed to recognize the module)
- start the flashing procedure
After this, don't wonder that the RePhone is not starting, you just wiped everything!
- let the PC recognize the RePhone module as an USB disk
- copy the "initial folder" (linked above, and copy the autostart.txt and MRE folder to the root of the disk)
DONE!

Xadow Duino
It's an Arduino-based module - that means the built-in ATmega32 is pre-loaded with the Arduino bootloader. So for flashing you need to install Arduino IDE from https://www.arduino.cc/en/Main/Software
and that contains most of the needed files.
Also it's not a standard Arduino module, so install the driver: https://github.com/Seeed-Studio/Signed_ ... ial_Driver
It's still not a standard Arduino module, so a library is needed: download the lib and copy the seeeduino folder to the Arduino/hardware folder. https://github.com/freespace/Files_For_Seeed_Main_Board
Last but not least: get the project .ino file. https://github.com/WayenWeng/Xadow_Duino
Connect the board via USB, open the .ino with the Arduino IDE, select the board type (Seeduino Xadow) and its port, and finally hit the "Upload" button ( -> ). If everything was OK, the compiling and flashing will be successful with the happy "Done uploading" message.
But 2 libs are not included in the very default Arduino setup, so if you have a clean install, don't forget to add the TimerOne and NeoPixel libraries. Just download the 2 zip, go to Sketch --> Include Library --> Add .ZIP Library and add the 2 newly downloaded .zips. The 2 libs are here:
https://code.google.com/archive/p/ardui ... /downloads
https://github.com/adafruit/Adafruit_NeoPixel

Xadow LED 5X7 and Xadow Basic Sensors
Both of the modules have an ARM Cortex M0 microcontroller from ST - STM32F030F4.
The project is made in Keil uVision 5 - download link for the IDE: http://www2.keil.com/mdk5
Library: http://www.st.com/web/en/catalog/tools/PF257884
Also, a JTAG is needed to flash firmware on the Xadow modules - inexpensive ST-Link v2 debuggers are on the market, some are even detachable from cheap devboards (like mine). But my debugger needed a new firmware before I could flash the new firmware from Keil, so download the tool and update the debugger's firmware: http://www.st.com/web/en/catalog/tools/PF258168
After fixing imports and setting the debugger to ST-Link in Keil, I presed F7 to build the target, then F8 to flash. Done!

Xadow GPS v2 and Xadow NFC v2
These modules use Kinetis MCU-s, needing Kinetis Design Studio and KSDK, download here: https://www.element14.com/community/com ... sor-expert
Also this will need a JTAG to flash the firmware. Details later.

Accessing the debug port pins
The Xadow modules have a 5-pin SWD debug port - so it's easy to reflash the professional way.
The problem is, that the pins are SMD pads, and the biggest problem is that they are really small.
DON'T TRY to solder anyting heavier than thin wires! I almost ripped one pad with just small force.
But most cases soldering is unneccessary, since test clamps / test clips can connect or that small time, and it's clean! Sadly, only the slim test clips have enough space, but beware: they may short some connections on the other side, always check! Also, the clips must be bent 90° first. The pictures show:
1.jpg
2.jpg
3.jpg
Last edited by dbelam on Mon Mar 07, 2016 4:41 am, edited 4 times in total.

getmemot
Pre-kindergarten
Pre-kindergarten
Posts: 20
Joined: Tue Feb 09, 2016 10:28 pm

Re: (TECH) General Flashing Guide

Post by getmemot » Sun Mar 06, 2016 3:30 am

So what is this for?
https://github.com/sthaugen/Rephone-KL02-swd

does this not show you how to update the GPS v2 firmware?

dbelam
Elementary-1
Elementary-1
Posts: 157
Joined: Wed Feb 03, 2016 2:59 am

Re: (TECH) General Flashing Guide

Post by dbelam » Sun Mar 06, 2016 5:03 pm

No, just haven't tried it yet.

Post Reply