Jump to content
  • 0

uC 32 failed to compile "blink" sketch


tessue

Question

I just installed "digilent_core" in the arduino IDE 1.8.5 on my ubuntu 16.04.  When I tried to run "blink" sketch on the uC 32, it failed to compile with the following error message.  Can anyone help?

Arduino: 1.8.5 (Linux), Board: "chipKIT uC32"

/home/tessue/Downloads/arduino-1.8.5/arduino-builder -dump-prefs -logger=machine -hardware /home/tessue/Downloads/arduino-1.8.5/hardware -hardware /home/tessue/.arduino15/packages -tools /home/tessue/Downloads/arduino-1.8.5/tools-builder -tools /home/tessue/Downloads/arduino-1.8.5/hardware/tools/avr -tools /home/tessue/.arduino15/packages -built-in-libraries /home/tessue/Downloads/arduino-1.8.5/libraries -libraries /home/tessue/Arduino/libraries -fqbn=Digilent:pic32:chipkit_uc32 -ide-version=10805 -build-path /tmp/arduino_build_272645 -warnings=none -build-cache /tmp/arduino_cache_161474 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.drivers-windows.path=/home/tessue/.arduino15/packages/Digilent/tools/drivers-windows/v2 -prefs=runtime.tools.xc32-tools.path=/home/tessue/.arduino15/packages/Digilent/tools/xc32-tools/xc32-1.43 -prefs=runtime.tools.DigilentPGM.path=/home/tessue/.arduino15/packages/Digilent/tools/DigilentPGM/v1.000-digilent -verbose /home/tessue/Downloads/arduino-1.8.5/examples/01.Basics/Blink/Blink.ino
/home/tessue/Downloads/arduino-1.8.5/arduino-builder -compile -logger=machine -hardware /home/tessue/Downloads/arduino-1.8.5/hardware -hardware /home/tessue/.arduino15/packages -tools /home/tessue/Downloads/arduino-1.8.5/tools-builder -tools /home/tessue/Downloads/arduino-1.8.5/hardware/tools/avr -tools /home/tessue/.arduino15/packages -built-in-libraries /home/tessue/Downloads/arduino-1.8.5/libraries -libraries /home/tessue/Arduino/libraries -fqbn=Digilent:pic32:chipkit_uc32 -ide-version=10805 -build-path /tmp/arduino_build_272645 -warnings=none -build-cache /tmp/arduino_cache_161474 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.drivers-windows.path=/home/tessue/.arduino15/packages/Digilent/tools/drivers-windows/v2 -prefs=runtime.tools.xc32-tools.path=/home/tessue/.arduino15/packages/Digilent/tools/xc32-tools/xc32-1.43 -prefs=runtime.tools.DigilentPGM.path=/home/tessue/.arduino15/packages/Digilent/tools/DigilentPGM/v1.000-digilent -verbose /home/tessue/Downloads/arduino-1.8.5/examples/01.Basics/Blink/Blink.ino
Using board 'chipkit_uc32' from platform in folder: /home/tessue/.arduino15/packages/Digilent/hardware/pic32/1.0.3
Using core 'pic32' from platform in folder: /home/tessue/.arduino15/packages/Digilent/hardware/pic32/1.0.3
Detecting libraries used...
"/home/tessue/.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=32MX340F512H -DF_CPU=80000000L -DARDUINO=10805 -D_BOARD_UC32_ -DARDUINO_ARCH_PIC32 -DMPIDEVER=16777998 -DMPIDE=150 -DIDE=Arduino -G1024  -I/tmp/arduino_build_272645/sketch "-I/home/tessue/.arduino15/packages/Digilent/hardware/pic32/1.0.3/cores/pic32" "-I/home/tessue/.arduino15/packages/Digilent/hardware/pic32/1.0.3/variants/uC32" "/tmp/arduino_build_272645/sketch/Blink.ino.cpp" -o "/dev/null"
"/home/tessue/.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=32MX340F512H -DF_CPU=80000000L -DARDUINO=10805 -D_BOARD_UC32_ -DARDUINO_ARCH_PIC32 -DMPIDEVER=16777998 -DMPIDE=150 -DIDE=Arduino -G1024  -I/tmp/arduino_build_272645/sketch "-I/home/tessue/.arduino15/packages/Digilent/hardware/pic32/1.0.3/cores/pic32" "-I/home/tessue/.arduino15/packages/Digilent/hardware/pic32/1.0.3/variants/uC32" "/tmp/arduino_build_272645/sketch/Blink.ino.cpp" -o "/tmp/arduino_build_272645/preproc/ctags_target_for_gcc_minus_e.cpp"


XCLM: Failed to elevate privilege - is the XCLM binary setuid-root?
/tmp/arduino_build_272645/sketch/Blink.ino.cpp:1:0: error: MPLAB XC32 C++ license not activated
 #include <Arduino.h>
 ^
/tmp/arduino_build_272645/sketch/Blink.ino.cpp:1:0: note: Visit http://www.microchip.com/MPLABXCcompilers to acquire a free C++ license
exit status 255
Error compiling for board chipKIT uC32.

 

 

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

Thanks for the response, Jon. 

uC 32 is the only digilent board I have, but my Arduino Uno works fine with the current IDE setup.  I don't think I was root when I install either Arduino IDE or digilent core.  I tried the chipkit core, but it didn't work either, so I switch to the digilent core hoping it would work better.  So far, no luck.  Any suggestion I should try next? 

Link to comment
Share on other sites

Hi @tessue,

I think that it is an issue with permissions when you downloaded and installed the arduino ide and the digilent/chipkit cores. I would suggest to uninstall and re-install the arduino IDE as well as the Digilent core while being set as root. I know of a couple of programs specifically that certain things will not install if you are not in root and will cause the program to not work.

thank you,

Jon

Link to comment
Share on other sites

Jon.

After installing IDE again with sudo, I was able to compile "blink" sketch.  However, when I tried to upload it, I got this error message.  What am I missing now?

Archiving built core (caching) in: /tmp/arduino_cache_262089/core/core_Digilent_pic32_chipkit_uc32_e7ab0b4d470f8fd4cbd0c478b4a8e72c.a
Sketch uses 9052 bytes (1%) of program storage space. Maximum is 520192 bytes.
Global variables use 3060 bytes (9%) of dynamic memory, leaving 29708 bytes for local variables. Maximum is 32768 bytes.
DigilentPGM V1.00
Digilent Copyright 2016
Written by Keith Vogel
Sunday, December 31, 2017 4:55:32 AM PST

RXTX Warning:  Removing stale lock file. /var/lock/LCK..ttyUSB0
Comm Port: /dev/ttyUSB0
Baud rate set to: 115200
TimedOut waiting for Serial Response
Unable to signon, this does not look like a bootloader

 

Link to comment
Share on other sites

Hi @tessue,

This error means that there is an issue with the uC32's bootloader. To fix this you need to go to the uC32 page and at the bottom under additional resources you will see a zip file called MPIDE Sketch to update the bootloader. Download and use this sketch. I believe you can use this sketch in the Adruino IDE as well. This will re-install the bootloader. Afterwards you should be able to use the uC32 without an issue.

cheers,

Jon

Link to comment
Share on other sites

Happy New Year, Jon.

I followed your instruction, and down load the MPIDE sketch.  I could open and compile it with my Arudino IDE without any problem.  But when I upload it to uC32, I got the same "this does not look like a bootloader".  Then I realize I don't know what you meant by "use this sketch".  The only way I know of is open, compile, and upload from Arduino IDE.  Should I do something else in this case?

BTW, I really appreciate you replying my rather mundane questions.  Thanks...

Link to comment
Share on other sites

Hi @tessue,

I believe you are getting this error is because the bootloader is not working properly.Tomorrow one of my co-workers will add the MPLABX bootloader to a uC32 and then run the sketch we provided above to add the arduino/MPIDE bootloader and verify the sketch does work. Looking at the sketch under notes it does describe that there are 2 windows of unrecoverable failure, immediately after the first page is erased, and immediately after the config bits are erased. This time is kept short, but should power be lost during this time, the bootloader will have to be reprogrammed using either the licensed debugger or a PICkit3 depending on the board. 

thank you,

Jon

Link to comment
Share on other sites

Hi @tessue,

I tried the bootloader sketch and received the same error as you. I then contacted the engineer who created the sketch and they confirmed to me that the bootloader sketch is only designed to update a bootloader that is already present on the board; it does not load a fresh bootloader if there is not anything present on the board.

What you would need to do is use a programmer such as the chipKIT PGM, Microchip's PICkit 3, or something similar, with MPLAB X to update the board with the bootloader hex file, available on the right side of the uC32 Resource Center under Design Resources.

Out of curiosity though, have you used the uC32 with MPLAB X before or programmed it with anything besides your attempt with the Arduino IDE?

Thanks,
JColvin

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...