radino/radino32 software

From InCircuit
Jump to: navigation, search

This page discripes how to install the Arduino IDE, add our radino library and install an example on a radino and a radino32.

Contents

Install Arduino IDE

  • Download the Arduino IDE 1.6.1 from arduino.cc (direct download link: https://www.arduino.cc/en/Main/OldSoftwareReleases#previous)
    • Our library currently is incompatible with later versions of the Arduino IDE.
  • Install or unzip the Arduino IDE on your computer
  • Now start Arduino IDE. If installed properly, a windows like this should open:


Arduino IDE


Install radino library

  • Download the latest radino library from Downloadpage for radino library
  • Unzip the downloaded file, after it you now have two folders (hardware and libraries) and a file (README.txt):


Arduino Files


  • Now copy both folders into your main Arduino-Sketch folder.
    This folder was specially defined during installation or has one of the following default paths (english and german):
My Documents\Arduino
C:\Documents and Settings\yourUserName\My Documents\Arduino
C:\Users\yourUserName\Documents\Arduino
Eigene Dateien\Arduino
C:\Dokumente und Einstellungen\ihrBenutzerName\Eigene Dateien\Arduino
C:\Benutzer\ihrBenutzerName\Eigene Dateien\Arduino



Install dfu-util on Debian

On Debian add one of the listed mirrors from packages.debian.org to your /etc/apt/sources.list like this

deb http://ftp.de.debian.org/debian jessie main

Now you can install dfu-util with apt-get

sudo apt-get install dfu-util

Tested with Debian 8.7

Install dfu-util on Ubuntu

UNTESTED
On Ubuntu add one of the listed mirrors from packages.ubuntu.com to your /etc/apt/sources.list like this

deb http://de.archive.ubuntu.com/ubuntu trusty main universe

Now you can install dfu-util with apt-get

sudo apt-get install dfu-util


Install driver

Driver for radino

  • When you connect Radino to your PC for the first time, a driver installation is required.
    If asked for the driver, just point the driver installer tool to the radino driver folder: "%ARDUINO_APPDATA_FOLDER%/hardware/ICT_Boards/avr/driver"


radino Driver


  • Your computer now assigns a serial port. You can see a new com port in windows device manager:


radino Port


Driver for radino32

Install virtual com port driver

  • ST offers drivers for the stm32s virtual com port (USB UART) on their website http://www.st.com. Find them by searching for virtual com port driver
    • The radino32 only activates the USB Hardware if a "serial.begin();" is contained within the uploaded sketch.
  • Direct link to the drivers page: http://www.st.com/web/en/catalog/tools/PF257938


Install bootloader driver

  • After entering the Bootloader windows will detect the new device.
  • Use the zadig driver installation tool under "%ARDUINO_APPDATA_FOLDER%/hardware/ICT_Boards/stm32l1/driver/win" to install drivers for the STM32 Bootloader.
  • Make sure within the installation tool "libusbK (v3.0.7.0)" is selected.



Wrong bootloader driver with Windows 7

  • Windows 7 usually installs the wrong driver for radino32 automatically - this guide shows how to remove the wrong driver and install the right one.


Uninstall wrong driver

  • Open the device manager
  • Within section USB-Controller look for STM Device in DFU Mode
    • If you formerly used another device from ST and installed a driver package, the device STM32_BOOTLOADER within another section might be the one to look for.
  • Right-click on that entry and choose Uninstall
5


  • In the upcoming window check the box and click OK
6


  • Now disconnect the radino32 from your PC (remove the USB connection)


Reconnect radino 32 carefully

  • Reconnect your radino32 via USB to your PC - Windows 7 will now attempt to re-install the wrong driver


  • click on the pop-up window that appears on the bottom right (don't close it)
7


  • Click on the link to cancel driver-installation
8


  • And confirm
9


  • Windows driver installation was cancelled
10



Install new driver

  • Use the zadig driver installation tool under "%ARDUINO_APPDATA_FOLDER%/hardware/ICT_Boards/stm32l1/driver/win" to install drivers for the STM32 Bootloader.
  • Make sure within the installation tool "libusbK (v3.0.7.0)" is selected.
  • Now run zadig driver installation to install radino32 driver
11


  • The installer recognizes the STM32 BOOTLOADER - now select libusbK and run Install Driver
12


  • The device-manager now shows your radino32 as STM32 BOOTLOADER within section libusbK USB Devices
13


  • The radino32 driver is now installed successfully on Windows 7


Minimal USB connection

Minimal USB connection for radino

  • The Figure shows the minimal USB setup for radino:


radino Wiring


Minimal USB connection for radino32

  • The Figure shows the minimal USB setup for radino32:


radino32 Wiring


How to upload a sketch

Upload sketch on radino

  • Open Arduino IDE and select one of the variuos available example sketches for radino
  • Choose your corresponding radino to which you want to upload the sketch:


Arduino IDE Board


  • Select the corresponding serial port


Arduino IDE Port


  • Upload your sketch


Arduino IDE Upload


Upload sketch on radino32

Set the radino32 to bootloader

  • Method 1:
    • Pull pin "BOOT_SEL" high (You can achieve this by shortening the pin with "VCC" directly besides it).
    • Apply a high pulse to pin "RESET".
    • Release pin "BOOT_SEL".
  • Method 2:
    • Disable supply voltage to the module.
    • Pull pin "BOOT_SEL" high (You can achieve this by shortening the pin with "VCC" derectly besides it).
    • Apply supply voltage.
    • Release pin "BOOT_SEL".
  • Method 3:


Upload sketch

  • Open Arduino IDE and select one of the variuos available example sketches for radino32
  • Choose radino32 USB-Load to upload the sketch to radino32 via USB:


Arduino IDE Board


  • Set the radino32 to Bootloader
  • Upload your sketch


Arduino IDE Upload



How to upload a binary file

You can upload a binary file to your radino or radino32 without using the Arduino IDE.

Upload binary on radino

You require an existing .hex file and avrdude for radino modules.

  • Get the radino bootloader com port from the device manager
    • Force the radino into bootloader by pressing reset button twice
    • Now the L-LED should fading
  • Set up your avrdude command
    • for Windows (tested with Windows 7 and avrdude 5.10)
avrdude -v -p atmega32u4 -c avr109 -P[bootloader_com_port] -b57600 -D -U flash:w:[path_to_file]\[your_hex_file]:i
    • for Linux (tested with Debian 8.7 and avrdude 6.3)
avrdude -C/[avrdude_config_path]/avrdude.conf -v -patmega32u4 -cavr109 -P[bootloader_tty_port] -b57600 -D -V -Uflash:w:[path_to_file]/[your_hex_file]:i
  • Force the radino into bootloader by pressing reset button twice, wait one or two seconds and send the avrdude command

Now your radino get flashed.

For flashing without without manually pressing the reset button, visit Nicholas Kell´s page.


Upload binary on radino32

You require an existing .bin file and and the stm32_flash_manual_win.zip file from Downloads.

  • Extract the .zip file into a new folder
  • Copy your binary file into the new folder and rename it to 'Firmware.bin'
  • With flash_serial.bat the correct com port should be set at flash_serial.bat line 3. USB should only used as power supply without connection to a PC.
  • Set the radino32 to bootlaoder
  • Run flash_serial.bat oder flash_usb.bat by double-click


Tested with Windows 7 and USB-A UART Bridge CP2102 / USB-A UART Bridge CP2104


Common problems

Installing the radino libraries via "Sketch" -> "Include Library" will not work

If you try to install the radino library in the Arduino IDE via "Sketch" -> "Include Library" they will not be placed in the right place. Instead you have to copy the folders inside the zip file directly to the main Arduino-Sketch folder.

After uploading a sketch the radino module is no longer recognized by the operating system

This happens for example if your sketch allocates too much memory or if the upload was interrupted and prevents the USB driver within the radino module to function correctly.

Make sure you selected the correct board under "Tools"->"Board".

Usually uploading a corrected sketch to the module fixes this issue. You may have to use the double reset method mentioned at the topic "Uploading a sketch through the Arduino IDE fails" below.

Uploading a sketch through the arduino IDE fails

Enable verbose output via "File->Preferences" select checkboxes "compilation" and "upload" near "Show verbose output during:".

Check verbose error messages during compilation and upload.

  • Arduino IDE successfully finds the COM port but avrdude stops after an output like
Connecting to programmer: .avrdude: Send: . [1b]
avrdude: Send: S [53]
avrdude: Recv:
  • How to fix:
    • Force the arduino into bootloader by pressing reset button twice when the arduino IDE starts scanning the COM ports.
  • Arduino IDE successfully finds the COM port but avrdude stops after an output like
avrdude: ser_send(): write error: sorry no info avail
  • How to fix:
    • Force the arduino into bootloader by pressing reset button twice when the arduino IDE starts scanning the COM ports.
  • Arduino IDE fails after scanning the COM ports with an message like
processing.app.debug.RunnerException: Couldn’t find a Leonardo on the selected port. Check that you have the correct port selected.
  • How to fix:
    • -> Force the arduino into bootloader by pressing reset button twice when avrdude starts scanning the COM ports
    • -> Disconnect the arduino from USB and reconnect after some seconds
    • -> Maybe a restart of the arduino IDE is necessary.


Windows 8 refuses to install Arduino / radino drivers

When using Windows 8, radino driver installation may be refused because of the missing digital signature.

The following tuturial describes a possible solution to install radino drivers (hardware drivers without digital signature) properly on Windows 8:

Drivers for radino module and radino bootloader will be installed separately. As mentioned above, you can force your radino to enter bootloader-mode by pressing reset button twice. Your computer will then recognize your radino bootloader.

radino & Linux

Some users experienced problems while trying to upload new sketches to their radino modules. A conflict with the ModemManager prevents succesful uploads. When entering bootloader-mode, the ModemManager immediately sends random data to the radino, which will prevent proper uploading.

  • To fix this issue, a UDEV-file can be created, located in
/etc/udev/rules.d/70-modemmanager-ignore-radino.rules

which holds the following content

ACTION!="add|change", GOTO="ignore_radino_end"
SUBSYSTEM!="usb", GOTO="ignore_radino_end"
ENV{DEVTYPE}!="usb_device",  GOTO="ignore_radino_end"

# Ignore ICT products.
ATTRS{idVendor}=="1da9", ENV{ID_MM_DEVICE_IGNORE}="1"

LABEL="ignore_radino_end"

The ModemManager will now ignore all In-Circuit products (like radino). You can now upload your sketches as usual, using Arduino IDE.

radino32 USB connection fails

Make sure you installed the proper drivers as pointed out under Install bootloader driver and Getting USB serial drivers

The USB Bootloader and USB Serial on the radino32s stm32 currently are not perfectly stable.

  • Mostly the operating system successfully recognizes the device after replugging the radino32 USB several times
  • Some USB setups showed to not work at all. Try using a different USB-Port, -Hub, -Cable combination


radino32 upload with USB-Load fails

If your upload with radino32 USB-Load fails with follow message, please update your radino library to version 25 or higher.

Error during download get_status
Personal tools