Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) Cannot compile for arduino R4 (Read 5893 times)
cosmicbear
Newbies
*
Offline


Posts: 8
Joined: Jul 3rd, 2023
Cannot compile for arduino R4
Jul 3rd, 2023 at 11:16am
Print Post  
I cannot achieve compilation with the arduino R4 (I have the wifi version, but that shouldn't matter). Programs compile fine for R3.

I am running release mode.

Here is the debug output (full output on attachment):
Board Properties



name=Arduino Uno R4 WiFi
build.core=arduino
build.crossprefix=arm-none-eabi-
build.compiler_path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/
build.variant=UNOWIFIR4
build.mcu=cortex-m4
build.architecture=cortex-m4
build.fpu=-mfpu=fpv4-sp-d16
build.float-abi=-mfloat-abi=hard
build.board=UNOWIFIR4
build.defines=-DF_CPU=48000000 -DNO_USB -DBACKTRACE_SUPPORT -DARDUINO_UNOR4_WIFI
vid.0=0x2341
pid.0=0x1002
vid.1=0x2341
pid.1=0x006D


Building variant ...
abi-gcc\\7-2017q4/bin/arm-none-eabi-gcc" -c -w -Os -g3 -nostdlib -DF_CPU=48000000 -DNO_USB -DBACKTRACE_SUPPORT -DARDUINO_UNOR4_WIFI -MMD -std=gnu11 -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fmessage-length=0 -fno-builtin -DARDUINO=108010 -DARDUINO_UNOWIFIR4 -DARDUINO_ARCH_RENESAS_UNO -DARDUINO_ARCH_RENESAS -DARDUINO_FSP -D_XOPEN_SOURCE -mthumb "@c:\\Users\\Noe \\variants\\UNOWIFIR4/defines.txt" -DCFG_TUSB_MCU=OPT_MCU_RAXXX "-Ic:\\Users\\Noe /cores/arduino/tinyusb" "-Ic:\\Users\\Noe \\cores\\arduino/api/deprecated" "-Ic:\\Users\\Noe \\cores\\arduino/api/deprecated-avr-comp" -I"c:\\Users\\Noe \\cores\\arduino" -I"c:\\Users\\Noe \\variants\\UNOWIFIR4" "-iprefixc:\\Users\\Noe " "@c:\\Users\\Noe \\variants\\UNOWIFIR4/includes.txt" -o "C:\\Users\\Noe a\\core\\..\\variant\\common_data.c.o" "c:\\Users\\Noe \\variants\\UNOWIFIR4\\tmp_gen_c_files\\common_data.c"
"c:\\Users\\Noe 2017q4/bin/arm-none-eabi-gcc" -c -w -Os -g3 -nostdlib -DF_CPU=48000000 -DNO_USB -DBACKTRACE_SUPPORT -DARDUINO_UNOR4_WIFI -MMD -std=gnu11 -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fmessage-length=0 -fno-builtin -DARDUINO=108010 -DARDUINO_UNOWIFIR4 -DARDUINO_ARCH_RENESAS_UNO -DARDUINO_ARCH_RENESAS -DARDUINO_FSP -D_XOPEN_SOURCE -mthumb "@c:\\Users\\Noe \\variants\\UNOWIFIR4/defines.txt" -DCFG_TUSB_MCU=OPT_MCU_RAXXX "-Ic:\\Users\\Noe /cores/arduino/tinyusb" "-Ic:\\Users\\Noe \\cores\\arduino/api/deprecated" "-Ic:\\Users\\Noe \\cores\\arduino/api/deprecated-avr-comp" -I"c:\\Users\\Noe \\cores\\arduino" -I"c:\\Users\\Noe \\variants\\UNOWIFIR4" "-iprefixc:\\Users\\Noe " "@c:\\Users\\Noe \\variants\\UNOWIFIR4/includes.txt" -o "C:\\Users\\Noe a\\core\\..\\variant\\main.c.o" "c:\\Users\\Noe \\variants\\UNOWIFIR4\\tmp_gen_c_files\\main.c"
"c:\\Users\\Noe 2017q4/bin/arm-none-eabi-gcc" -c -w -Os -g3 -nostdlib -DF_CPU=48000000 -DNO_USB -DBACKTRACE_SUPPORT -DARDUINO_UNOR4_WIFI -MMD -std=gnu11 -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fmessage-length=0 -fno-builtin -DARDUINO=108010 -DARDUINO_UNOWIFIR4 -DARDUINO_ARCH_RENESAS_UNO -DARDUINO_ARCH_RENESAS -DARDUINO_FSP -D_XOPEN_SOURCE -mthumb "@c:\\Users\\Noe \\variants\\UNOWIFIR4/defines.txt" -DCFG_TUSB_MCU=OPT_MCU_RAXXX "-Ic:\\Users\\Noe /cores/arduino/tinyusb" "-Ic:\\Users\\Noe \\cores\\arduino/api/deprecated" "-Ic:\\Users\\Noe \\cores\\arduino/api/deprecated-avr-comp" -I"c:\\Users\\Noe \\cores\\arduino" -I"c:\\Users\\Noe \\variants\\UNOWIFIR4" "-iprefixc:\\Users\\Noe " "@c:\\Users\\Noe \\variants\\UNOWIFIR4/includes.txt" -o "C:\\Users\\Noe a\\core\\..\\variant\\pin_data.c.o" "c:\\Users\\Noe \\variants\\UNOWIFIR4\\tmp_gen_c_files\\pin_data.c"
"c:\\Users\\Noe 2017q4/bin/arm-none-eabi-g++" -c -w -Os -g3 -fno-use-cxa-atexit -fno-rtti -fno-exceptions -MMD -nostdlib -DF_CPU=48000000 -DNO_USB -DBACKTRACE_SUPPORT -DARDUINO_UNOR4_WIFI -MMD -std=gnu++17 -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsigned-char -ffunction-sections -fdata-sections -fmessage-length=0 -fno-builtin -DARDUINO=108010 "-DPROJECT_NAME="C:\\Users\\Noe Gros\\AppData\\Local\\Temp\\VMBuilds\\test\\unor4wifi\\Release/test.ino"" -DARDUINO_UNOWIFIR4 -DARDUINO_ARCH_RENESAS_UNO -DARDUINO_ARCH_RENESAS -DARDUINO_FSP -D_XOPEN_SOURCE -mthumb "@c:\\Users\\Noe \\variants\\UNOWIFIR4/defines.txt" -DCFG_TUSB_MCU=OPT_MCU_RAXXX "-Ic:\\Users\\Noe /cores/arduino/tinyusb" "-Ic:\\Users\\Noe \\cores\\arduino/api/deprecated" "-Ic:\\Users\\Noe \\cores\\arduino/api/deprecated-avr-comp" -I"c:\\Users\\Noe \\cores\\arduino" -I"c:\\Users\\Noe \\variants\\UNOWIFIR4" "-iprefixc:\\Users\\Noe " "@c:\\Users\\Noe \\variants\\UNOWIFIR4/includes.txt" "c:\\Users\\Noe \\variants\\UNOWIFIR4\\variant.cpp" -o "C:\\Users\\Noe a\\core\\..\\variant\\variant.cpp.o"
Error compiling variant
Build failed for project 'test'

TRIAL Version of Visual Micro (Expires On 11 August 2023)
(Existing customer? CTRL+click Or go to this link (https://www.visualmicro.com/page/Trial-Mode-VS2022.aspx)
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2441
Joined: Feb 13th, 2019
Re: Cannot compile for arduino R4
Reply #1 - Jul 3rd, 2023 at 11:33am
Print Post  
Thanks for the report and the logs.

At present the issue seems to be related to the space in your username, which we will investigate and update when there is a fix or workaround available.
  
Back to top
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2441
Joined: Feb 13th, 2019
Re: Cannot compile for arduino R4
Reply #2 - Jul 3rd, 2023 at 11:51am
Print Post  
Could you also attach the full output from the Arduino IDE with the File > Preferences > Show Verbose Output During: Compile enabled?

One workaround for now is to add a Local Board.txt to your project in Visual Micro (vMicro > Add Code > Add Local Board.txt), and paste in the line from the attached file, this should allow the project to build for now.
  

Please Register or Login to the Forum to see File Attachments
Back to top
IP Logged
 
cosmicbear
Newbies
*
Offline


Posts: 8
Joined: Jul 3rd, 2023
Re: Cannot compile for arduino R4
Reply #3 - Jul 4th, 2023 at 6:05am
Print Post  
This fixes compilation, but upload is failing (but wipes and resets the board).

Both IDE and vmicro output attached:
« Last Edit: Jul 4th, 2023 at 6:05am by cosmicbear »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2441
Joined: Feb 13th, 2019
Re: Cannot compile for arduino R4
Reply #4 - Jul 4th, 2023 at 8:33am
Print Post  
Thanks for the update, the upload commands appear identical to us in both the Arduino IDE and Visual Micro.

Can you enable the below settings and resubmit the logs when attempting the upload so we can investigate further?

  • vMicro > Uploader > Verbose
  • Arduino IDE > Preferences > Show Verbose Output During; Upload
  
Back to top
IP Logged
 
cosmicbear
Newbies
*
Offline


Posts: 8
Joined: Jul 3rd, 2023
Re: Cannot compile for arduino R4
Reply #5 - Jul 4th, 2023 at 4:47pm
Print Post  
Done
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2441
Joined: Feb 13th, 2019
Re: Cannot compile for arduino R4
Reply #6 - Jul 4th, 2023 at 5:39pm
Print Post  
Thanks for the detail.

The command being run in both IDE's looks the same, do you get the same issue after compiling, if you run the command in the attached file from the command line?
« Last Edit: Jul 4th, 2023 at 5:40pm by Simon@Visual Micro »  

Please Register or Login to the Forum to see File Attachments
Back to top
IP Logged
 
cosmicbear
Newbies
*
Offline


Posts: 8
Joined: Jul 3rd, 2023
Re: Cannot compile for arduino R4
Reply #7 - Jul 5th, 2023 at 8:48am
Print Post  
Same issue (file attached)
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2441
Joined: Feb 13th, 2019
Re: Cannot compile for arduino R4
Reply #8 - Jul 5th, 2023 at 9:01am
Print Post  
Thanks for the update.

Is the board definitely on COM13 and nothing else is connected to its' Serial port?

Do you get a different result when running the attached command (from the Arduino IDE?)
  

Please Register or Login to the Forum to see File Attachments
Back to top
IP Logged
 
cosmicbear
Newbies
*
Offline


Posts: 8
Joined: Jul 3rd, 2023
Re: Cannot compile for arduino R4
Reply #9 - Jul 5th, 2023 at 3:16pm
Print Post  
It doesn't work via DOS. I've tried to copy/paste arduino too. 

Files attached.

Weirdly (or not), DOS fails differently whether arduino is open or not. The file has the version without IDE open, but if IDE is open, then DOS doesn't even get to the first "Set binary mode", and immediately says "No device found on COM13".

  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2441
Joined: Feb 13th, 2019
Re: Cannot compile for arduino R4
Reply #10 - Jul 5th, 2023 at 4:13pm
Print Post  
Thanks for the update.

I had missed the 1200bps reset element so it likely won't work at all via DOS as you have experienced.

Can you confirm when you are uploading in Visual Micro that there are no instances of the Arduino IDE running at the same time?
  
Back to top
IP Logged
 
cosmicbear
Newbies
*
Offline


Posts: 8
Joined: Jul 3rd, 2023
Re: Cannot compile for arduino R4
Reply #11 - Jul 7th, 2023 at 4:36am
Print Post  
Sorry for the late reply.
Yes, no IDE instances running when trying with VS/Vmicro (I even tried just after a reset, and made sure that no arduino (or even cloud agent) tasks were running).
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2441
Joined: Feb 13th, 2019
Re: Cannot compile for arduino R4
Reply #12 - Jul 7th, 2023 at 8:11am
Print Post  
Thanks for the update and detail.

We have one of these boards on the way so we will continue to investigate when it arrives and update as soon as we can with a fix.
  
Back to top
IP Logged
 
cosmicbear
Newbies
*
Offline


Posts: 8
Joined: Jul 3rd, 2023
Re: Cannot compile for arduino R4
Reply #13 - Jul 7th, 2023 at 12:08pm
Print Post  
Thanks! I've added a topic notification so let me know what you find here, and have fun with the LED matrix  Smiley
  
Back to top
 
IP Logged
 
cosmicbear
Newbies
*
Offline


Posts: 8
Joined: Jul 3rd, 2023
Re: Cannot compile for arduino R4
Reply #14 - Jul 7th, 2023 at 12:08pm
Print Post  
Thanks! I've added a topic notification so let me know what you find here, and have fun with the LED matrix  Smiley
  
Back to top
 
IP Logged
 
Wheeling
Newbies
*
Offline


Posts: 3
Joined: Dec 19th, 2018
Re: Cannot compile for arduino R4
Reply #15 - Jul 7th, 2023 at 3:01pm
Print Post  
Won't upload via VisuaMicro and Visual Studio 2022. Does upload (and work) using Arduino IDE 2.1.1
  
Back to top
 
IP Logged
 
WoeperBe
Junior Member
**
Offline


Posts: 14
Location: Belgium
Joined: Mar 18th, 2020
Re: Cannot compile for arduino R4
Reply #16 - Jul 11th, 2023 at 8:35am
Print Post  
Same problem here

Uploader started for board Arduino Uno R4 WiFi(unor4wifi)
Upload method will be: bootloader
Uploading via Bootloader 
o5\bossac -d --port=COM6 -U -e -w fe.ino.bin" -R
Set binary mode
No device found on COM6
Send auto-baud
Set binary mode
The uploader process failed
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2441
Joined: Feb 13th, 2019
Re: Cannot compile for arduino R4
Reply #17 - Jul 11th, 2023 at 8:45am
Print Post  
Thanks for adding to the thread.

We have a fix for this in development and we will update this thread when this is available for download in the next 24h.
  
Back to top
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2441
Joined: Feb 13th, 2019
Re: Cannot compile for arduino R4
Reply #18 - Jul 11th, 2023 at 12:48pm
Print Post  
If you can please download the latest version from the top of the below board (23.0507.4) this will resolve both issues reported on this thread (compile and upload):
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
  
Back to top
IP Logged
 
WoeperBe
Junior Member
**
Offline


Posts: 14
Location: Belgium
Joined: Mar 18th, 2020
Re: Cannot compile for arduino R4
Reply #19 - Jul 11th, 2023 at 1:02pm
Print Post  
It work fine for me now
Thanks a lot Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint