Skip to content

Commit

Permalink
Fix melzi_optiboot board_upload.maximum_size
Browse files Browse the repository at this point in the history
And allow melzi_optiboot for Anet V1.0 board with optiboot.

Note: Since platformio/platform-atmelavr#217 ,
all envs that are intended to be used with a bootloader should define
board_upload.maximum_size
  • Loading branch information
DerAndere1 committed Aug 25, 2021
1 parent 71c96db commit b9afb5c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Marlin/src/pins/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@
#elif MB(OMCA)
#include "sanguino/pins_OMCA.h" // ATmega644P, ATmega644 env:sanguino644p
#elif MB(ANET_10)
#include "sanguino/pins_ANET_10.h" // ATmega1284P env:sanguino1284p env:sanguino1284p_optimized
#include "sanguino/pins_ANET_10.h" // ATmega1284P env:sanguino1284p env:sanguino1284p_optimized env:melzi_optiboot
#elif MB(SETHI)
#include "sanguino/pins_SETHI.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p

Expand Down
19 changes: 18 additions & 1 deletion Marlin/src/pins/sanguino/pins_ANET_10.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,25 @@
* Many thanks to Hans Raaf (@oderwat) for developing the Anet-specific software and supporting the Anet community.
*/

/**
* Installation of Marlin
*
* For upload of Marlin onto the board with stock bootloader using the Arduino IDE, select 'Sanguino' in
* 'Tools > Board' and 'ATmega1284P' in 'Tools > Processor.'
* For upload of Marlin onto the board with stock bootloader using Platformio, change the default_env in
* platformio.ini to 'default_env = sanguino1284p' or 'default_env = sanguino1284p_optimized'.
*
* optiboot is an alternative bootloader that can be burned onto the board to allow upload of larger firmware.
* Information can be found at https://github.com/Optiboot/optiboot
* After burning the optiboot bootloader onto the board, Marlin can be uploaded onto the board as follows:
* For upload of Marlin onto the board with optiboot using the Arduino IDE, select 'Sanguino (Optiboot)' in
* 'Tools > Board' and 'ATmega1284P' in 'Tools > Processor.'
* For upload of Marlin onto the board with optiboot using Platformio, change the default_env in platformio.ini
* to 'default_env = melzi_optiboot'.
*/

#if NOT_TARGET(__AVR_ATmega1284P__)
#error "Oops! Select 'Sanguino' in 'Tools > Board' and 'ATmega1284P' in 'Tools > Processor.' (For PlatformIO, use 'melzi' or 'melzi_optiboot.')"
#error "Oops! Select 'Sanguino' in 'Tools > Board' and 'ATmega1284P' in 'Tools > Processor.' (For PlatformIO, use 'sanguino1284p' or 'sanguino1284p_optimized'. With optiboot, use 'melzi_optiboot.')"
#endif

#define BOARD_INFO_NAME "Anet 1.0"
Expand Down
1 change: 1 addition & 0 deletions ini/avr.ini
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ platform = atmelavr
extends = common_avr8
board = sanguino_atmega1284p
upload_speed = 115200
board_upload.maximum_size = 130048

#
# Melzi and clones (Zonestar Melzi2 with tuned flags)
Expand Down

0 comments on commit b9afb5c

Please sign in to comment.