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
Normal Topic MegaCoreX on Arduino Nano Every (Read 366 times)
Trek19
Junior Member
**
Offline


Posts: 91
Location: UK
Joined: Dec 2nd, 2013
MegaCoreX on Arduino Nano Every
Feb 27th, 2025 at 4:12pm
Print Post  
Just started experimenting with a Nano Every using MegaCoreX
With Blink:
On the Arduino IDE the code is generated and sent to the board OK.
With VS the code does not compile and I get a string of errors like:

Compiling 'Blink1' for 'ATmega4809 (MegaCoreX-master_4809)'
Build Folder: /Release"
0 Protypes Discovered
 
error*: unrecognized argument in option -mmcu=atmega4809
note*: valid arguments to -mmcu= are: at43usb320 at43usb355 at76c711 at86rf401 at90c8534 at90can128 at90can32 at90can64 at90pwm1 at90pwm161 at90pwm2 at90pwm216 at90pwm2b at90pwm3 at90pwm316 at90pwm3b at90pwm81 at90s1200 at90s2313 at90s2323 at90s2333 at90s2343 at90s4414 at90s4433 at90s4434 at90s8515 at90s8535 at90scr100 at90usb1286 at90usb1287 at90usb162 at90usb646 at90usb647 at90usb82 at94k ata5272 ata5505 ata5702m322 ata5782 ata5790 ata5790n ata5795 ata5831 ata6285 ata6286 ata6289 ata6612c ata6613c ata6614q ata6616c ata6617c ata664251 atmega103 atmega128 atmega1280 atmega1281 atmega1284 atmega1284p atmega1284rfr2 atmega128a atmega128rfa1 atmega128rfr2 atmega16 atmega161 atmega162 atmega163 atmega164a atmega164p atmega164pa atmega165 atmega165a atmega165p atmega165pa atmega168 atmega168a atmega168p atmega168pa atmega168pb atmega169 atmega169a atmega169p atmega169pa atmega16a atmega16hva atmega16hva2 atmega16hvb atmega16hvbrevb atmega16m1 atmega16u2 atmega16u4 atmega2560 atmega2561 atmega2564rfr2 atmega256rfr2 atmega32 atmega323 atmega324a atmega324p atmega324pa atmega325 atmega3250 atmega3250a atmega3250p atmega3250pa atmega325a atmega325p atmega325pa atmega328 atmega328p atmega329 atmega3290 atmega3290a atmega3290p atmega3290pa atmega329a atmega329p atmega329pa atmega32a atmega32c1 atmega32hvb atmega32hvbrevb atmega32m1 atmega32u2 atmega32u4 atmega32u6 atmega406 atmega48 atmega48a atmega48p atmega48pa atmega48pb atmega64 atmega640 atmega644 atmega644a atmega644p atmega644pa atmega644rfr2 atmega645 atmega6450 atmega6450a atmega6450p atmega645a atmega645p atmega649 atmega6490 atmega6490a atmega6490p atmega649a atmega649p atmega64a atmega64c1 atmega64hve atmega64hve2 atmega64m1 atmega64rfr2 atmega8 atmega8515 atmega8535 atmega88 atmega88a atmega88p atmega88pa atmega88pb atmega8a atmega8hva atmega8u2 attiny10 attiny11 attiny12 attiny13 attiny13a attiny15 attiny1634 attiny167 attiny20 attiny22 attiny2313 attiny2313a attiny24 attiny24a attiny25 attiny26 attiny261 attiny261a attiny28 attiny4 attiny40 attiny4313 attiny43u attiny44 attiny441 attiny44a attiny45 attiny461 attiny461a attiny48 attiny5 attiny828 attiny84 attiny841 attiny84a attiny85 attiny861 attiny861a attiny87 attiny88 attiny9 atxmega128a1 atxmega128a1u atxmega128a3 atxmega128a3u atxmega128a4u atxmega128b1 atxmega128b3 atxmega128c3 atxmega128d3 atxmega128d4 atxmega16a4 atxmega16a4u atxmega16c4 atxmega16d4 atxmega16e5 atxmega192a3 atxmega192a3u atxmega192c3 atxmega192d3 atxmega256a3 atxmega256a3b atxmega256a3bu atxmega256a3u atxmega256c3 atxmega256d3 atxmega32a4 atxmega32a4u atxmega32c3 atxmega32c4 atxmega32d3 atxmega32d4 atxmega32e5 atxmega384c3 atxmega384d3 atxmega64a1 atxmega64a1u atxmega64a3 atxmega64a3u atxmega64a4u atxmega64b1 atxmega64b3 atxmega64c3 atxmega64d3 atxmega64d4 atxmega8e5 avr1 avr2 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrtiny avrxmega2 avrxmega4 avrxmega5 avrxmega6 avrxmega7 m3000
 

Any suggestions?
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2710
Joined: Feb 13th, 2019
Re: MegaCoreX on Arduino Nano Every
Reply #1 - Feb 27th, 2025 at 4:30pm
Print Post  
Thanks for the report.

Did you install the package manually or via their Boards Manager instructions?

Can you attach the full build output with the below options enabled so we can review the full setup?
  • vMicro > Compiler > Verbose
  • vMicro > Compiler > Show Build Properties


  
Back to top
IP Logged
 
Trek19
Junior Member
**
Offline


Posts: 91
Location: UK
Joined: Dec 2nd, 2013
Re: MegaCoreX on Arduino Nano Every
Reply #2 - Feb 28th, 2025 at 9:05am
Print Post  
Manually, downloaded and unzipped to:
E:\James\Documents\Arduino\hardware\MegaCoreX-master
« Last Edit: Feb 28th, 2025 at 9:15am by Trek19 »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2710
Joined: Feb 13th, 2019
Re: MegaCoreX on Arduino Nano Every
Reply #3 - Feb 28th, 2025 at 9:21am
Print Post  
Thanks for the logs via email and detail.

If the board package is installed via Boards Manager it all works as expected.

To workaround the issue for the manual installation currently on your machine:
1) Add a Local Board.txt to the project (vMicro > Add Code > Add Local Board.txt)
2) Add the attached entry to the file and save it
3) Restart Visual Studio, the project will now compile.

We will investigate why the wrong compiler version was selected in this scenario and update this thread when there is a fixed release.

« Last Edit: Feb 28th, 2025 at 9:47am by Simon@Visual Micro »  

Please Register or Login to the Forum to see File Attachments
Back to top
IP Logged
 
Trek19
Junior Member
**
Offline


Posts: 91
Location: UK
Joined: Dec 2nd, 2013
Re: MegaCoreX on Arduino Nano Every
Reply #4 - Feb 28th, 2025 at 2:21pm
Print Post  
OK Simon, here are details of what I did to get MegaCoreX working on my VM, it may be of interest to you or others.

In VM "Board Manager" I could not see an option to link a git page, the only method I could see was "install new hardware from zip" at the bottom window. I had already installed the MegaCoreX package this way before, but it didnt work.
So I deleted the package from the "Arduino/hardware" folder where the above method had placed it and repeated the process to no avail.
I still get the same errors, and the package is again installed in "E:\James\Documents\Arduino\hardware"

I deleted it again and went to the "Arduino IDE".

From"https://github.com/MCUdude/MegaCoreX/tree/master" I clicked the green "Code" button and copied the link and placed that in "Preferences" but this had "https://github.com/MCUdude/MegaCoreX.git" and it only inserted the package back into the "E:\James\Documents\Arduino\hardware" and this didnt work in Arduino IDE .
Then I went to the section Install on the Git page and copied the link which is: "https://mcudude.github.io/MegaCoreX/package_MCUdude_MegaCoreX_index.jsont" and placed this in the "Preferences" having removed the previous .
This placed the package in "C:\Users\james\AppData\Local\Arduino15\packages".
I was then able to install to the Arduino IDE from the Board Manager" and build and install blink in the Arduino IDE.

I then closed the Arduino IDE and started VM and was now able to select ATmega4809 and build and install Blink OK.


Jim
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2710
Joined: Feb 13th, 2019
Re: MegaCoreX on Arduino Nano Every
Reply #5 - Feb 28th, 2025 at 3:28pm
Print Post  
Thanks for the detail.

The same JSON URL would have worked in Visual Micro if added on the IDE Locations Screen, then it would have shown up in the Micro Explorer > Boards Manager for installation.

The boards shown by default only include the ones published to the Package Index which is also used in the Arduino IDE, so for this package the JSON URL needs adding in either IDE (Visual Micro inherits what is set in the Arduino IDE as well).

Glad you are up and running now, and we will continue to investigate the compiler selection which was the root cause of your initial problem.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint