Skip to content

Commit

Permalink
Merge pull request #112 from erichelgeson/eric/versions
Browse files Browse the repository at this point in the history
Build and tag all versions, collect & rename bin fines
  • Loading branch information
erichelgeson authored May 21, 2022
2 parents 9d1b58c + 1f03996 commit 3ef2474
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.DS_Store
.vscode/
workspace.code-workspace
dist/
13 changes: 13 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -e
set -x

DATE=$(date +%Y%m%d)
VERSION="v1.1-$DATE"
mkdir -p dist

for f in $(ls .pio/build/*/firmware.bin); do
NAME="BlueSCSI-$VERSION-$(echo $f | cut -d\/ -f3).bin"
cp $f dist/$NAME
done
52 changes: 44 additions & 8 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,65 @@ build_flags =
-DARDUINO_ARCH_STM32
-DDEBUG_LEVEL=DEBUG_NONE
-O2
-D BUILD_TAGS="\"\""
build_unflags =
-Os
-DARDUINO_ARCH_STM32F1
upload_flags = -c set CPUTAPID 0

[env:STM32F103C8]
[env:STM32F1]
platform = ststm32
board = genericSTM32F103C8
board_build.mcu = stm32f103c8t6
board_build.core = maple

[env:APM32F103C8]
[env:STM32F1-XCVR]
extends = env:STM32F1
build_flags = ${env.build_flags}
-DXCVR
-D BUILD_TAGS="\"-XCVR\""

[env:STM32F1-USB]
extends = env:STM32F1
build_flags = ${env.build_flags}
-D BUILD_TAGS="\"-USB\""
-D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
-D USBCON
-D USBD_VID=0x0483
-D USB_MANUFACTURER="Unknown"
-D USB_PRODUCT="\"BLUEPILL_F103C8\""
-D HAL_PCD_MODULE_ENABLED

[env:STM32F1-USB-128MHZ]
extends = env:STM32F1
board_build.f_cpu = 128000000L
build_flags = ${env.build_flags}
-D BUILD_TAGS="\"-USB-128MHZ\""

[env:APM32F1]
# The APM32F1's default clock is 96MHz and runs unstable at 72MHz(STM32F1's default)
extends = env:STM32F103C8
extends = env:STM32F1
# Explicilty define the multiplier as maple only handles a few cases.
build_flags = ${env.build_flags} -DBOARD_RCC_PLLMUL=RCC_PLLMUL_12 #96000000L
build_flags = ${env.build_flags}
-D BUILD_TAGS="\"-APM32\""
-DBOARD_RCC_PLLMUL=RCC_PLLMUL_12 #96000000L

[env:APM32F1-USB]
# The APM32F1's default clock is 96MHz and runs unstable at 72MHz(STM32F1's default)
extends = env:APM32F1
# Explicilty define the multiplier as maple only handles a few cases.
build_flags = ${env.build_flags}
-D BUILD_TAGS="\"-APM32-USB\""
-D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
-D USBCON
-D USBD_VID=0x0483
-D USB_MANUFACTURER="Unknown"
-D USB_PRODUCT="\"BLUEPILL_F103C8\""
-D HAL_PCD_MODULE_ENABLED
-DBOARD_RCC_PLLMUL=RCC_PLLMUL_12 #96000000L
# Or go all out at 128Mhz, your call :)
#board_build.f_cpu = 128000000L

[env:STM32F103C8-XCVR]
extends = env:STM32F103C8
build_flags = ${env.build_flags} -DXCVR

; [env:debug]
; build_type = debug
; debug_tool = stlink
3 changes: 2 additions & 1 deletion src/BlueSCSI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,8 @@ void initFileLog(int success_mhz) {
LOG_FILE = SD.open(LOG_FILENAME, O_WRONLY | O_CREAT | O_TRUNC);
LOG_FILE.println("BlueSCSI <-> SD - https://github.com/erichelgeson/BlueSCSI");
LOG_FILE.print("VERSION: ");
LOG_FILE.println(VERSION);
LOG_FILE.print(VERSION);
LOG_FILE.println(BUILD_TAGS);
LOG_FILE.print("DEBUG:");
LOG_FILE.print(DEBUG);
LOG_FILE.print(" SDFAT_FILE_TYPE:");
Expand Down

0 comments on commit 3ef2474

Please sign in to comment.