Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build and tag all versions, collect & rename bin fines #112

Merged
merged 1 commit into from
May 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -673,7 +673,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