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 and radino library

Install Arduino IDE 1.8.3 and radino library via Boards Manager

  • Download the Arduino IDE 1.8.3 from arduino.cc (direct download link: https://www.arduino.cc/en/Main/Software)
    • Our Boards Manager file is tested with Arduino IDE 1.8.3
  • Install or unzip the Arduino IDE on your computer
  • Now start Arduino IDE. If installed properly, a windows like this should open:


Arduino IDE



  • For the Arduino Boards Manager our library URL needs copied to Additional Boards Manager URLs option at the Arduino IDE preferences.
http://library.radino.cc/Arduino_1_8/package_radino_radino32_index.json

Arduino IDE 1.8 Preferences Arduino IDE 1.8 Preferences


  • Open the Arduino Boards Manager, select the Category Contributed and install your required library

Arduino IDE 1.8 Boards Manager Arduino IDE 1.8 Boards Manager





Install Arduino IDE 1.6.1 and radino library

  • 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


  • 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 macOS

The dfu-util homepage shows two ways for installing dfu-util on macOS. We prefere the way with Homebrew. Open the terminal and type the command from Homebrew.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Follow the instructions and install Homebrew. Afterwards dfu-util can be install via Homwbrew.

brew install dfu-util


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 stretch 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


On Lubuntu 17.04 dfu-util can be installed directly with apt-get (tested)

sudo apt-get install dfu-util


Install driver

Driver for radino

Driver for radino at Windows 7

  • 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" or radino_driver.zip


radino Driver


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


radino Port


Driver for radino at Windows 10

  • Windows 10 will install the correct driver automatically (tested with Windows 10 Version 1607 (Build 14393.1198)).


radino Driver

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

Install bootloader driver at Windows 7

  • 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" or radino32_driver.zip 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" or radino32_driver.zip 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


Install bootloader driver at Windows 10

  • After entering the Bootloader windows will detect the new device and installs the wrong driver for radino32 automatically.
1


  • Use the zadig driver installation tool under radino32_driver.zip to install the correct drivers for the STM32 Bootloader.
2


  • Select "List all Devices" under Options to show all connected USB devices.
3


  • Select STM32 BOOTLOADER
    • zadig will display the wrong driver for the STM32 BOOTLOADER.
4


  • Make sure within the installation tool "libusbK (v3.0.7.0)" is selected.
5


  • Click on "Replace Driver" to install the correct driver.
    • After installation the correct driver is displayed.

6 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


  • At Linux it can lead to problems with the 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.


If an upload fails with follow output:

[...]
Caused by: processing.app.SerialException: Fehler beim Ansprechen des seriellen Ports "/dev/ttyACM0".
[...]
Caused by: jssc.SerialPortException: Port name - /dev/ttyACM0; Method name - openPort(); Exception type - Permission denied.
[...]

Follow command need to be execute.

sudo adduser <username> dialout

After a relog the upload should be work.

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