Complete tutorial of MMDVM Firmware installation

Test program of the Arduino Due

In fact, before installing the software MMDVM, we have yet to achieve a small change in the configuration of the Arduino editor.

Amendement of IDE configuration

A specified in the file Built.txt, changes are needed on the definition of an Arduino software configuration file.

Open the directory C:\Users\User\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.9

For other platforms, reported directly to the instruction file Built.txt.

Make a backup copy of the file platform.txt

Edit the file with a platform.txt programming editor (for example Notepad + ou SublimeText)

The following line must be changed (in my case, line is 80th)

## Combine gc-sections, archives, and objects
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" -mcpu={build.mcu} -mthumb {compiler.c.elf.flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--start-group {compiler.combine.flags} {object_files} "{build.variant.path}/{build.variant_system_lib}" "{build.path}/{archive_file}" -Wl,--end-group -lm -gcc
## Combine gc-sections, archives, and objects
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" -mcpu={build.mcu} -mthumb {compiler.c.elf.flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--start-group {compiler.combine.flags} {object_files} "{build.variant.path}/{build.variant_system_lib}" "{build.system.path}/CMSIS/CMSIS/Lib/ARM/arm_cortexM3l_math.lib" "{build.path}/{archive_file}" -Wl,--end-group -lm -gcc

This is equivalent to practically added at the end of the line the following part


Indeed, if one does not realize the change described in Built.txt, a following compile error may appear: :

sketch\DMRTX.cpp.o: In function `CDMRTX::writeByte(unsigned char, unsigned char)':

sketch/DMRTX.cpp:299: undefined reference to `arm_fir_fast_q15'

sketch\DStarTX.cpp.o: In function `CDStarTX::writeByte(unsigned char)':

sketch/DStarTX.cpp:453: undefined reference to `arm_fir_fast_q15'

sketch\IO.cpp.o: In function `CIO::process()':

sketch/IO.cpp:344: undefined reference to `arm_fir_fast_q15'

sketch/IO.cpp:351: undefined reference to `arm_fir_fast_q15'

sketch/IO.cpp:362: undefined reference to `arm_fir_fast_q15'

sketch\IO.cpp.o:sketch/IO.cpp:369: more undefined references to `arm_fir_fast_q15' follow

collect2.exe: error: ld returned 1 exit status

exit status 1
Erreur de compilation pour la carte Arduino Due (Programming Port)

After installing the software for charging via USB Arduino Due and making this modification platform.txt file, we can now take care of the load Jonathan G4KLX software on the Arduino Due. This is done in three stages.

Downloading MMDVM software

  1. The firmware (software) Arduino MMDVM be downloaded on the platform github
  2. Download the ZIP from the button located at the top right.
  3. Unzip the file in a directory.
  4. Rename directory in MMDVM

Configure the MMDVM software

Open then file MMDVM/MMDVM.ino (by double click on the file from a windows explorer, the Arduino Editor will directly start)

Click on “Config.h” tab.

Edit the following for the operation matches the platinum MMDVM I realized (PCB printed “PCB designed by F5UII 07.2016”) . Save the file Config.h (Ctrl-S or File/Save)

  1. TCXO oscillator is a 12 Mhz
  2. The board is inspired by SP8NTH (the line #define  ARDUINO_DUE_ZUM_V10 is commented with //  signs at the beginning of the line). We delete // in front of  #define  ARDUINO_DUE_NTH
     *   Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
     *   This program is free software; you can redistribute it and/or modify
     *   it under the terms of the GNU General Public License as published by
     *   the Free Software Foundation; either version 2 of the License, or
     *   (at your option) any later version.
     *   This program is distributed in the hope that it will be useful,
     *   but WITHOUT ANY WARRANTY; without even the implied warranty of
     *   GNU General Public License for more details.
     *   You should have received a copy of the GNU General Public License
     *   along with this program; if not, write to the Free Software
     *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    #if !defined(CONFIG_H)
    #define  CONFIG_H
    // Allow for the use of high quality external clock oscillators
    // The number is the frequency of the oscillator in Hertz.
    // For 12 MHz
    #define EXTERNAL_OSC 12000000
    // For 14.4 MHz
    // #define EXTERNAL_OSC 14400000
    // For 19.2 MHz
    // #define EXTERNAL_OSC 19200000
    // Allow the use of the COS line to lockout the modem
    // #define USE_COS_AS_LOCKOUT
    // Use pins to output the current mode
    // #define ARDUINO_MODE_PINS
    // For the original Arduino Due pin layout
    // #define  ARDUINO_DUE_PAPA
    // For the ZUM Board V1.0 pin layout
    // #define  ARDUINO_DUE_ZUM_V10
    // For the SP8NTH board
    #define  ARDUINO_DUE_NTH
    // To use wider C4FSK filters for DMR and System Fusion on transmit
    // #define WIDE_C4FSK_FILTERS_TX
    // To use wider C4FSK filters for DMR and System Fusion on receive
    // #define WIDE_C4FSK_FILTERS_RX

Compile and load MMDVM on the Arduino Due

  1. Select the first tab ‘MMDVM’ by a click
  2. Click on the icon V for Check. The compiling of the MMDVM software starts . Downwards window indicates progress.
  3. If the compilation is completed without error, you can load the software into the Arduino Due, by clicking the arrow Flèche Arduino Compilation
    Le croquis utilise 53 304 octets (10%) de l'espace de stockage de programmes. Le maximum est de 524 288 octets.
    Atmel SMART device 0x285e0a60 found
    Erase flash
    done in 0.036 seconds
    Write 55924 bytes to flash (219 pages)
    [                              ] 0% (0/219 pages)
    [==                            ] 9% (21/219 pages)
    [=====                         ] 19% (42/219 pages)
    [========                      ] 28% (63/219 pages)
    [===========                   ] 38% (84/219 pages)
    [==============                ] 47% (105/219 pages)
    [=================             ] 57% (126/219 pages)
    [====================          ] 67% (147/219 pages)
    [=======================       ] 76% (168/219 pages)
    [=========================     ] 86% (189/219 pages)
    [============================  ] 95% (210/219 pages)
    [==============================] 100% (219/219 pages)
    done in 11.677 seconds
    Verify 55924 bytes of flash
    [                              ] 0% (0/219 pages)
    [==                            ] 9% (21/219 pages)
    [=====                         ] 19% (42/219 pages)
    [========                      ] 28% (63/219 pages)
    [===========                   ] 38% (84/219 pages)
    [==============                ] 47% (105/219 pages)
    [=================             ] 57% (126/219 pages)
    [====================          ] 67% (147/219 pages)
    [=======================       ] 76% (168/219 pages)
    [=========================     ] 86% (189/219 pages)
    [============================  ] 95% (210/219 pages)
    [==============================] 100% (219/219 pages)
    Verify successful
    done in 11.246 seconds
    Set boot flash true
    CPU reset.

    After that

    Pressing the reset button, the L LED of the Arduino start blinking. The MMDVM firmware is now ready .

    The following consists of installing on a second MMDVMHost software on a Raspberry Pi. This will be detailed by a second article, which will also present the adjustments to do on the MMDVM shield low-frequency filters installed on the Arduino.

    Feel free to post your questions or comments by intermediaries comment field at the bottom of article.

If you would be interested to participate in a possible future new grouped order (MMDVM board, SvxLink Card), leave your email below to be reported!

13 thoughts on “Complete tutorial of MMDVM Firmware installation

  1. The first grouped order is about to be delivered. If you have an interest for any other grouped order, you can be alerted by email by adding your email to the site
    Be alert of a new MMDVM kit grouped order

  2. Merci F5UII pour toutes ces explications et votre travail sur le sujet. Une question à propos de ce relais MMDVM à base de ARDUINO DUE.
    Est-il possible de la faire fonctionner ce relais en DMR autonome sans Rapberry PI ?
    Cette question car nous avons un projet à MARSEILLE sur un site dépourvu de connection à Internet.
    Merci pour votre retour

    Thank you F5UII for all these explanations and your work on the subject. A question about this MMDVM repeater based on ARDUINO DUE.
    Is it possible to operate this repeater in standalone DMR without Raspebrry PI?
    This question because we have a project in MARSEILLE on a site devoid of connection to Internet.
    Thanks for your feedback

    1. Merci Laurent,

      Il faudra toujours un Raspberry Pi qui assure la fonction de logique du relais. Sans internet, le relais fonctionnera en local comme un relais analogique, en local, en utilisant le canal (TalkGroup) TG 9.
      Dans ce cas, et même si cela ne semble pas nécessaire, il serait peut être nécessaire d’assurer une mise à l’heure du Raspberry Pi par une source externe (GPS ou RTC), afin qu’il ne dérive pas trop. Le Raspberry Pi se met à l’heure automatiquement par internet.

      Thank you Larry,

      It will always require a Raspberry Pi that provides the repeater controler function of the repeater. Without the internet, the relay will operate locally as an analog relay, locally, when users connecting it by using the TG 9 (TalkGroup) channel.
      In this case, and even if this does not seem necessary, i will advise to ensure that the Raspberry Pi is set to an external source (GPS or RTC) so that it does not drift too much. The Raspberry Pi automatically sets itself on the Internet.

  3. Advertisements
  4. Bonjour a tous je me permet de copier l’échange par mails avec Christian au sujet de mon souci pour que tous le monde en profite.

    Tous d’abord merci du travaille effectuer pour la carte MMDVM… ainsi que SVXLink que j’ai aussi.

    J’ai un souci sur la carte MMDVM : au branchement de l’Arduino la LED L clignote doucement , puis des le démarrage de MMDVM elle clignote rapidement ainsi que TX/RX qui clignote synchro.

    Le logiciel ne reçois rien , j’ai bien fait la procédure de réglage du niveau sur la broche A0 suivant votre tuto, mais pas le moindre affichage de réception ni de LED SQUELCH allumer lors de la réception d’une émission.

    Cela fait plus d’une semaine que je cherche sans n’avoir rien trouver de probant.

    Si vous avez une idee ?

    73 QRO

    Romain Lepron F4HTU

    Reponse de Christian :

    Cela pourrait être résolu par la piste indiquée ici.

    Moi :
    Merci de la réponse rapide

    Donc le souci serait peut être que le TCXO n’envoie pas les bon niveau a l’Arduino.
    Il a besoin de sa pour se verrouiller, si cela n’est pas fait aucune réception ne peut être lancer si j’ai bien compris ?

    Je vais voir sa des maintenant

    Je viens de court-circuiter C22

    Effectivement javais 3v de niveau , maintenant j’ai bien 3.3V. Je vous joints la photos de l’oscilloscope, cela vous parait t-il correct ?

    Par contre toujours ces LED TXRX qui clignote ensemble , c’est normal ?

    Christian :
    OK pour le trace temporelle du TCXO.

    Concernant les LED : vérifier votre fichier config.h MMDVM

    La frequence normalement fourni par Shopchip est 12.288
    #define EXTERNAL_OSC 12288000
    #define ARDUINO_DUE_NTH

    Hello all I can copy the exchange by mails with Christian about my concern so that everyone benefits.

    First of all thank you for the work done for the MMDVM card … as well as SVXLink that I also have.

    I have a problem with the MMDVM card: when the Arduino is connected, the LED L flashes slowly, then the MMDVM start flashes quickly and TX / RX flashes sync.

    The software does not receive anything, I did well the procedure of adjusting the level on pin A0 according to your tuto, but not the slightest reception display nor LED SQUELCH turn on when receiving a program.

    I have been searching for more than a week without having found anything convincing.

    If you have an idea ?

    73 QRO

    Romain Lepron F4HTU

    Answer by Christian:

    This could be solved by the track shown here.

    Me :
     Thanks for the quick reply

    So the worry may be that the TCXO does not send the right level to the Arduino.
        He needs his to lock himself, if that is not done no reception can be thrown if I understand correctly?

    I’ll see her now

    I just shortcut C22

    Actually I had 3v level, now I have 3.3V well. I attach you the photos of the oscilloscope, it seems to you correct?

    By cons always those TXRX LEDs that blink together, is it normal?

    OK for the time trace of the TCXO.

    About LEDs: check your config.h file MMDVM

    The frequency normally provided by Shopchip is 12,288
    #define EXTERNAL_OSC 12288000
    #define ARDUINO_DUE_NTH

  5. Voila , je viens de paramétrer l’Arduino sur define EXTERNAL_OSC 12288000

    Maintenant il faudra attendre ce soir pour voir si il reçois mon émission.

    Petite question : la LED SQUELCH est commander par l’arduino a travers la detection RADIO-SQL quand le transistor mets la borne A7 au plus 3V ?

    Que même quand le poste reçois une émission et qu’il passe le SQL a 5V , rien ne s’allume sur la carte.

    Le clignotement frénétique et synchro des LED TX/RX est donc normal.

    73 QRO

    So, I just set the Arduino on define EXTERNAL_OSC 12288000

    Now he’ll have to wait until tonight to see if he gets my show.

    Small question: the LED SQUELCH is controlled by the arduino through the RADIO-SQL detection when the transistor puts terminal A7 at most 3V?

    That even when the station receive a broadcast and it passes the SQL to 5V, nothing lights up on the card.

    The frenzy and sync flashing of the TX / RX LEDs is therefore normal.

    73 QRO

    1. La LED Squelch est pilotée par l’arduino et sera allumée uniquement au décodage de signaux réceptionnés par MMDVM. Elle reste éteinte en effet pour tout autre signal non décodé par MMVDM (indépendant de RADIO-SQL et je crois bien non exploité en réalité).

      Les LEDs TX et RX sur la platine Arduino clignotent et indiquent qu’il y a communication entre le modem MMDVM (arduino) et MMDVMHost. Ce dialogue série est initialisé par MMDVMHost. C’est donc bon signe…

      La LED L clignote à une fréquence plus élevé lors que MMDMV tourne.
      Il ne vous reste plus qu’à faire des essais avec émetteur et récepteur.

      Bons essais !

      The Squelch LED is controlled by the arduino and will only be lit when decoding signals received by MMDVM. It remains off for any other signal not decoded by MMVDM (independent of RADIO-SQL and I believe not really exploited in fact).

      The TX and RX LEDs on the Arduino board blink and indicate that there is communication between the MMDVM modem (arduino) and MMDVMHost. This serial dialog is initialized by MMDVMHost. So it’s a good sign …

      The LED L flashes at a higher frequency when MMDMV is running.
      All you have to do now is test with transmitter and receiver.

      Good trials!

  6. Advertisements
  7. Ok je teste ca ce soir
    En espérant que le fait d’avoir le même ID sur le relais et dans le MD380 ne pose pas de souci…( juste le temps des test )
    Par contre , ayant qu’un seul des deux poste radio FT-7800 , cela ne pose t-il pas de problème que je le raccorde seulement a RECEIVER pour mes test de réception ?

    La carte peut elle juste recevoir sans émettre ou le portatif attend une confirmation du relais sur sa voie de réception ?

    Merci beaucoup

    Ok I test it tonight
    Hoping that having the same ID on the relay and in the MD380 does not matter … (just test time)
    On the other hand, having only one of the two FT-7800 radio sets, does not it matter that I only connect it to RECEIVER for my reception test?

    Can the card just receive without transmitting or the handset waits for confirmation of the relay on its receiving channel?

    thank you very much

    1. Si vous connectez MMDVMHost à un master du réseau Brandmeister, normalement, l’ID du relais n’a pas besoin d’être forcément enregistré. Prenez tout de même un ID libre en consultant la base
      Il vaut mieux que les ID soient distincts, je suppose que cela poserait problématique.

      Le relais doit être full-duplex. Cela n’ira pas si vous n’avez pas les deux postes. La section [General] de MMDVM.ini précise Duplex =1 pour un relais.

      Pour le réglage de MMDVMHost vous aurez certainement déjà découvert mon article

      Si vous ne branché que le RX, vous pourriez avoir par chance quelques traces dans le log de MMDVMHost, mais le réglage de la partie réception sera impossible tant qu’une liaison Fullduplex ne soit établi. A l’inverse le poste unique peut servir au réglage de la chaine d’émission, par utilisation de MMDVMCal.

      If you connect MMDVMHost to a Brandmeister network master, normally the repeater ID does not need to be a register one. Please take a free ID – have a look on
      It is better that the IDs are distinct, I suppose that would be problematic.

      The repeater must be full-duplex. This will not happen if you do not have both transceivers. The [General] section of MMDVM.ini specifies Duplex = 1 for a repeater.

      For the MMDVMHost setting you may have already discovered my post :

      If you only connect the RX, you may have a few log lines in the MMDVMHost log, but you can not set the receive part until a full-duplex connection is established. Conversely, the single station can be used to adjust the transmission way, using MMDVMCal.

  8. Ok
    Je vais prendre l’ID d’un ami pour mon MD-380 histoire que cela ne pose pas de souci.

    Je vais mettre le 7800 sur la chaine émission et un autres poste sur la chaine réception, c’est bien la dessus que je ne savais pas si il fallait une vrai liaison FULL-DUPLEX…

    Je préférer poser la question pour mettre toute les chances de mon coté 🙂

    Je vous donne des nouvelles ce soir , et peut être en DMR qui sais…

    73 QRO++

    I will take a friend’s ID for my MD-380 so that it does not matter.

    I’m going to put the 7800 on the transmission chain and another station on the reception chain, it is the subject, I did not know if it needed a real FULL-DUPLEX link …

    I prefer to ask the question to put the odds of my side 🙂

    I give you news tonight, and can be QRV in DMR who knows …

    73 QRO ++

  9. Advertisements
  10. Hi.
    I try to compile the program for the arduino due. Linux mint
    My arduino ide (1.6.12) and Arduino SAM Boards (1.6.11).
    The file to be edited, indicated in BUILD.txt, does not exist the directory that indicates.
    I have modified the files in:
    User /arduino/hardware/platform.txt
    User /arduino/hardware/avr/platform.txt
    There is no subdirectory / sam
    The following errors appear
    Arduino:1.6.12 (Linux), Tarjeta:"Arduino Due (Programming Port)"

    sketch/DMRDMOTX.cpp.o: In function `CDMRDMOTX::writeByte(unsigned char)':
    sketch/DMRDMOTX.cpp:139: undefined reference to `arm_fir_interpolate_q15'
    sketch/DMRTX.cpp.o: In function `CDMRTX::writeByte(unsigned char, unsigned char)':
    sketch/DMRTX.cpp:268: undefined reference to `arm_fir_interpolate_q15'
    sketch/DStarRX.cpp.o: In function `CDStarRX::samples(short*, unsigned short const*, unsigned char)':
    sketch/DStarRX.cpp:294: undefined reference to `arm_q15_to_q31'
    sketch/DStarRX.cpp:295: undefined reference to `arm_biquad_cascade_df1_q31'
    sketch/DStarTX.cpp.o: In function `CDStarTX::writeByte(unsigned char)':
    sketch/DStarTX.cpp:428: undefined reference to `arm_fir_interpolate_q15'
    sketch/IO.cpp.o: In function `CIO::process()':
    sketch/IO.cpp:163: undefined reference to `arm_fir_fast_q15'
    sketch/IO.cpp:170: undefined reference to `arm_fir_fast_q15'
    sketch/IO.cpp:177: undefined reference to `arm_fir_fast_q15'
    sketch/IO.cpp:192: undefined reference to `arm_fir_fast_q15'
    sketch/IO.cpp:199: undefined reference to `arm_fir_fast_q15'
    sketch/IO.cpp.o:sketch/IO.cpp:214: more undefined references to `arm_fir_fast_q15' follow
    sketch/P25RX.cpp.o: In function `CP25RX::samples(short*, unsigned short*, unsigned char)':
    sketch/P25RX.cpp:107: undefined reference to `arm_q15_to_q31'
    sketch/P25RX.cpp:108: undefined reference to `arm_biquad_cascade_df1_q31'
    sketch/P25TX.cpp.o: In function `CP25TX::writeByte(unsigned char)':
    sketch/P25TX.cpp:150: undefined reference to `arm_fir_interpolate_q15'
    sketch/P25TX.cpp:152: undefined reference to `arm_fir_fast_q15'
    sketch/YSFRX.cpp.o: In function `CYSFRX::samples(short*, unsigned short*, unsigned char)':
    sketch/YSFRX.cpp:103: undefined reference to `arm_q15_to_q31'
    sketch/YSFRX.cpp:104: undefined reference to `arm_biquad_cascade_df1_q31'
    sketch/YSFTX.cpp.o: In function `CYSFTX::writeByte(unsigned char)':
    sketch/YSFTX.cpp:139: undefined reference to `arm_fir_interpolate_q15'
    collect2: error: ld returned 1 exit status
    exit status 1
    Error compilación en tarjeta Arduino Due (Programming Port).

    Any ideas?

    1. Hello,

      It is as if you did not install the Arduino SAM Boards package.
      Have you follow the advices given by M1GEO ? ( :

      I (M1GEO) found it was necessary to download SAM-1.6.6 outside of the Arduino IDE, and manually extract the files.
      The Board Manager didn’t seem to install the SAM files correctly. Here’s how I did it:

      a) wget -O /tmp/sam-1.6.6.tar.bz2 (download and save in /tmp)
      b) cd arduino-1.6.7/hardware/arduino/ (Arduino root, here, in my home directory)
      c) tar xvfj /tmp/sam-1.6.6.tar.bz2

      Christian F5UII

  11. There is no “C:\Users\User\AppData\” on my machine, I have tried all (user) on my machine.

    Il n’y a pas de “C:\Users\User\AppData\” sur ma machine, J’ai essayé tous les utilisateurs de ma machine

    1. Craig,

      Under windows, type directly %appdata% , bottom left in “Search programs and files” and Enter. You will be directly in your user Appdata\Roaming directory. From there, you will be able to access the right directory


      Sous Windows, tapez directement %appdata%, en bas à gauche dans “Rechercher les Programmes et fichiers” et entrez. Vous serez directement dans le répertoire de votre utilisateur Appdata\Roaming.
      Depuis là, vous pourrez accéder au bon répertoire

Leave a Reply to F5UII Cancel reply

Your email address will not be published. Required fields are marked *