Fix Particle and refine build names

This commit is contained in:
Scott Shawcroft 2018-12-04 16:03:33 -08:00
parent eb8a467dc6
commit 57345c9928
No known key found for this signature in database
GPG Key ID: FD0EDC4B6C53CA59
6 changed files with 23 additions and 12 deletions

View File

@ -24,7 +24,7 @@ before_script:
- gcc --version - gcc --version
- arm-none-eabi-gcc --version - arm-none-eabi-gcc --version
- python3 --version - python3 --version
- sudo apt-get install -y python3-pip - sudo apt-get install -y python3-pip setuptools
- pip3 install --user adafruit-nrfutil - pip3 install --user adafruit-nrfutil
script: script:

View File

@ -457,11 +457,11 @@ $(BUILD)/%.o: %.S
$(QUIET)$(CC) $(ASMFLAGS) $(INC_PATHS) -c -o $@ $< $(QUIET)$(CC) $(ASMFLAGS) $(INC_PATHS) -c -o $@ $<
# Link # Link
$(BUILD)/$(OUTPUT_FILENAME).out: $(BUILD) $(OBJECTS) $(BUILD)/$(OUTPUT_FILENAME)-nosd.out: $(BUILD) $(OBJECTS)
@echo LD $(OUTPUT_FILENAME).out @echo LD $(OUTPUT_FILENAME)-nosd.out
$(QUIET)$(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -lm -o $(BUILD)/$(OUTPUT_FILENAME).out $(QUIET)$(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -lm -o $@
size: $(BUILD)/$(OUTPUT_FILENAME).out size: $(BUILD)/$(OUTPUT_FILENAME)-nosd.out
-@echo '' -@echo ''
$(QUIET)$(SIZE) $< $(QUIET)$(SIZE) $<
-@echo '' -@echo ''
@ -473,22 +473,22 @@ size: $(BUILD)/$(OUTPUT_FILENAME).out
## Create binary .hex file from the .out file ## Create binary .hex file from the .out file
genhex: $(BUILD)/$(OUTPUT_FILENAME).hex genhex: $(BUILD)/$(OUTPUT_FILENAME).hex
$(BUILD)/$(OUTPUT_FILENAME).hex: $(BUILD)/$(OUTPUT_FILENAME).out $(BUILD)/$(OUTPUT_FILENAME)-nosd.hex: $(BUILD)/$(OUTPUT_FILENAME)-nosd.out
@echo CR $(OUTPUT_FILENAME).hex @echo CR $(OUTPUT_FILENAME)-nosd.hex
$(QUIET)$(OBJCOPY) -O ihex $< $@ $(QUIET)$(OBJCOPY) -O ihex $< $@
# merge bootloader and sd hex together # merge bootloader and sd hex together
combinehex: $(BUILD)/$(MERGED_FNAME).hex combinehex: $(BUILD)/$(MERGED_FNAME).hex
$(BUILD)/$(MERGED_FNAME).hex: $(BUILD)/$(OUTPUT_FILENAME).hex $(BUILD)/$(MERGED_FNAME).hex: $(BUILD)/$(OUTPUT_FILENAME)-nosd.hex
@echo CR $(MERGED_FNAME).hex @echo CR $(MERGED_FNAME).hex
@mergehex -q -m $< $(SD_HEX) -o $@ @mergehex -q -m $< $(SD_HEX) -o $@
## Create pkg file for bootloader+SD combo to use with DFU ## Create pkg file for bootloader+SD combo to use with DFU
genpkg: $(BUILD)/$(MERGED_FNAME).zip genpkg: $(BUILD)/$(MERGED_FNAME).zip
$(BUILD)/$(MERGED_FNAME).zip: $(BUILD)/$(OUTPUT_FILENAME).hex $(BUILD)/$(MERGED_FNAME).zip: $(BUILD)/$(OUTPUT_FILENAME)-nosd.hex
@$(NRFUTIL) dfu genpkg --dev-type 0x0052 --dev-revision $(DFU_DEV_REV) --bootloader $< --softdevice $(SD_HEX) $@ @$(NRFUTIL) dfu genpkg --dev-type 0x0052 --dev-revision $(DFU_DEV_REV) --bootloader $< --softdevice $(SD_HEX) $@
# Create SD+bootloader combo with hex & dfu package at release folder # Create SD+bootloader combo with hex & dfu package at release folder

View File

@ -251,7 +251,7 @@ void led_state(uint32_t state)
} else if (temp_color_active) { } else if (temp_color_active) {
final_color = (uint8_t*)&rgb_color; final_color = (uint8_t*)&rgb_color;
} }
#if LED_NEOPIXEL || defined(LED_RGB_RED) #if LED_NEOPIXEL || defined(LED_RGB_RED_PIN)
if (final_color != NULL) { if (final_color != NULL) {
neopixel_write(final_color); neopixel_write(final_color);
} }
@ -375,6 +375,9 @@ void neopixel_teardown(void)
{ {
uint8_t grb[3] = { 0, 0, 0 }; uint8_t grb[3] = { 0, 0, 0 };
neopixel_write(grb); neopixel_write(grb);
nrf_gpio_cfg_default(LED_RGB_RED_PIN);
nrf_gpio_cfg_default(LED_RGB_GREEN_PIN);
nrf_gpio_cfg_default(LED_RGB_BLUE_PIN);
} }
// write 3 bytes color to a built-in neopixel // write 3 bytes color to a built-in neopixel

View File

@ -47,6 +47,12 @@
// The secondary LED, when available, is usually blue. // The secondary LED, when available, is usually blue.
#define LED_SECONDARY 1 #define LED_SECONDARY 1
// Its more common for LEDs to be sinking to the MCU pin. Setting is only for individual LEDs, not
// RGB LEDs.
#ifndef LED_STATE_ON
#define LED_STATE_ON 0
#endif
// Internal status colors are masked by this brightness setting. // Internal status colors are masked by this brightness setting.
#ifndef BOARD_RGB_BRIGHTNESS #ifndef BOARD_RGB_BRIGHTNESS
#define BOARD_RGB_BRIGHTNESS 0x101010 #define BOARD_RGB_BRIGHTNESS 0x101010

View File

@ -44,11 +44,13 @@
*------------------------------------------------------------------*/ *------------------------------------------------------------------*/
#define LEDS_NUMBER 1 #define LEDS_NUMBER 1
#define LED_PRIMARY_PIN _PINNUM(1, 12) #define LED_PRIMARY_PIN _PINNUM(1, 12)
#define LED_STATE_ON 0 #define LED_STATE_ON 1
#define LED_RGB_RED_PIN _PINNUM(0, 13) #define LED_RGB_RED_PIN _PINNUM(0, 13)
#define LED_RGB_GREEN_PIN _PINNUM(0, 14) #define LED_RGB_GREEN_PIN _PINNUM(0, 14)
#define LED_RGB_BLUE_PIN _PINNUM(0, 15) #define LED_RGB_BLUE_PIN _PINNUM(0, 15)
#define BOARD_RGB_BRIGHTNESS 0x202020
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
/* BUTTON /* BUTTON
*------------------------------------------------------------------*/ *------------------------------------------------------------------*/

View File

@ -39,7 +39,7 @@ for board in all_boards:
for entry in os.scandir("_build-{}".format(board)): for entry in os.scandir("_build-{}".format(board)):
for extension in ["zip", "hex"]: for extension in ["zip", "hex"]:
if entry.name.endswith(extension): if entry.name.endswith(extension) and "nosd" not in entry.name:
shutil.copy(entry.path, bin_directory) shutil.copy(entry.path, bin_directory)
if travis: if travis: