Skip to content
Bob Cousins edited this page Dec 2, 2016 · 9 revisions

== Work In Progress ==

General Principles

All code that is CPU specific (generally any code that refers to an SFR), should be in the HAL folder for that target. All application code (in top level folder) should not refer specifically to any target, and should not have sequences of #if AVR .. #elif SAM3x #elif STMF32 etc. Pin usage is generally not part of the HAL, that stays in pins_xxx, except where pin usage has special handling for a target CPU (e.g. SPI).

Subfolders are used to separate HAL targets, this feature is supported by Arduino IDE but subfolders must be in "src".

Building

Code MUST build for AVR and Due using Arduino IDE v 1.6.13 with packages:

  • Arduino AVR Boads 1.6.15
  • Arduino SAM Boards 1.6.7
  • or later versions.

Code should build for Due using Eclipse Mars and Jantje Arduino plugin v3.0.0

To build for AVR targets ARCH_ARDUINO_AVR must be defined To build for Due targets, ARCH_ARDUINO_SAM must be defined

In Arduino IDE, both of these flags are automatically defined when user selects appropriate target, no other config is necessary. The users must still select the board type as required in Configuration.h

Files that still need work:

  • endstop_interrupts.h
  • pinsDebug.h
  • printcounter.h
  • Sd2Card.h
  • servo.h
  • stepper.h
  • servo.cpp
  • stepper.cpp
  • temperature.cpp

Verification tasks

  • Build using Arduino IDE

  • Build using Eclipse

  • Build using PlatformIO

  • Regression test on AVR targets

  • Test on Due/RADDS

  • Test on Due/RAMPS_FD

Further tasks

  • Consider requirements for other targets : LPC1768, STMF32F ?

Clone this wiki locally