Skip to content

Commit

Permalink
Archim: PIO upload on Windows, Arduino IDE LCD (#17405)
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Lahteine <[email protected]>
  • Loading branch information
Allted and thinkyhead authored Apr 12, 2020
1 parent e490339 commit a97ae51
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
18 changes: 18 additions & 0 deletions Marlin/src/HAL/DUE/upload_extra_script.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# Set upload_command
#
# Windows: bossac.exe
# Other: leave unchanged
#

import platform
current_OS = platform.system()

if current_OS == 'Windows':

Import("env")

# Use bossac.exe on Windows
env.Replace(
UPLOADCMD="bossac --info --unlock --write --verify --reset --erase -U false --boot"
)
4 changes: 0 additions & 4 deletions Marlin/src/HAL/DUE/usb/conf_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@
//! To define a Full speed device
//#define USB_DEVICE_FULL_SPEED

#if MB(ARCHIM1)
#define USB_DEVICE_FULL_SPEED
#endif

//! To authorize the High speed
#ifndef USB_DEVICE_FULL_SPEED
#if (UC3A3||UC3A4)
Expand Down
2 changes: 2 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ board = due
src_filter = ${common.default_src_filter} +<src/HAL/DUE>
build_flags = ${common.build_flags}
-DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSBCON
extra_scripts = Marlin/src/HAL/DUE/upload_extra_script.py

[env:DUE_archim_debug]
# Used when WATCHDOG_RESET_MANUAL is enabled
Expand All @@ -223,6 +224,7 @@ src_filter = ${common.default_src_filter} +<src/HAL/DUE>
build_flags = ${common.build_flags}
-DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSBCON
-funwind-tables -mpoke-function-name
extra_scripts = Marlin/src/HAL/DUE/upload_extra_script.py

#
# NXP LPC176x ARM Cortex-M3
Expand Down

3 comments on commit a97ae51

@sl1pkn07
Copy link
Contributor

@sl1pkn07 sl1pkn07 commented on a97ae51 Apr 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bossac exist for linux (the package is called bossa)

https://repology.org/project/bossa/versions

@thinkyhead
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It sounds like you might know the exact changes that are needed to the python script.

@sl1pkn07
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but i dont have a DUE_achim board for test :(

Please sign in to comment.