What I want to do :
I want to learn how to program with the Basys MXC32 device.
What I have done
I use Arduino IDE (version 1.8.19) and I am on Ubuntu 22.02 . I followed what is written in this tutorial. I installed Digilent Core on Arduino IDE and set the Board value on "Diligent Basys MX3" (Tools > Board). I set the port on "/devtty/USB0"
I tried to compile the easiest code
//#include <xc.h>
void setup() {
// put your setup code here, to run once:
//LED_Init();
//LED_SetValue(4, 1); //turn on LED4
}
/void loop() {
// put your main code here, to run repeatedly:
}
My problem
When I try to compile the code (I click on the "verify" button) I have this error :
/home/adam/arduino-1.8.19/arduino-builder -dump-prefs -logger=machine -hardware /home/adam/arduino-1.8.19/hardware -hardware /home/adam/.arduino15/packages -tools /home/adam/arduino-1.8.19/tools-builder -tools /home/adam/arduino-1.8.19/hardware/tools/avr -tools /home/adam/.arduino15/packages -built-in-libraries /home/adam/arduino-1.8.19/libraries -libraries /home/adam/Arduino/libraries -fqbn=Digilent:pic32:Digilent_BasysMX3 -vid-pid=0403_6001 -ide-version=10819 -build-path /tmp/arduino_build_806736 -warnings=none -build-cache /tmp/arduino_cache_76086 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.DigilentPGM.path=/home/adam/.arduino15/packages/Digilent/tools/DigilentPGM/v1.000-digilent -prefs=runtime.tools.DigilentPGM-v1.000-digilent.path=/home/adam/.arduino15/packages/Digilent/tools/DigilentPGM/v1.000-digilent -prefs=runtime.tools.drivers-windows.path=/home/adam/.arduino15/packages/Digilent/tools/drivers-windows/v2 -prefs=runtime.tools.drivers-windows-v2.path=/home/adam/.arduino15/packages/Digilent/tools/drivers-windows/v2 -prefs=runtime.tools.xc32-tools.path=/home/adam/.arduino15/packages/Digilent/tools/xc32-tools/xc32-1.43 -prefs=runtime.tools.xc32-tools-xc32-1.43.path=/home/adam/.arduino15/packages/Digilent/tools/xc32-tools/xc32-1.43 -verbose /home/adam/Arduino/BasysMX3/sketch_jan29a/sketch_jan29a.ino
/home/adam/arduino-1.8.19/arduino-builder -compile -logger=machine -hardware /home/adam/arduino-1.8.19/hardware -hardware /home/adam/.arduino15/packages -tools /home/adam/arduino-1.8.19/tools-builder -tools /home/adam/arduino-1.8.19/hardware/tools/avr -tools /home/adam/.arduino15/packages -built-in-libraries /home/adam/arduino-1.8.19/libraries -libraries /home/adam/Arduino/libraries -fqbn=Digilent:pic32:Digilent_BasysMX3 -vid-pid=0403_6001 -ide-version=10819 -build-path /tmp/arduino_build_806736 -warnings=none -build-cache /tmp/arduino_cache_76086 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.DigilentPGM.path=/home/adam/.arduino15/packages/Digilent/tools/DigilentPGM/v1.000-digilent -prefs=runtime.tools.DigilentPGM-v1.000-digilent.path=/home/adam/.arduino15/packages/Digilent/tools/DigilentPGM/v1.000-digilent -prefs=runtime.tools.drivers-windows.path=/home/adam/.arduino15/packages/Digilent/tools/drivers-windows/v2 -prefs=runtime.tools.drivers-windows-v2.path=/home/adam/.arduino15/packages/Digilent/tools/drivers-windows/v2 -prefs=runtime.tools.xc32-tools.path=/home/adam/.arduino15/packages/Digilent/tools/xc32-tools/xc32-1.43 -prefs=runtime.tools.xc32-tools-xc32-1.43.path=/home/adam/.arduino15/packages/Digilent/tools/xc32-tools/xc32-1.43 -verbose /home/adam/Arduino/BasysMX3/sketch_jan29a/sketch_jan29a.ino
Using board 'Digilent_BasysMX3' from platform in folder: /home/adam/.arduino15/packages/Digilent/hardware/pic32/1.0.4
Using core 'pic32' from platform in folder: /home/adam/.arduino15/packages/Digilent/hardware/pic32/1.0.4
Detecting libraries used...
/home/adam/.arduino15/packages/Digilent/tools/xc32-tools/xc32-1.43/bin/xc32-g++ -c -g -O0 -w -mno-smart-io -fno-exceptions -ffunction-sections -fdata-sections -mdebugger -Wcast-align -fno-short-double -ftoplevel-reorder -mnewlib-libc -std=gnu++11 -w -x c++ -E -CC -mprocessor=32MX370F512L -DF_CPU=80000000UL -DARDUINO=10819 -D_BOARD_BASYS_MX3_ -DARDUINO_ARCH_PIC32 -DMPIDEVER=16777998 -DMPIDE=150 -DIDE=Arduino -I/tmp/arduino_build_806736/sketch -I/home/adam/.arduino15/packages/Digilent/hardware/pic32/1.0.4/cores/pic32 -I/home/adam/.arduino15/packages/Digilent/hardware/pic32/1.0.4/variants/Basys_MX3 /tmp/arduino_build_806736/sketch/sketch_jan29a.ino.cpp -o /dev/null
Alternatives for Arduino.h: []XCLM: Failed to elevate privilege - is the XCLM binary setuid-root?
ResolveLibrary(Arduino.h)
-> candidates: []
/tmp/arduino_build_806736/sketch/sketch_jan29a.ino.cpp:1:0: error: MPLAB XC32 C++ license not activated
#include <Arduino.h>
^
/tmp/arduino_build_806736/sketch/sketch_jan29a.ino.cpp:1:0: note: Visit http://www.microchip.com/MPLABXCcompilers to acquire a free C++ license
exit status 255
/home/adam/arduino-1.8.19/arduino-builder returned 255
Error compiling for board Digilent Basys MX3.
So, I included the Arduino library on my code. My code is now :
#include <Arduino.h>
//#include <xc.h>
void setup() {
// put your setup code here, to run once:
//LED_Init();
//LED_SetValue(4, 1); //turn on LED4
}
/void loop() {
// put your main code here, to run repeatedly:
}
When I try to compile the code, I have this issue :
Arduino: 1.8.19 (Linux), Board: "Digilent Basys MX3"
/home/adam/arduino-1.8.19/arduino-builder -dump-prefs -logger=machine -hardware /home/adam/arduino-1.8.19/hardware -hardware /home/adam/.arduino15/packages -tools /home/adam/arduino-1.8.19/tools-builder -tools /home/adam/arduino-1.8.19/hardware/tools/avr -tools /home/adam/.arduino15/packages -built-in-libraries /home/adam/arduino-1.8.19/libraries -libraries /home/adam/Arduino/libraries -fqbn=Digilent:pic32:Digilent_BasysMX3 -vid-pid=0403_6001 -ide-version=10819 -build-path /tmp/arduino_build_806736 -warnings=none -build-cache /tmp/arduino_cache_76086 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.DigilentPGM.path=/home/adam/.arduino15/packages/Digilent/tools/DigilentPGM/v1.000-digilent -prefs=runtime.tools.DigilentPGM-v1.000-digilent.path=/home/adam/.arduino15/packages/Digilent/tools/DigilentPGM/v1.000-digilent -prefs=runtime.tools.drivers-windows.path=/home/adam/.arduino15/packages/Digilent/tools/drivers-windows/v2 -prefs=runtime.tools.drivers-windows-v2.path=/home/adam/.arduino15/packages/Digilent/tools/drivers-windows/v2 -prefs=runtime.tools.xc32-tools.path=/home/adam/.arduino15/packages/Digilent/tools/xc32-tools/xc32-1.43 -prefs=runtime.tools.xc32-tools-xc32-1.43.path=/home/adam/.arduino15/packages/Digilent/tools/xc32-tools/xc32-1.43 -verbose /home/adam/Arduino/BasysMX3/sketch_jan29a/sketch_jan29a.ino
/home/adam/arduino-1.8.19/arduino-builder -compile -logger=machine -hardware /home/adam/arduino-1.8.19/hardware -hardware /home/adam/.arduino15/packages -tools /home/adam/arduino-1.8.19/tools-builder -tools /home/adam/arduino-1.8.19/hardware/tools/avr -tools /home/adam/.arduino15/packages -built-in-libraries /home/adam/arduino-1.8.19/libraries -libraries /home/adam/Arduino/libraries -fqbn=Digilent:pic32:Digilent_BasysMX3 -vid-pid=0403_6001 -ide-version=10819 -build-path /tmp/arduino_build_806736 -warnings=none -build-cache /tmp/arduino_cache_76086 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.DigilentPGM.path=/home/adam/.arduino15/packages/Digilent/tools/DigilentPGM/v1.000-digilent -prefs=runtime.tools.DigilentPGM-v1.000-digilent.path=/home/adam/.arduino15/packages/Digilent/tools/DigilentPGM/v1.000-digilent -prefs=runtime.tools.drivers-windows.path=/home/adam/.arduino15/packages/Digilent/tools/drivers-windows/v2 -prefs=runtime.tools.drivers-windows-v2.path=/home/adam/.arduino15/packages/Digilent/tools/drivers-windows/v2 -prefs=runtime.tools.xc32-tools.path=/home/adam/.arduino15/packages/Digilent/tools/xc32-tools/xc32-1.43 -prefs=runtime.tools.xc32-tools-xc32-1.43.path=/home/adam/.arduino15/packages/Digilent/tools/xc32-tools/xc32-1.43 -verbose /home/adam/Arduino/BasysMX3/sketch_jan29a/sketch_jan29a.ino
Using board 'Digilent_BasysMX3' from platform in folder: /home/adam/.arduino15/packages/Digilent/hardware/pic32/1.0.4
Using core 'pic32' from platform in folder: /home/adam/.arduino15/packages/Digilent/hardware/pic32/1.0.4
Detecting libraries used...
/home/adam/.arduino15/packages/Digilent/tools/xc32-tools/xc32-1.43/bin/xc32-g++ -c -g -O0 -w -mno-smart-io -fno-exceptions -ffunction-sections -fdata-sections -mdebugger -Wcast-align -fno-short-double -ftoplevel-reorder -mnewlib-libc -std=gnu++11 -w -x c++ -E -CC -mprocessor=32MX370F512L -DF_CPU=80000000UL -DARDUINO=10819 -D_BOARD_BASYS_MX3_ -DARDUINO_ARCH_PIC32 -DMPIDEVER=16777998 -DMPIDE=150 -DIDE=Arduino -I/tmp/arduino_build_806736/sketch -I/home/adam/.arduino15/packages/Digilent/hardware/pic32/1.0.4/cores/pic32 -I/home/adam/.arduino15/packages/Digilent/hardware/pic32/1.0.4/variants/Basys_MX3 /tmp/arduino_build_806736/sketch/sketch_jan29a.ino.cpp -o /dev/null
Error while detecting libraries included by /tmp/arduino_build_806736/sketch/sketch_jan29a.ino.cpp
Generating function prototypes...
/home/adam/.arduino15/packages/Digilent/tools/xc32-tools/xc32-1.43/bin/xc32-g++ -c -g -O0 -w -mno-smart-io -fno-exceptions -ffunction-sections -fdata-sections -mdebugger -Wcast-align -fno-short-double -ftoplevel-reorder -mnewlib-libc -std=gnu++11 -w -x c++ -E -CC -mprocessor=32MX370F512L -DF_CPU=80000000UL -DARDUINO=10819 -D_BOARD_BASYS_MX3_ -DARDUINO_ARCH_PIC32 -DMPIDEVER=16777998 -DMPIDE=150 -DIDE=Arduino -I/tmp/arduino_build_806736/sketch -I/home/adam/.arduino15/packages/Digilent/hardware/pic32/1.0.4/cores/pic32 -I/home/adam/.arduino15/packages/Digilent/hardware/pic32/1.0.4/variants/Basys_MX3 /tmp/arduino_build_806736/sketch/sketch_jan29a.ino.cpp -o /tmp/arduino_build_806736/preproc/ctags_target_for_gcc_minus_e.cpp
XCLM: Failed to elevate privilege - is the XCLM binary setuid-root?
/tmp/arduino_build_806736/sketch/sketch_jan29a.ino.cpp:1:0: error: MPLAB XC32 C++ license not activated
#line 1 "/home/adam/Arduino/BasysMX3/sketch_jan29a/sketch_jan29a.ino"
^
/tmp/arduino_build_806736/sketch/sketch_jan29a.ino.cpp:1:0: note: Visit http://www.microchip.com/MPLABXCcompilers to acquire a free C++ license
exit status 255
/home/adam/arduino-1.8.19/arduino-builder returned 255
Error compiling for board Digilent Basys MX3.
I noticed :
XCLM: Failed to elevate privilege - is the XCLM binary setuid-root?
error: MPLAB XC32 C++ license not activated
I installed the MPLAB XC32 c++ compiler on my computer however, I still have the same issue.
xclm -hostinfowork for you? If it gives a privilege error, I bet you installed as root usingsudowhen you should not have. Whenever installing something, never usesudoto perform the install unless the install fails without it, else it gives root ownership of installed executables mistakenly.error: MPLAB XC32 C++ license not activated, I have some related XC32 compiler Q&As here: 1) How to install the free XC32++ compiler license (including.gitignoresetup and refreshing the project), 2) How to renew your paid Microchip XC32 Compiler Pro license when it has expired or is about to expire