diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2011-03-24 17:27:38 -0400 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2011-03-24 17:31:47 -0400 |
commit | 63ea7464925b8cbeb8623d08a2bde0b1d2044047 (patch) | |
tree | c1e0291202084d8d8011b0b66715a711108cbef4 /wirish/rules.mk | |
parent | bc246609ccd44601a0564fea8da407cc500ad471 (diff) | |
download | librambutan-63ea7464925b8cbeb8623d08a2bde0b1d2044047.tar.gz librambutan-63ea7464925b8cbeb8623d08a2bde0b1d2044047.zip |
Adding /wirish/boards/ for easier porting; shrank PIN_MAPs.
/wirish/boards/ contains xxx.h and xxx.cpp (for xxx=maple,
maple_native, maple_mini, maple_RET6). The headers contain the
board-specific #defines that used to live in boards.h (except
BOARD_INIT, which was removed). The CPP files contain the PIN_MAP
definitions that used to live in boards.cpp, and a proper boardInit()
function to replace the old BOARD_INIT macro. This will make it
easier to add new boards in the future.
struct PinMapping was renamed struct stm32_pin_info, and was moved
into a new wirish_types.h. Its external interrupt field was moved
into struct gpio_dev, which saves memory by storing an afio_exti_port
per port, rather than one per pin. Also rearranged the stm32_pin_info
fields to improve packing. Maple's PIN_MAP is now down to below 500
bytes.
Diffstat (limited to 'wirish/rules.mk')
-rw-r--r-- | wirish/rules.mk | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/wirish/rules.mk b/wirish/rules.mk index d250cb9..c1d59bc 100644 --- a/wirish/rules.mk +++ b/wirish/rules.mk @@ -4,8 +4,9 @@ dirstack_$(sp) := $(d) d := $(dir) BUILDDIRS += $(BUILD_PATH)/$(d) BUILDDIRS += $(BUILD_PATH)/$(d)/comm +BUILDDIRS += $(BUILD_PATH)/$(d)/boards -WIRISH_INCLUDES := -I$(d) -I$(d)/comm +WIRISH_INCLUDES := -I$(d) -I$(d)/comm -I$(d)/boards # Local flags CFLAGS_$(d) := $(WIRISH_INCLUDES) $(LIBMAPLE_INCLUDES) @@ -15,6 +16,10 @@ cSRCS_$(d) := cppSRCS_$(d) := wirish_math.cpp \ Print.cpp \ + boards/maple.cpp \ + boards/maple_mini.cpp \ + boards/maple_native.cpp \ + boards/maple_RET6.cpp \ comm/HardwareSerial.cpp \ comm/HardwareSPI.cpp \ usb_serial.cpp \ @@ -27,9 +32,8 @@ cppSRCS_$(d) := wirish_math.cpp \ ext_interrupts.cpp \ wirish_digital.cpp \ native_sram.cpp \ - boards.cpp -cFILES_$(d) := $(cSRCS_$(d):%=$(d)/%) +cFILES_$(d) := $(cSRCS_$(d):%=$(d)/%) cppFILES_$(d) := $(cppSRCS_$(d):%=$(d)/%) OBJS_$(d) := $(cFILES_$(d):%.c=$(BUILD_PATH)/%.o) \ |