platformio / platform-atmelsam

Atmel SAM: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/atmelsam
Apache License 2.0
79 stars 105 forks source link

Atmel Start Framework builder #84

Open frankleonrose opened 4 years ago

frankleonrose commented 4 years ago

As discussed in #33, here's my proposed Atmel Start builder.

Current issues (can be seen building examples/atmelstart-blink):

ivankravets commented 4 years ago

PlatformIO issues a warning about the use of atstart_file option

If you need custom options in platformio.ini for your framework, please use board_build.%frameworkname%.atstart_file. Later in build script, board.get("build.xxxx.atstart_file")

ivankravets commented 4 years ago

Atmel Start - is this a framework or configuration tool?

frankleonrose commented 4 years ago

Atmel Start is a configuration tool that generates code that uses Atmel's Advanced Software Framework - ASF4. However, the two are tightly coupled. I think of it as Atmel Start generating a custom framework per project.

In order to break out ASF4 as an independent framework layer, it would have to include all possible hal/hpl/driver sources. Then the builder would have to select among them as appropriate for a particular board. This would essentially be replicating the work Atmel Start does when it generates the source package.

ivankravets commented 4 years ago

How about to name it just framework = atmel-asf?

frankleonrose commented 4 years ago

Given the high degree of coupling, I don't see a problem with atmel-asf. From my perspective, the entrypoint is Atmel Start, which is why I used that name. But anybody in the ecosystem will understand.

Mivr commented 3 years ago

Hi @frankleonrose, I do not know if there is still interest in this framework, however for the issue of zero clocks in the peripheral_clk_config.h there is a fix: https://github.com/Mivr/atmel-start/commit/5e3b17727cf20da95c6b5ca4d61c107cb989e9f8 as it seems the external frequency should not be set (I will clean it a bit to remove the value before serialization, I have tested the change and it only affects the peripheral_clk_config in my test projects). Also, there is a Go tool that has more functionality and might be a good idea to integrate into this PR?