Skip to content

Commit

Permalink
Update font location and shrink a bunch of builds
Browse files Browse the repository at this point in the history
  • Loading branch information
tannewt committed Apr 12, 2019
1 parent a123cdc commit 796fc3f
Show file tree
Hide file tree
Showing 14 changed files with 18,199 additions and 6,303 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,9 @@ FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Thermistor

#Adding per @danh to reduce memory usage and get the latest changes in
# Tweak inlining depending on language.
ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 35
else
CFLAGS_INLINE_LIMIT = 55
endif
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ CIRCUITPY_I2CSLAVE = 0
CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21

# Tweak inlining depending on language.
ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 35
else
CFLAGS_INLINE_LIMIT = 55
endif

# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,11 @@

#define DEFAULT_UART_BUS_RX (&pin_PA11)
#define DEFAULT_UART_BUS_TX (&pin_PA10)

// USB is always used internally so skip the pin objects for it.
#define IGNORE_PIN_PA24 1
#define IGNORE_PIN_PA25 1

// Not connected
#define IGNORE_PIN_PB22 1
#define IGNORE_PIN_PB23 1
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C"
LONGINT_IMPL = MPZ

# Make space for frozen libs
CIRCUITPY_BITBANGIO = 0
CIRCUITPY_DISPLAYIO = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_I2CSLAVE = 0
Expand Down
5 changes: 5 additions & 0 deletions ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ LONGINT_IMPL = MPZ
CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21

# Tweak inlining depending on language.
ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 45
else
CFLAGS_INLINE_LIMIT = 70
endif
5 changes: 5 additions & 0 deletions ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ LONGINT_IMPL = MPZ

CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21

# Tweak inlining depending on language.
ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 50
endif
5 changes: 5 additions & 0 deletions ports/atmel-samd/boards/pewpew10/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ CIRCUITPY_RTC = 0
CIRCUITPY_SAMD = 0
CIRCUITPY_USB_MIDI = 0
CIRCUITPY_SMALL_BUILD = 1

# Tweak inlining depending on language.
ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 40
endif
28 changes: 22 additions & 6 deletions ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#define MICROPY_HW_BOARD_NAME "SparkFun LUMIDrive"
#define MICROPY_HW_MCU_NAME "samd21g18"

//#define MICROPY_HW_NEOPIXEL (&pin_PA06)

// Clock rates are off: Salae reads 12MHz which is the limit even though we set it to the safer 8MHz.
#define SPI_FLASH_BAUDRATE (8000000)

Expand Down Expand Up @@ -30,10 +28,28 @@
#define DEFAULT_SPI_BUS_MOSI (&pin_PA18)
#define DEFAULT_SPI_BUS_MISO (&pin_PA21)

//UART
#define DEFAULT_UART_BUS_RX (&pin_PA11)
#define DEFAULT_UART_BUS_TX (&pin_PA10)

// USB is always used internally so skip the pin objects for it.
#define IGNORE_PIN_PA24 1
#define IGNORE_PIN_PA25 1

#define IGNORE_PIN_PA02 1
#define IGNORE_PIN_PA03 1
#define IGNORE_PIN_PA10 1
#define IGNORE_PIN_PA11 1
#define IGNORE_PIN_PA12 1
#define IGNORE_PIN_PA15 1
#define IGNORE_PIN_PA16 1
#define IGNORE_PIN_PA21 1
#define IGNORE_PIN_PA22 1
#define IGNORE_PIN_PA23 1
#define IGNORE_PIN_PA27 1
#define IGNORE_PIN_PA28 1

#define IGNORE_PIN_PB02 1
#define IGNORE_PIN_PB03 1
#define IGNORE_PIN_PB08 1
#define IGNORE_PIN_PB09 1
#define IGNORE_PIN_PB10 1
#define IGNORE_PIN_PB11 1
#define IGNORE_PIN_PB22 1
#define IGNORE_PIN_PB23 1
4 changes: 2 additions & 2 deletions ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ LONGINT_IMPL = MPZ
CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21

# Make room for frozen libraries.
CFLAGS_INLINE_LIMIT = 55
CIRCUITPY_AUDIOIO = 0
CIRCUITPY_AUDIOBUSIO = 0

EXTERNAL_FLASH_DEVICE_COUNT = 1
EXTERNAL_FLASH_DEVICES = "W25Q32FV"
Expand Down
8 changes: 2 additions & 6 deletions ports/atmel-samd/boards/sparkfun_lumidrive/pins.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA05) },
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA19) }, //
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA18) }, //
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA11) }, //
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) },
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA20) }, //
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA06) }, //
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA06) }, //
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA07) },
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA18) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) }, //
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
};
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ CHIP_FAMILY = samd21

EXTERNAL_FLASH_DEVICE_COUNT = 1
EXTERNAL_FLASH_DEVICES = "W25Q32FV"

# Tweak inlining depending on language.
ifeq ($(TRANSLATION), zh_Latn_pinyin)
CFLAGS_INLINE_LIMIT = 50
endif
2 changes: 2 additions & 0 deletions supervisor/shared/usb/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ void usb_init(void) {
tud_cdc_set_wanted_char(CHAR_CTRL_C);
#endif

#if CIRCUITPY_USB_MIDI
usb_midi_init();
#endif
}

void usb_background(void) {
Expand Down
2 changes: 1 addition & 1 deletion supervisor/supervisor.mk
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ autogen_usb_descriptor.intermediate: ../../tools/gen_usb_descriptor.py Makefile
--output_c_file $(BUILD)/autogen_usb_descriptor.c\
--output_h_file $(BUILD)/genhdr/autogen_usb_descriptor.h

CIRCUITPY_DISPLAY_FONT ?= "../../tools/default-font/new-ter-u12n.bdf"
CIRCUITPY_DISPLAY_FONT ?= "../../tools/fonts/ter-u12n.bdf"

$(BUILD)/autogen_display_resources.c: ../../tools/gen_display_resources.py $(HEADER_BUILD)/qstrdefs.generated.h Makefile | $(HEADER_BUILD)
$(STEPECHO) "GEN $@"
Expand Down
Loading

0 comments on commit 796fc3f

Please sign in to comment.