MplabX 5.0, and the ATMEL X-plained Mini 328p

Go To Last Post
35 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MplabX 5.0, and the ATMEL X-plained Mini 328p

 

Looks like Papas got a brand new bag!

 

This is significant and deserves a new thread, which I will address when I have more experience.  First impression is the load speeds are good, and debugging is rational. But that's just 15 minutes in...

 

This topic has a solution.
Last Edited: Sun. Aug 19, 2018 - 03:09 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

rasyoung wrote:
First impression is the load speeds are good, and debugging is rational.

When you get a chance, can you post download times, for largish images ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

deserves a new thread,

Your wish is my command.  smiley

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am a MicroChip / MPLAB user, And recently aqquired an Arduinno MEGA2560 which I am most impressed with. I also ordered an ATmega 328P, and have the datasheet for it. My question is can I program it with a PICKit 3, if not how do we do this ? I assume I can also use assembly code + MPLAB V5.

My level for ATMEL would be absolute drongo!

 

ROB

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Robinb wrote:
My question is can I program it with a PICKit 3, ...
PICkit 2 in AVRDUDE, PICkit 4 in MPLAB X 5

Robinb wrote:
...  if not how do we do this ?
Atmel-ICE for most AVR until more AVR are added to PICkit 4.

mega328P is in PICkit 4.

In lieu of Atmel-ICE, AVRDUDE is functional with a plethora of AVR programmers.

Don't know how to invoke AVRDUDE from MPLAB X.

Robinb wrote:
I assume I can also use assembly code + MPLAB V5.
Recommend C or C++ as mega2560 and mega328P have substantial instruction space.

Microchip AVR GCC for C or C++, xc8-gcc for C

 


http://download.savannah.gnu.org/releases/avrdude/

via http://avrdude.nongnu.org/

'Device Support.htm' in MPLAB X 5.00 release notes at http://www.microchip.com/mplab/mplab-x-ide (Downloads tab)

https://www.avrfreaks.net/forum/come-join-us-mplab-now-supports-avrs?page=3#comment-2524381

http://www.microchip.com/DevelopmentTools/ProductDetails/PartNO/ATATMEL-ICE

Readme for MPLAB X IDE.htm

...

 

5.3      Compilers

...

  1. Install this compiler [AVR GNU or ARM GNU] in the same location as MPLAB XC compilers so MPLAB X IDE can find them, e.g.;
    C:\Program Files\microchip\ARM_GCC

...

AVR GNU is usually Microchip AVR GCC at

http://www.microchip.com/mplab/avr-support/avr-and-arm-toolchains-(c-compilers)

FSF GCC is https://gcc.gnu.org/ with builds from multiple sources.

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just had a moment yesterday, and was disappointed to see write speeds for about a minute for a 20k plus file size. That compares to about 50 seconds for Atmel Studio 7.  This is a very gross calculation, done quite in haste. I'm standardizing on this excellent AVR application for comparison purposes. MplabX 5, doesn't under stand the cpproj type as of yet, so I can't evaluate Arduino projects that Atmel Studio has imported/generated, which is a shame.

 

https://github.com/pololu/libpol...

 

They have a win32 install-able version here

 

https://www.pololu.com/docs/0J51...

 

You can see the list of (beta)supported Atmel debuggers is really pretty complete.

 

 

This is truly a monumental effort, I bet it takes quite a while before all the bugs are worked out...

 

 

 

Last Edited: Sat. Aug 18, 2018 - 12:30 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here's a situation (ATTiny104-XNANO) where I was not successful flashing, importing, compiling only. MplabX see the mEDBG instance, but will not connect flash the chip.

The example program is from the brilliant little exposition on programming the ATtiny104XNANO ( https://github.com/SyncChannel/A... )

 

 

 

Whereas Atmel Studio 7 does not have an issue ...

 

Last Edited: Sat. Aug 18, 2018 - 01:10 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

TPI devices will be fixed in MPLABX 5.10

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the info! And I guess I should have said "nEDBG" not "mEDBG", I think.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for all the Info. That should keep me busy for a while.

I think I am suffering from a device overload, I neglected to say I have a USB tinyISP V2..............

Too much stuff and not enough knowledge, and a hardware junky!

I really should abide by the KISS principle! AVR Studio here we come.

ROB

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Here's another run, this time with an ASF generated LED flasher. Again, the performance is good with small programs, and I'm looking forward to when the simulator is functional for the AVR chipsets. The project import system seems to work well, but I don't think it can deal with AS7 projects that rely on an external makefile. The work flow (for now) is to generate the solutions in AS7, then import them via the wizard in MplabX 5.0. The fact is I like this facility and will be using this more and more, as it matures. I'll give Microchip an "attaboy" I think...

 

 

 

Last Edited: Sun. Aug 19, 2018 - 02:26 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

And here's my first milestone, debugging the ASM output of a Great Cow Basic program in MplabX on the Atmel X-plained 328p.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Robinb wrote:
AVR Studio here we come.
Am assuming your being cheeky in a thread about MPLAB X 5.

smiley

mega328P -

consider MPLAB PICkit 4 as it's on-sale (IIRC 12d to go), selling like hotcakes (pancakes), and its value is good to excellent.

Some mega328 are in PDIP at 100mil/2.54mm pitch which matches PICkit 4's pitch.

 

Arduino MEGA -

Its bootloader via AVRDUDE as loader is more than adequate unless have a difficult problem.

Atmel-ICE does go on sale so consider waiting for that or mega2560 in MPLAB PICkit 4.

IIRC, in MPLAB X one can request a MCU to be added to its device support.

There's a PICkit 4 adapter (in-lieu of Atmel-ICE) though some simply make their own squid cable or adapter.

 


https://www.avrfreaks.net/forum/come-join-us-mplab-now-supports-avrs?page=3#comment-2524381

https://www.avrfreaks.net/forum/come-join-us-mplab-now-supports-avrs?page=2#comment-2519496

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a PICKit4 sitting on my desk. Hoping to see it become a pretty universal programmer/debugger over the next year!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Robinb wrote:
AVR (sic) Studio here we come.

You mean Atmel Studio ?

 

http://www.microchip.com/mplab/avr-support/atmel-studio-7

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just use Atmel Studio 7

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes I mean Atmel Studio.

Most of my computer hardware is in storage at present, so am using old Dual Centrino laptop + W7,
plus the world's slowest NBN; so Atmel Studio (5 or 7)  takes half a day to load and runs like a 3 legged dog!

Thanks for all the help and suggestions.
 

ROB

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, here's another big surprise! I got this shipped today for 20$ Sure to be relevant to low-cost Microchip debugging, I would think it would support most of the devices that Pickit4 eventually does.

 

http://www.microchip.com/develop...

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

fyi, mega328 is not in MPLAB X 5.05 for MPLAB Snap; mega328 is present for MPLAB PICkit 4 and Atmel-ICE.

MPLAB PICkit 4 debugWIRE is non-functional in MPLAB X 5.05

 

https://www.avrfreaks.net/forum/mplab-snap#comment-2536366

https://www.avrfreaks.net/forum/come-join-us-mplab-now-supports-avrs?page=4#comment-2536046

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

MPLAB PICkit 4 debugWIRE is functional in MPLAB X 5.05

 

https://www.mikrocontroller.net/attachment/374178/Pickit4_debugs_ATmeg328.png

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ah! Good to know. Thanks for sharing ...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Simulator functional for the AVR toolchain as of the MplabX 5.05 release ... Am I missing a setting to ensure the initial break on main()?

 

Last Edited: Thu. Aug 23, 2018 - 01:18 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

rasyoung wrote:

Simulator functional for the AVR toolchain as of the MplabX 5.05 release ... Am I missing a setting to ensure the initial break on main()?

/quote]

 

Go to Tools -> Options. Click on Embedded and set the option for Debug startup to Halt at main.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you! Will try ...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Can't wait to give this a whirl, on my doorstep this morning ...

 

https://www.mouser.com/new/micro...

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Does anyone know if Microchip's SNAP debugger is on the roadmap for ATMEL AVR debug-wire support? Works like a champ with the PIC24F, significantly faster than PICKit3.

 

Last Edited: Mon. Aug 27, 2018 - 03:40 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I guess SNAP for AVR (Ubuntu 16.04, MplabX 5.05) will have to wait ...

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

matches MPLAB X 5.05 'Device Support.htm'

mega328 ISP is in MPLAB PICkit 4 though there's a debugWIRE issue in MPLAB X 5.05 (though there's one post where one stated debugWIRE is functional in MPLAB PICkit 4; that's post #20 above)

 

Edit : #20

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Mon. Sep 3, 2018 - 06:14 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MPLAB Snap is mostly AVR JTAG in MPLAB X 5.05

mega32U4 is JTAG and is common in Arduino and from Adafruit Industries.

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would be excited to be able to step/debug in a modern IDE, with a reasonable priced debugger,  the inexpensive mega32u4 via AVR JTAG.

 

In my experience, the mega32u4 is  a great chip,  and the native USB boot loader can work very well if you're patient, and the system can re-enumerate  the usb connection correctly after programming. (Sometimes fails in virtual machine, but works great on this low power Linux computer).

 

I have used the old JTAG1 to program/debug ATmega 32's with AVR Studio 4, but would welcome an upgrade to the modern technology.

 

Thanks for the information.

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Upgraded to MplabX 5.15 today, no change on Beta status of AVR debug hardware, but I am still interested in testing the SNAP, and PICKit 4 on the AVR product lines...

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

screenshot - XC8 v2.00

MPLAB XC8 v2.05 for AVR is recommended in the readme for MPLAB X v5.15 :

17.5   Device Feature Support Issues

AVR MCU Development

If you are developing with AVR devices, it is recommended that you upgrade to MPLAB X IDE v5.10 and MPLAB XC8 v2.05. Several AVR issues have been addressed in these versions. Alternately, you can use AVR_GCC

...

Though Microchip AVR GCC and MPLAB XC8 v2 for AVR are both based on FSF GCC, at least implied are differences in code generators; am curious about your take on that especially with a core part of one of your applications (no details, semi-objective)

Reasons : application-specific benchmarks are the "best", portable benchmarks can be shared

 

May you have joy in your testing.

 


https://www.avrfreaks.net/forum/come-join-us-mplab-now-supports-avrs?page=5#comment-2624586

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are there any updates on this? I'm trying to program Arduino Nano's with this.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am trying to import an Atmel Studio (AS7) Project based on AVR-GCC compiler on Linux Ubuntu18.04.3 LTS.

My toolchain on MPLAB X is AVR_GCC version 5.4.0 provided by Microchip Site. I would want to stick to AVR_GCC since my entire project has been maintained on this compiler. 

I have successfully performed this task of transition from AS7 to MPLAB-X on Windows 10.

My problem is transition from Windows to Linux where I am having this issue which states that AVR (v1.0.0) isn't supported.

 

I have tried using the default location at /usr/bin too which again prompts the same problem.

What do I do ?

Nelson Lobo
(Firmware DevOps)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have found the solution to my problem here.

This too is a helpful link.

Nelson Lobo
(Firmware DevOps)