Using ASF (atmel software framework / microchip advanced software framework) - Page 1
Forum section: electronics / general

author: Simon
author_rank: Unknown
timestamp: August 31, 2019, 09:15:00 pm
content: Right. So having been convinced to use the header files provided by the manufacturer I'm thinking i should go the whole hog and use ASF. This was called Atmel Software Framework now it is being called Microchip ASF - Advanced Software Framework. The so called manual is distributed around the internet and seems to be a jack of all chips but master of none and you have to be careful about the links you follow before you are into generic documentation.I'm also a bit cofused by the brevity of what little there is. Are there any more extensive instructions or a best place to go?

author: ataradov
author_rank: Super Contributor
timestamp: September 01, 2019, 03:38:16 am
content: Having been convinced of a good thing, you decide to go and use a bad thing? Where is logic in that?Frameworks cause nothing but pain an suffering in the long run. They may look like a good thing at first.The only valid use for frameworks is to see what the code is doing to compensate for insufficient documentation, IMO.But feel free to try, may be they will work better for you.In case of Microchip, you need to llok at Harmony 3. It is the most current framework for now.

author: westfw
author_rank: Super Contributor
timestamp: September 01, 2019, 07:27:06 am
content: QuoteYay!QuoteNo, no, no!So, ASF version 3 was a traditional Vendor Library. Bloated and ... not very sensible or easy to use.ASF version 4 (aka "Atmel Start") has a GUI to let you assign pin functions, and seems to address the program-size bloat to at least some extent (lots of inline functions, and some code-generation based on the GUI), but really falls apart in that it copies EVERYTHING into your project directory, whether your project needs it or not. A trivial SAMC20 will end up with 400+ files, including CMSIS core files for CM7 and CM33. In some sense, you sort-of want something like this from a source-code control PoV, but ... it's too much. (This is what happens when you create a project on the website and export it to a download. It might go slightly differently if you run Start locally on your computer.And as Ataradov said, post-acquisition, Microchip seems to be trying to unify the operation of their "Harmony" tool with ARM and Other Microchip products.The sort of big differences between these "versions" of ASF-like functionality should cause you to pause...

author: Simon
author_rank: Unknown
timestamp: September 01, 2019, 08:39:55 am
content: Well even a blank project with some modules added failed to compile due to issues with its own code. Essentially i wanted to end up talking CAN bus but that periphery is quite complex so i would welcome a library for it.

author: donotdespisethesnake
author_rank: Super Contributor
timestamp: September 01, 2019, 11:20:17 am
content: ASF can seem tempting as way to get going quickly, but it's a bloated mess. On one project where a previous programmer used it, I basically ended up rewriting most of the ASF code to remove bloat and bugs.Atmel support will say "if you find a bug, move to the latest release". That didn't work, because they frequently make breaking changes to the API, e.g. GPIO_WritePins() becomes GpioWritePins(). Trying to backport a single bug fix in the ASF meant sifting through thousands of unrelated code changes.Other vendor frameworks have similar problems, and are really best avoided. The only one so far I found that is considerably better is from Infineon for their ARM processors.

author: Simon
author_rank: Unknown
timestamp: September 01, 2019, 01:07:28 pm
content: I'll take a quick look at harmony. But yes ideally I should bare metal.