Skip to content

Commit

Permalink
Merge branch 'master' into ble_no_jsvar_irq
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed Dec 14, 2017
2 parents 26fec12 + 1068563 commit dd321b6
Show file tree
Hide file tree
Showing 15 changed files with 113 additions and 131 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
Puck.js: Allow flash memory protection to be overwridden with E.setFlags
Fix lexing of '/*/' as a complete block comment
nRF5x: Add support for negating pins in software (eg. buttons/LEDs)
Add `E.setFlags({unsyncFiles:1}` which doesn't sync the file to the SD card after each write - it's *much* faster
Filesystem API now uses flat strings (avoiding the 512 byte copy for each call)
Increase default internal SD card bitrate to 4MHz (from 100k)

1v94 : Allow Espruino boards to reset straight out of the DFU Bootloader
Improvements in handling errors in code running in IRQs
Expand Down
81 changes: 31 additions & 50 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,13 @@ OPTIMIZEFLAGS+=-pg
endif

# These are files for platform-specific libraries
TARGETSOURCES =
TARGETSOURCES ?=

# Files that contains objects/functions/methods that will be
# exported to JS. The order here actually determines the order
# objects will be matched in. So for example Pins must come
# above ints, since a Pin is also matched as an int.
WRAPPERSOURCES = \
WRAPPERSOURCES += \
src/jswrap_array.c \
src/jswrap_arraybuffer.c \
src/jswrap_dataview.c \
Expand Down Expand Up @@ -242,7 +242,7 @@ src/jswrap_waveform.c \

# it is important that _pin comes before stuff which uses
# integers (as the check for int *includes* the chek for pin)
SOURCES = \
SOURCES += \
src/jslex.c \
src/jsflags.c \
src/jsvar.c \
Expand Down Expand Up @@ -357,21 +357,21 @@ libs/graphics/lcd_arraybuffer.c \
libs/graphics/lcd_js.c

ifdef USE_LCD_SDL
DEFINES += -DUSE_LCD_SDL
SOURCES += libs/graphics/lcd_sdl.c
LIBS += -lSDL
INCLUDE += -I/usr/include/SDL
DEFINES += -DUSE_LCD_SDL
SOURCES += libs/graphics/lcd_sdl.c
LIBS += -lSDL
INCLUDE += -I/usr/include/SDL
endif

ifdef USE_LCD_FSMC
DEFINES += -DUSE_LCD_FSMC
SOURCES += libs/graphics/lcd_fsmc.c
DEFINES += -DUSE_LCD_FSMC
SOURCES += libs/graphics/lcd_fsmc.c
endif

endif

ifdef USE_USB_HID
DEFINES += -DUSE_USB_HID
DEFINES += -DUSE_USB_HID
endif

ifdef USE_NET
Expand Down Expand Up @@ -485,40 +485,40 @@ ifdef USE_NET
endif

ifdef USE_TELNET
DEFINES += -DUSE_TELNET
WRAPPERSOURCES += libs/network/telnet/jswrap_telnet.c
INCLUDE += -I$(ROOT)/libs/network/telnet
DEFINES += -DUSE_TELNET
WRAPPERSOURCES += libs/network/telnet/jswrap_telnet.c
INCLUDE += -I$(ROOT)/libs/network/telnet
endif
endif # USE_NET

ifdef USE_TV
DEFINES += -DUSE_TV
WRAPPERSOURCES += libs/tv/jswrap_tv.c
INCLUDE += -I$(ROOT)/libs/tv
SOURCES += \
libs/tv/tv.c
DEFINES += -DUSE_TV
WRAPPERSOURCES += libs/tv/jswrap_tv.c
INCLUDE += -I$(ROOT)/libs/tv
SOURCES += \
libs/tv/tv.c
endif

ifdef USE_TRIGGER
DEFINES += -DUSE_TRIGGER
WRAPPERSOURCES += libs/trigger/jswrap_trigger.c
INCLUDE += -I$(ROOT)/libs/trigger
SOURCES += \
libs/trigger/trigger.c
DEFINES += -DUSE_TRIGGER
WRAPPERSOURCES += libs/trigger/jswrap_trigger.c
INCLUDE += -I$(ROOT)/libs/trigger
SOURCES += \
libs/trigger/trigger.c
endif

ifdef USE_HASHLIB
INCLUDE += -I$(ROOT)/libs/hashlib
WRAPPERSOURCES += \
libs/hashlib/jswrap_hashlib.c
SOURCES += \
libs/hashlib/sha2.c
INCLUDE += -I$(ROOT)/libs/hashlib
WRAPPERSOURCES += \
libs/hashlib/jswrap_hashlib.c
SOURCES += \
libs/hashlib/sha2.c
endif

ifdef USE_WIRINGPI
DEFINES += -DUSE_WIRINGPI
LIBS += -lwiringPi
INCLUDE += -I/usr/local/include -L/usr/local/lib
DEFINES += -DUSE_WIRINGPI
LIBS += -lwiringPi
INCLUDE += -I/usr/local/include -L/usr/local/lib
endif

ifdef USE_BLUETOOTH
Expand All @@ -528,16 +528,6 @@ ifdef USE_BLUETOOTH
SOURCES += libs/bluetooth/bluetooth_utils.c
endif

ifeq ($(BOARD),MICROBIT)
INCLUDE += -I$(ROOT)/libs/microbit
WRAPPERSOURCES += libs/microbit/jswrap_microbit.c
endif

ifeq ($(BOARD),PUCKJS)
INCLUDE += -I$(ROOT)/libs/puckjs
WRAPPERSOURCES += libs/puckjs/jswrap_puck.c
endif

ifdef USE_CRYPTO
DEFINES += -DUSE_CRYPTO
INCLUDE += -I$(ROOT)/libs/crypto
Expand Down Expand Up @@ -610,22 +600,13 @@ ifdef USE_NUCLEO
WRAPPERSOURCES += targets/nucleo/jswrap_nucleo.c
endif

ifdef USE_HEXBADGE
INCLUDE += -I$(ROOT)/libs/hexbadge
WRAPPERSOURCES += libs/hexbadge/jswrap_hexbadge.c
endif

ifdef USE_WIO_LTE
INCLUDE += -I$(ROOT)/libs/wio_lte
WRAPPERSOURCES += libs/wio_lte/jswrap_wio_lte.c
SOURCES += targets/stm32/stm32_ws2812b_driver.c
endif


ifdef WICED
WRAPPERSOURCES += targets/emw3165/jswrap_emw3165.c
endif

endif # BOOTLOADER ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ DON'T USE STUFF ABOVE IN BOOTLOADER

# =========================================================================
Expand Down
3 changes: 2 additions & 1 deletion boards/EMW3165.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
'makefile' : [
'DEFINES+=-DPIN_NAMES_DIRECT -DHSE_VALUE=26000000UL',
'STLIB=STM32F411xE',
'PRECOMPILED_OBJS+=$(ROOT)/targetlibs/stm32f4/lib/startup_stm32f40_41xxx.o'
'PRECOMPILED_OBJS+=$(ROOT)/targetlibs/stm32f4/lib/startup_stm32f40_41xxx.o',
'WRAPPERSOURCES += targets/emw3165/jswrap_emw3165.c'
]
}
};
Expand Down
4 changes: 3 additions & 1 deletion boards/HEXBADGE.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
'DEFINES+=-DHAL_NFC_ENGINEERING_BC_FTPAN_WORKAROUND=1', # Looks like proper production nRF52s had this issue
'DEFINES+=-DBLUETOOTH_NAME_PREFIX=\'"Badge"\'',
'DFU_PRIVATE_KEY=targets/nrf5x_dfu/dfu_private_key.pem',
'DFU_SETTINGS=--application-version 0xff --hw-version 52 --sd-req 0x8C'
'DFU_SETTINGS=--application-version 0xff --hw-version 52 --sd-req 0x8C',
'INCLUDE += -I$(ROOT)/libs/hexbadge',
'WRAPPERSOURCES += libs/hexbadge/jswrap_hexbadge.c'
]
}
};
Expand Down
2 changes: 2 additions & 0 deletions boards/MICROBIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
'makefile' : [
'SAVE_ON_FLASH=1',
'DEFINES+=-DUSE_DEBUGGER -DUSE_TAB_COMPLETE',
'INCLUDE += -I$(ROOT)/libs/microbit',
'WRAPPERSOURCES += libs/microbit/jswrap_microbit.c'
]
}
};
Expand Down
4 changes: 3 additions & 1 deletion boards/PUCKJS.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
'DEFINES+=-DHAL_NFC_ENGINEERING_BC_FTPAN_WORKAROUND=1', # Looks like proper production nRF52s had this issue
'DEFINES+=-DBLUETOOTH_NAME_PREFIX=\'"Puck.js"\'',
'DFU_PRIVATE_KEY=targets/nrf5x_dfu/dfu_private_key.pem',
'DFU_SETTINGS=--application-version 0xff --hw-version 52 --sd-req 0x8C'
'DFU_SETTINGS=--application-version 0xff --hw-version 52 --sd-req 0x8C',
'INCLUDE += -I$(ROOT)/libs/puckjs',
'WRAPPERSOURCES += libs/puckjs/jswrap_puck.c'
]
}
};
Expand Down
2 changes: 1 addition & 1 deletion boards/RUUVITAG.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
'DEFINES+=-DHAL_NFC_ENGINEERING_BC_FTPAN_WORKAROUND=1', # Looks like proper production nRF52s had this issue
'DEFINES+=-DBLUETOOTH_NAME_PREFIX=\'"RuuviTag"\'',
'DFU_PRIVATE_KEY=targets/nrf5x_dfu/ruuvi_open_private.pem',
'DFU_SETTINGS=--debug-mode'
'DFU_SETTINGS=--debug-mode --hw-version 52 --sd-req 0x8C'
]
}
};
Expand Down
Loading

0 comments on commit dd321b6

Please sign in to comment.