Microchip trying to wean people off Arduino to Atmel Studio?

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


https://twitter.com/MicrochipMak...

 

Which points to:

 

https://www.hackster.io/news/making-the-move-from-the-arduino-ide-to-atmel-studio-415cd06d51e7

 

Which doesn't tell you anything about how to take an existing Arduino sketch, and load it into Studio; or how to use existing Arduino libraries, etc.

 

sad

 

If you want to do that, see:

 

https://www.youtube.com/watch?time_continue=2&v=7WnOe00dVu0

 

 

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

Maybe this should be made a sticky!

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

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

Weren't they trying to move people from Studio to MPLAB-X?

 

edit: a statement like this makes me think the author has no clue about what you can or cannot do using the Arduino IDE:

 

Sometimes an Arduino board is not enough. They often hide much of the functionality of the microcontroller and the Arduino IDE does not provide ready access to the underlying modules. This can be frustrating, as some projects can't have the extra overhead given by a standard function, such as digitalWrite. This is where Atmel Studio comes into play.

Last Edited: Fri. Nov 1, 2019 - 07:26 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

El Tangas wrote:
Weren't they trying to move people from Studio to MPLAB-X?

My thought exactly!

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

El Tangas wrote:
Weren't they trying to move people from Studio to MPLAB-X?

Can you import a sketch into MPLAB-X???  

 

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

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

ki0bk wrote:
Can you import a sketch into MPLAB-X?

Can you import an Atmel Studio project into MPLAB-X?

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

Well, you can import Arduino IDE into Studio and Studio into MPLAB-X. So in theory, you could get an Arduino project into MPLAB-X.

To be honest I have all 3 IDEs installed, but use Studio the most.

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

Arduino started as CPU teaching systems called "Wiring" and "Processing".   These are two examples of using a English present participle as a proper name: something that would never be done by a native English-speaking programmer.   These IDEs succeeded in incorporating all the steps of professional embedded-system development into a free open-source integrated downloadable program.

  It really took off beyond the classroom when cheap clones of Arduino hardware boards appeared on eBay.  People started uploading tutorials on every technical level that used the standardized Arduino hardware/software to run example programs that actually worked even when the user didn't know exactly why.  Arduino uses a simplified version of C++ along with 50 or so added keywords to enable usage of common embedded-system interfaces without deep technical detail.   It's like finally being able to drive a car without having to learn about the chemical characteristics of the rubber used in the tires.

   Microchip should concentrate on adapting all their microcontroller devices to the Arduino system instead of trying to convince Arduino users to switch to the company's IDE.

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

Simonetta wrote:
Arduino started as CPU teaching systems

No, it didn't.

 

It started as a tool for people who wanted to use microcontrollers without having to learn anything about them.

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

The reason I prefer Arduino is that it has far less bugs.

I picked it straight up and used it without having to learn yet another IDE and all its endless menus and icons.

I don't use the keywords.

Last Edited: Fri. Nov 1, 2019 - 11:43 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Atmel Start.  Because every trivial little project NEEDS to have 300+ files in its project directory.  :-(

(oh wait.  If I generate the project "on my local system" (where presumably it knows I have various include files already installed) instead of creating it online and exporting it, the trivial example is only about 150 files!)

 

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

I've always used Studio since before Arduino existed & haven't seen much advantage of writing code using Arduino--is there any?  I want to know what the code is doing, rather than "play song"

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

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

I've always used Studio since before Arduino existed & haven't seen much advantage of writing code using Arduino--is there any?

Sure, sort of.

  1. Multi-platform (mac, linux, windows)
  2. smaller and less invasive install footprint.
  3. Faster startup.
  4. Simpler.
  5. More semi-standard "high level" libraries.  Useful "core functionality."
  6. larger "audience", larger "contributor base."

 

Don't get me wrong; there are plenty of disadvantages as well (no debugger!), but it's not completely one-sided.

 

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

westfw wrote:
no debugger!

but, wait ...  https://www.avrfreaks.net/forum/arduino-pro-ide-alpha-now-available

 

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

westfw wrote:
larger "audience",

I wonder if that's true?

 

I'd have thought the Arduino IDE is limited to only people using Arduino - whereas Atmel Studio is (or can be) used by people applying any AVR or SAM chip on any platform ?

 

 

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

avrcandies wrote:
haven't seen much advantage of writing code using Arduino

As already noted, the raison d'etre for Arduino was[1] for beginners and those not interested in learning about microcontrollers at all.

 

So, if you are already happy with Atmel Studio (or any other "traditional" IDE), I also don't see any advantage in switching.

You can still use both Arduino hardware and Arduino code in Atmel Studio, if you wish. 

 

[1] Of course, Arduino is now widely used well beyond that audience; so the converse also applies - if you are already happy with the Arduino IDE, there's probably not  much reason to switch to Atmel Studio (or any other "traditional" IDE)

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

Simonetta wrote:
Arduino uses a simplified version of C++ along with 50 or so added keywords

Does it?

 

I thought it was just the same GCC compiler underneath?

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: 1

There are no added keywords. C++ is heavily standardized,  much more so than C. They wont allow the addition of even the __flash modifier so they'd never admit new keywords.

 

Also Arduion was created as a system for artists to add "intelligence" to their artworks and installations.  It was not designed as a teaching aid. In fact you could say it was aimed at the people not capable or bothered about learning programming but just as a means to an end. A niche it still occupies.

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

It is my understanding that named address spaces are not part of the C standard but rather are a standardized extension. GCC documentation says they are an extension as defined in the N1275 draft of ISO/IEC DTR 18037 (title and abstract of the approved standard can be found here). The only mentions of named address space support that I could find for clang had to do with OpenCL features.

 

N1275 Annex F does address C++ compatibility and migration, but I'm not sure how much thought went into the multiple address spaces support section (I assume it is referring to the STL when it says "class library"). I think multiple address spaces could be implemented as an extension to C++ but there would probably be some heavy restrictions on what you could put in alternative address spaces.

github.com/apcountryman/build-avr-gcc: a script for building avr-gcc

github.com/apcountryman/toolchain-avr-gcc: a CMake toolchain for cross compiling for the Atmel AVR family of microcontrollers

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

Well, in truth, ".ino" files are not exactly like C++ files, because they are pre-pre-processed by this parser: https://github.com/arduino/ardui...

 

But, you can build an Arduino sketch containing an empty ".ino" file, while the rest is standard C++, this will behave the same in the Arduino IDE and in Studio.

In fact, I have a project that is shared between the 2 IDEs. I wrote it in Studio, but I wanted it to be buildable unchanged by the Arduino IDE. So I just added an empty ".ino" file, and mapped the Studio folder into the Arduino IDE sketch folder with a hard link (called "junction" in windows).

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

So the INO parser will recognise 50 new Arduino specific keywords that are not part of standard C++ ? I never knew that. What are these keywords?

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

No, the following things happen:

 

The Arduino Sketch is a simplified C++ source code that can be composed by many files with the extension .ino. To convert the Sketch into a valid C++ file, a number of actions are needed:

  • If the Sketch is composed by many .ino files, those files are concatenated together into a single .ino.cpp file
  • An #include <Arduino.h> is added at the beginning of the Sketch if not already present
  • All needed libraries are detected and include paths are discovered
  • All #include directives are replaced with the actual content of the files included (this is made with a run of gcc or another command line compatible compiler with the -E flag)

and finally:

  • The resulting file is preprocessed to automatically add missing function prototypes (forward declarations)

 

Some of these things, like auto-including arduino.h, are definitely not part of any C++ standard.

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

You can make a regular C++ project in the Arduino IDE.

 

1.  Create an .INO file with your project name

2.  Just put a list of library #includes.  No executable code.

 

3.  Create regular C, S, C++, H files in the same project folder.

4.  Obey all the Language syntax rules e.g. #includes,  #defines, forward declarations.  e.g. #include <Arduino.h>

 

5.  The Arduino IDE will parse your INO file to locate the header files and associated library code.

6.  Each C, S, C++ file will be compiled and linked.

 

7.  You can manually locate header files from (1) and add to Search Paths in AS7.0

8.  You can manually locate library source code associated with the header files.   Add these to your AS7.0 project

9.  Alternatively add pre-built library objects to the Linker in your AS7.0 project

 

10.  You can build the same set of C, S, C++ source files in AS7.0

 

Steps (7), (8), (9) are the difficult concept for many punters.

The Arduino IDE does this for you.

 

Personally,  I like the idea of "locating" and "adding" headers and library code.

I don't like the automated "forward declaration" because it gives you bad habits.   (and the IDE does not always do it correctly)

 

Oh,  third party library keywords get highlighted in the Arduino IDE editor.   But only if the Library Author has specifically put them in a special file in the associated library directory.

Hey-ho.   The Codevision IDE has always located library headers, libraries, ... for your C project.

 

IMHO,   it would be a good exercise for keen Arduino programmers to use .CPP instead of .INO files.   If only to ensure declarations are correct.

But the beauty of the Arduino system is that it makes life easy.    Artists,  Pot-heads,   Drunks,  Cat owners,   Cow farmers,  ...

 

David.

Last Edited: Sun. Nov 3, 2019 - 03:43 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

El Tangas wrote:
Some of these things, like auto-including arduino.h, are definitely not part of any C++ standard.

No - they're about configuring the project.

 

An "environment" thing rather than a "language" thing.

 

A slightly different take on the way other automated configuration tools set up a project for you; eg, ASF ...

 

 

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

Yes,   but ASF makes your head hurt.

 

At least you can see your Arduino project code.   And know that classes are in proven libraries.   With basic functions in thoroughly proven Core code.

And a worldwide community to assist.

 

David.

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

The bad parts of Arduino are

- Its going to flood the market with embedded programmers

-The Arduino forum is full of beginners asking the same question thousands of times continuously, and they answer them too -makes for stupidly boring reading.

Last Edited: Sun. Nov 3, 2019 - 08:35 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes,  and some of them will be excellent.   The bigger the pool,  the more chance that there will be exceptional fish.

 

I don't understand the snobbery.   If you are interviewing a prospective employee,   you can ask about their experience.    You can ask about their general electrical knowledge.  

 

Surely this is better than someone who has no experience and no basic education.

There are Masters students that do not know Ohm's or Kirchoff's Laws.

 

It is a bit like discarding a Racing Driver because they had driven a go-cart.

 

David.

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

kerlin wrote:
Its going to flood the market with embedded programmers

Surely the point of Arduino is that is exactly what it WON'T do?
.
There'll be a ton of "system programmers' who know all too well how to connect an Analog.read() to a Serial.println() but ask them to program ADCSRA to make a reading or to use UCSR0A while outputting a result or even how to use itoa() /sprintf() to get a binary reading into a human printable form and they won't have a clue. So we'll only be left with a handful of true embedded engineers who write the drivers/classes that the rest of the Arduino population rely on.
.
OTOH It's true that if Arduino gets the beginners so interested that they begin to venture "under the hood" then perhaps they will trade up to fully fledged embedded engineers which, I rather suspect, is somewhat behind Microchip's motives that caused this thread.

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

I don't understand the snobbery either none mentioned or intended ???

Last Edited: Sun. Nov 3, 2019 - 09:20 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No snobbery intended. Simply stating a fact. I don't believe any employer would employ someone who has nothing but Arduino experience. It does not make you a fully qualified embedded engineer.

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

kerlin wrote:
-The Arduino forum is full of beginners asking the same question thousands of times continuously

and that happens nowhere else ... ?

 

frown

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
  • All #include directives are replaced with the actual content of the files included (this is made with a run of gcc or another command line compatible compiler with the -E flag)

That doesn't seem to be the case.  At least, the actual Blink.ino.cpp that is compiled does not look anything like a fully-preprocessed file:

 

 more /tmp/NewArduBuild/sketch/Blink.ino.cpp
#include <Arduino.h>
#line 1 "/Applications/Arduino-1.8.9 copy.app/Contents/Java/examples/01.Basics/Blink/Blink.ino"
#line 1 "/Applications/Arduino-1.8.9 copy.app/Contents/Java/examples/01.Basics/Blink/Blink.ino"
/*
  Blink

 

Doing such pre-processing may be part of the "generate prototype" or "detecting libraries" step, but it's not in a direct line from the user source to binary.

 

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

There will be self-taught old enthusiasts.

There will be young enthusiasts that seek a formal education.

 

The main point is:  there is a bigger pool of potential enthusiasts than if you were tied to hand-rolling ASM or even C

 

IMHO,  someone who can find her way around ASF, Start, CubeMX,  ... is better than someone who can write her own USART code from scratch when given six months.

 

The "accomplished Tool User" will produce robust applications that work.

And know if and when it is appropriate to find and optimise any bottlenecks.

 

If it piques their interest to pursue low-level code,   they will already have some practical experience.

 

David.

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

clawson wrote:
No snobbery intended.

 

No,no not you Mr CLAWSON, somebody else accused me of it, we get mixed up.

 

And you are very correct about the possible motives that may have caused this thread.

Let the IDE games(wars?) begin and we all, out here, will be the winners.

 

awneil wrote:

kerlin wrote:
-The Arduino forum is full of beginners asking the same question thousands of times continuously

and that happens nowhere else ... ?

 

frown

 

Well I am glad to say I don't see such things here, it mostly gets it pointed when a question has been covered many times before.

Makes for a much better forum, but takes more work from some of the kind and very very patient people here.

 

 

 

 

 

 

Last Edited: Mon. Nov 4, 2019 - 04:10 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Visual Studio (AS7), Netbeans (MPLAB X), Theia (Arduino pro), Eclipse, VScode.

 

What a cluster ****, this is ridiculous, why is make and an editor not enough?

 

Disclaimer: I like VSCode, everything else goes at snell speed, and slimes everything it touches, VSCode does have a thin film of sin to get past.

Last Edited: Mon. Nov 4, 2019 - 11:35 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ron_sutherland wrote:
why is make and an editor not enough?

laugh laugh laugh laugh laugh laugh laugh laugh laugh laugh laugh laugh laugh laugh laugh laugh 

 

make & editors are for wimps - Real Programmers just toggle the code in using front-panel switches!

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: Mon. Nov 4, 2019 - 05:52 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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