platformio / platform-atmelavr

Atmel AVR: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/atmelavr
Apache License 2.0
136 stars 104 forks source link

Support for Pololu A-Star 328PB Micro #243

Open dommilosz opened 3 years ago

dommilosz commented 3 years ago

Can you add support for A-Star 328PB? I recently bought the 5V 20MHz version to shrink my projects it would be nice to have option to program in PlatformIO

What kind of issue this?


Actual Results

  There is only Pololu A-Star 32U4 board

Expected Results

  Support for 4 variants of Pololu A-Star 328PB Micro (3.3V, 8MHz, 3.3V 12MHz, 5V 16MHz, 5V 20MHz). 

Additional info

Boards: URL

MCUdude commented 3 years ago

There is already good PlatformIO ATmega328PB support. I'm sure you can configure your platformio.ini file to work with your hardware.

How about this? I found the upload board rates here: https://github.com/pololu/a-star/blob/master/boards.txt

; PlatformIO Project Configuration File for MiniCore
; https://github.com/MCUdude/MiniCore/
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed, and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options
; https://github.com/MCUdude/MiniCore/blob/master/PlatformIO.md
; https://docs.platformio.org/page/projectconf.html

[platformio]
default_envs = Upload_20MHz ; Default build target

; Common settings for all environments
[env]
platform = atmelavr
framework = arduino

; TARGET SETTINGS
; Chip in use
board = ATmega328PB
; Serial port for uploads
upload_port = COM4

; BUILD OPTIONS
; Extra build flags
build_flags = 

; SERIAL MONITOR OPTIONS
; Serial monitor port defined in the Upload_UART environment
monitor_port = 
; Serial monitor baud rate
monitor_speed = 9600

; Run the following command to upload with this environment
; pio run -e Upload_20MHz -t upload
[env:Upload_20MHz]
; Clock frequency in [Hz]
board_build.f_cpu = 20000000L
; Upload speed
board_upload.speed = 115200
;  Serial bootloader protocol
upload_protocol = arduino
; Serial upload port
upload_port = ${env.upload_port}

; Run the following command to upload with this environment
; pio run -e Upload_16MHz -t upload
[env:Upload_16MHz]
; Clock frequency in [Hz]
board_build.f_cpu = 16000000L
; Upload speed
board_upload.speed = 115200
;  Serial bootloader protocol
upload_protocol = arduino
; Serial upload port
upload_port = ${env.upload_port}

; Run the following command to upload with this environment
; pio run -e Upload_12MHz -t upload
[env:Upload_12MHz]
; Clock frequency in [Hz]
board_build.f_cpu = 12000000L
; Upload speed
board_upload.speed = 115200
;  Serial bootloader protocol
upload_protocol = arduino
; Serial upload port
upload_port = ${env.upload_port}

; Run the following command to upload with this environment
; pio run -e Upload_8MHz -t upload
[env:Upload_8MHz]
; Clock frequency in [Hz]
board_build.f_cpu = 8000000L
; Upload speed
board_upload.speed = 57600
;  Serial bootloader protocol
upload_protocol = arduino
; Serial upload port
upload_port = ${env.upload_port}