Program PicKit with Atmel Studio 7

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

Hello everybody.

 

I just wanted to ask if it's possible to program a PICKIT2 or 3(to program a PIC microcontroller from Microchip) with Atmel Studio 7?

 

Cheers,
Andi

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

Nope not yet.

 

Clearly there's a move afoot to combine Atmel's Studio 7 and Microchip's MPLAB (I think it's all moving into MPLAB rather than the other way round) at which point there may be a composite tool that can be used for both AVR and PIC development. But that is way off in the future right now.

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

I guess it depends what you mean by, "program" ... ?

 

You could use AS just as  glorified editor to write the source text.

 

You might be able to configure AS to call the microchip command-line utilities to load the executable into the chip.

 

You might even be able to configure AS to use the microchip toolchain as an "external" toolchain ...

 

hardly likely to be worth the effort, though?

 

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

I want to use AS instead of MPLAB. Means that I want the same source code, which I would have in MPLAB, in AS and then use a PICKIT2 for example and run a PIC.

 

Such a tool/ add-on would be really great! :-(

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

Well, as Cliff said, now that the Atmel absorption into Microchip is continuing apace, there will clearly  be an amalgamation of the tools in due course - so we will just have to wait and see what happens.

 

It seems highly likely unlikely that anyone's going to be doing any "quick-fix" stuff in the  meantime ...

 

EDIT

 

"unlikely"; not "likely" - see #6

 

blush

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...
Last Edited: Sat. Dec 2, 2017 - 03:30 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:
It seems highly likely that anyone's going to be doing any "quick-fix" stuff in the  meantime ...

Did you mean un-likely?

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

"same source code" is an interesting goal. Things like IO, UART, ADC, Timer, etc in AVR are going to be quite different from those in PIC so to use "same" code you are going to have to write in a very modular way to isolate the high level architecture agnostic code from the very CPU specific low level code in what most would call a "Hardware Abstraction Layer" or "HAL". The FatFs code for reading SD/MMC cards from micros is a good example of this. All the high level stuff is architecture agnostic then the micro specific disk_*() functions provide the HAL.
.
But you have to be very dedicated to make the split between the two levels and at the end of the day in 1/2/4K micros you have to ask yourself if it's worth the effort. Just rewriting the general "idea" for each new micro may be easier and provide a better solution than trying to engineer "one size fits all".

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

Getting a compiler ecosystem for PICs shouldn't be too difficult. A Web search shows several people have made progress on that. The work is going to be getting the debugger going.

"This forum helps those that help themselves."

"How have you proved that your chip is running at xxMHz?" - Me

"If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

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

clawson wrote:
"same source code" is an interesting goal..

SAME is the wrong word... Similar is better, but this would just be a goody.

The syntax of the IDE's can be different. There shoud just be an EASY way to write some code in AS and then load everything in a PIC. yes

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

JohanEkdahl wrote:
Did you mean un-likely?

I certainly did!

 

will update the OP

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

andi_avr_2560 wrote:
The syntax of the IDE's can be different

Really?

 

The syntax of the source code is 'C' - so any departure from that will only be for proprietary, compiler-specific stuff.

 

If you want your code to be portable, then you clearly can't go relying upon proprietary, compiler-specific stuff!

 

Again, as clawson already said, if you really do need to use proprietary, compiler-specific stuff, then you will have to find some way to isolate that.

 

A common approach is to use conditional compilation.

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

andi_avr_2560 wrote:
There shoud just be an EASY way to write some code in AS and then load everything in a PIC. 

Nonsense.

 

Atmel Studio was created by Atmel at a time when Microchip was a competitor - why on earth would they make it easy to use their tool to write code for a competitor's products?!?!

 

Clearly, as already noted, things are different now - and so this will change ...

 

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

If you want a common IDE then explore Eclipse, Netbeans, Code::Blocks or similar as they give a common working environment that can be adapted to most micros.

 

EDIT: I believe recent MPLAB is Netbeans based. 

Last Edited: Sat. Dec 2, 2017 - 04:58 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And, of course, Atmel Studio is just MS Visual Studio tweaked to use the AVR & ARM toolchains - so you could tweak it further to add the PIC toolchain(s), if you want ...

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

Brian Fairchild wrote:
A Web search shows several people have made progress on that.
There may be some PIC integration into Microsoft Visual Studio either with MSBuild or by makefile via NMAKE.

Brian Fairchild wrote:
The work is going to be getting the debugger going.
PIC32 will be easier as that has a GDB server in SEGGER JLink and EJTAGproxy for older PIC32 (up to PIC32MZ EF)

OpenOCD has PIC32 flash and MIPS target.

PlatformIO has a toolchain, Arduino framework, and a PIC32 programmer.

If PlatformIO, Microsoft Visual Studio Code with the Native Debug extension would likely meet one's requirements versus the "heavy"-weight Visual Studio.

 


https://forum.allaboutcircuits.com/threads/interfacing-visual-studio-with-pic.88311/#post-716783

https://social.msdn.microsoft.com/Forums/vstudio/en-US/b006eb0c-61d5-4162-bcf7-1bd4a9fc2d9f/may-i-extend-visual-studio-to-edit-and-build-a-microchip-microcontoller-project?forum=vsx

https://www.segger.com/products/debug-probes/j-link/technology/cpus-and-devices/overview-of-supported-cpus-and-devices/

https://github.com/sergev/ejtagproxy

http://openocd.org/

http://platformio.org/platforms/microchippic32

https://marketplace.visualstudio.com/items?itemName=webfreak.debug

 

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